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

[type bug] fontfaces property is missing from loadingdone event object #51885

Open
TechQuery opened this issue Dec 14, 2022 · 0 comments
Open
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Help Wanted You can do this
Milestone

Comments

@TechQuery
Copy link

Configuration Check

My compilation target is ES2015 and my lib is ES2022 & `DOM.

Missing / Incorrect Definition

Request to replace the event type of onloadingdone handler from Event to FontFaceSetLoadEvent, which has been defined in the same module.

onloadingdone: ((this: FontFaceSet, ev: Event) => any) | null;

TypeScript/lib/lib.dom.d.ts

Lines 5548 to 5550 in eb9252e

interface FontFaceSetLoadEvent extends Event {
readonly fontfaces: ReadonlyArray<FontFace>;
}

Sample Code

interface FontFaceSet extends EventTarget {
-    onloadingdone: ((this: FontFaceSet, ev: Event) => any) | null;
+    onloadingdone: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null;
}

Documentation Link

https://w3c.github.io/csswg-drafts/css-font-loading/#FontFaceSet-events

@RyanCavanaugh RyanCavanaugh added Bug A bug in TypeScript Help Wanted You can do this Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript labels Dec 15, 2022
@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Help Wanted You can do this
Projects
None yet
Development

No branches or pull requests

2 participants