Closed
Description
I tried generating the typings for the async Clipboard API in wffurr@9c8bc4b and the generated ClipboardItemData
type is missing the types
and getType
properties from the IDL: https://w3c.github.io/clipboard-apis/#clipboard-interface
interface ClipboardItem {
constructor(record<DOMString, ClipboardItemData> items,
optional ClipboardItemOptions options = {});
static ClipboardItem createDelayed(
record<DOMString, ClipboardItemDelayedCallback> items,
optional ClipboardItemOptions options = {});
readonly attribute PresentationStyle presentationStyle;
readonly attribute long long lastModified;
readonly attribute boolean delayed;
readonly attribute FrozenArray<DOMString> types;
Promise<Blob> getType(DOMString type);
};
turns into this generated type: wffurr@9c8bc4b#diff-d57c51d024219b9f37e6b42df127db25f700acbaade23ce1edcecda2853b995cR3587
interface ClipboardItem {
readonly delayed: boolean;
readonly lastModified: number;
readonly presentationStyle: PresentationStyle;
}
declare var ClipboardItem: {
prototype: ClipboardItem;
new(items: Record<string, ClipboardItemData>, options?: ClipboardItemOptions): ClipboardItem;
createDelayed(items: Record<string, ClipboardItemDelayedCallback>, options?: ClipboardItemOptions): ClipboardItem;
};
The interface should have readonly types: string[]
and getType(type: string): Promise<Blob>
.
Metadata
Metadata
Assignees
Labels
No labels