Reputation: 55669
In TS document.startViewTransition
throws a
Property 'startViewTransition' does not exist on type 'Document'
error.
I've tryied to add lib: ["DOM"]
but it doesn't change anything.
Why is there TS definition for this new API ?
Upvotes: 6
Views: 3536
Reputation: 1682
This is now included in Typescript as v5.6, so if you're able to update to the latest version then there's no need for the separate package.
Upvotes: 4
Reputation: 55669
The ViewTransition api is still a "Candidate recommandation", so it's not embedded in TSs' definition yet.
I've found that @types/dom-view-transitions
fit my needs though !
Upvotes: 15