Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing ViewTransition types field #1928

Closed
GrandSchtroumpf opened this issue Mar 3, 2025 · 3 comments
Closed

Missing ViewTransition types field #1928

GrandSchtroumpf opened this issue Mar 3, 2025 · 3 comments

Comments

@GrandSchtroumpf
Copy link

ViewTransition types

The ViewTransition object now includes a types key of type ViewTransitionTypeSet which implement the Set object.

/** Not sure if this is needed, but this is the name of the class when logs in the console */
type ViewTransitionTypeSet = Set<string>;

interface ViewTransition {
  // Existing
  readonly finished: Promise<undefined>;
  readonly ready: Promise<undefined>;
  readonly updateCallbackDone: Promise<undefined>;
  skipTransition(): void;
  // Missing
  types: ViewTransitionTypeSet ;
}

Feature supported by Chome (125) and Safari (18).

@saschanaz
Copy link
Contributor

It's added in #1844, you should either wait until TypeScript updates or opt in for the latest lib with npm @types/web package.

@saschanaz
Copy link
Contributor

@github-actions close

Copy link
Contributor

Closing because @saschanaz is one of the code-owners of this repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants