{"id":15380984,"url":"https://github.com/lukewarlow/navigation-api-types","last_synced_at":"2025-06-10T20:36:02.934Z","repository":{"id":44395121,"uuid":"484507134","full_name":"lukewarlow/navigation-api-types","owner":"lukewarlow","description":"TypeScript definition for the Navigation API","archived":false,"fork":false,"pushed_at":"2025-02-18T21:34:31.000Z","size":32,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-17T16:10:03.707Z","etag":null,"topics":["app-history-api","hacktoberfest","history-api","navigation-api","types","typescript","typescript-definitions"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/navigation-api-types","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lukewarlow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-04-22T16:49:29.000Z","updated_at":"2025-03-16T09:01:15.000Z","dependencies_parsed_at":"2022-07-14T19:17:02.983Z","dependency_job_id":"b2520fd7-335d-43b1-8ac4-eb4cfecd52f9","html_url":"https://github.com/lukewarlow/navigation-api-types","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"92f2f442f087ef5eeea5018d36926cec1f959a8a"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukewarlow%2Fnavigation-api-types","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukewarlow%2Fnavigation-api-types/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukewarlow%2Fnavigation-api-types/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukewarlow%2Fnavigation-api-types/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukewarlow","download_url":"https://codeload.github.com/lukewarlow/navigation-api-types/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukewarlow%2Fnavigation-api-types/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259146906,"owners_count":22812331,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["app-history-api","hacktoberfest","history-api","navigation-api","types","typescript","typescript-definitions"],"created_at":"2024-10-01T14:25:15.269Z","updated_at":"2025-06-10T20:36:02.899Z","avatar_url":"https://github.com/lukewarlow.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Navigation API Types\n\n[![npm](https://img.shields.io/npm/v/navigation-api-types.svg?style=flat-square)](https://www.npmjs.com/package/navigation-api-types)\n\nType definition for [`Navigation API`](https://developer.mozilla.org/en-US/docs/Web/API/Navigation_API)\n\n### Install\n\n```shell\n$ npm i -D navigation-api-types\n```\n### Usage\n\n#### Make types visible in specific files\n\nAdd a [TypesScript triple-slash directive](https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html#-reference-types-)\nas follows in any code-containing '.ts' file you want these types to be available in:\n\n```typescript\n// Add types for window.navigation for use in this file. See https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html#-reference-types- for more info.\n/// \u003creference types=\"navigation-api-types\" /\u003e\n\nconsole.log(window.navigation) // no type error!\n```\n\n#### Make types visible globally in all source files within a project\n\nCreate a `.d.ts` file anywhere in your project so that it is visible to TypeScript according to your `tsconfig.json` settings. For\nexample, it could be at `src/global.d.ts` or `src/navigation-api-types.d.ts`.\n\nAdd a [TypesScript triple-slash directive](https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html#-reference-types-) as follows:\n\n```typescript\n// Add types for window.navigation ambiently for implicit use in the entire project. See https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html#-reference-types- for more info.\n/// \u003creference types=\"navigation-api-types\" /\u003e\n```\n\nThis exposes the types *ambiently* so they are available without any `import` or `require` statements. TypeScript will simply know about them everywhere.\n\n**Important**: do not add any `import` or `export` statements to this file, or it will stop working ambiently. Doing that\nchanges it in TypeScript's view from a \"script\" to a \"module\", and the rules about ambient types change in that case.\n\n## License\n\nThis project is licensed under the [MIT License](https://github.com/lukewarlow/navigation-api-types/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukewarlow%2Fnavigation-api-types","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukewarlow%2Fnavigation-api-types","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukewarlow%2Fnavigation-api-types/lists"}