{"id":15380987,"url":"https://github.com/lukewarlow/view-transitions-api-types","last_synced_at":"2025-07-12T20:35:43.741Z","repository":{"id":175037510,"uuid":"653236995","full_name":"lukewarlow/view-transitions-api-types","owner":"lukewarlow","description":"TypeScript definitions for the View Transitions API","archived":false,"fork":false,"pushed_at":"2023-06-13T17:00:50.000Z","size":4,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-03-15T08:06:30.946Z","etag":null,"topics":["hacktoberfest","page-transitions","shared-element-transition","sharedelementtransitions","types","typescript","typescript-definitions","view-transitions-api","viewtransitions"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/view-transitions-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}},"created_at":"2023-06-13T16:56:34.000Z","updated_at":"2023-09-26T12:24:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"3b801cca-f530-410c-b068-b7d0df2add9b","html_url":"https://github.com/lukewarlow/view-transitions-api-types","commit_stats":null,"previous_names":["lukewarlow/view-transitions-api-types"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukewarlow%2Fview-transitions-api-types","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukewarlow%2Fview-transitions-api-types/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukewarlow%2Fview-transitions-api-types/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukewarlow%2Fview-transitions-api-types/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukewarlow","download_url":"https://codeload.github.com/lukewarlow/view-transitions-api-types/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249130775,"owners_count":21217610,"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":["hacktoberfest","page-transitions","shared-element-transition","sharedelementtransitions","types","typescript","typescript-definitions","view-transitions-api","viewtransitions"],"created_at":"2024-10-01T14:25:15.858Z","updated_at":"2025-04-15T18:41:03.803Z","avatar_url":"https://github.com/lukewarlow.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# View Transitions API Types\n\n[![npm](https://img.shields.io/npm/v/view-transitions-api-types.svg?style=flat-square)](https://www.npmjs.com/package/view-transitions-api-types)\n\nType definition for [`View Transitions API`](https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API)\n\n### Install\n\n```shell\n$ npm i -D view-transitions-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 document.startViewTransition for use in this file. See https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html#-reference-types- for more info.\n/// \u003creference types=\"view-transitions-api-types\" /\u003e\n\nconsole.log(document.startViewTransition) // 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/view-transitions-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 document.startViewTransition 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=\"view-transitions-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/view-transitions-api-types/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukewarlow%2Fview-transitions-api-types","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukewarlow%2Fview-transitions-api-types","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukewarlow%2Fview-transitions-api-types/lists"}