Microsoft/TypeScript

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

Open

#51,885 创建于 2022年12月14日

在 GitHub 查看
 (0 评论) (0 反应) (0 负责人)TypeScript (6,726 fork)batch import
BugDomain: lib.d.tsHelp Wanted

仓库指标

Star
 (48,455 star)
PR 合并指标
 (平均合并 6天 17小时) (30 天内合并 9 个 PR)

描述

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.

https://github.com/microsoft/TypeScript/blob/eb9252ed9e53cd5f2732f14552a01920c4ec9401/lib/lib.dom.d.ts#L5530

https://github.com/microsoft/TypeScript/blob/eb9252ed9e53cd5f2732f14552a01920c4ec9401/lib/lib.dom.d.ts#L5548-L5550

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

贡献者指南