TypeScript-DOM-lib-generator
TypeScript-DOM-lib-generator copied to clipboard
Tool for generating dom related TypeScript and JavaScript library files
Consider the following code: ```ts async function register() { const publicKey = PublicKeyCredential.parseCreationOptionsFromJSON({ /* … */ }); const credential = (await navigator.credentials.create({publicKey})) as PublicKeyCredential; return credential.toJSON(); } ``` The type...
### Summary `SchedulerPostTaskCallback` should have payload type parameter ### Expected vs. Actual Behavior Payload should be used in [`Scheduler.postTask`](https://developer.mozilla.org/en-US/docs/Web/API/Scheduler/postTask). Expected: `type SchedulerPostTaskCallback = () => T` Actual: `type SchedulerPostTaskCallback =...
Closes #1246
Opening this PR in favor of [this comment from @Renegade334](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/73066#issuecomment-2989865602) in my another PR in DT repo. Since https://nodejs.org/api/webcrypto.html#cryptokeyusages lists the usages in its own table, and it is closely...
I don't think monolithic files help much. Smaller topic-by-topic files would help understanding why they exist, e.g. Streams customization can go into "streams" topic. Given this will add new files,...
This example worked in `2.0`, but not in `2.1`: ```ts const input = document.createElement('input'); input.value; // OK input.onchange = function() { this.value; // Error } ``` The current definition for...
### Summary VideoEncoderConfig interface is missing hevc attribute ### Expected vs. Actual Behavior Modern browsers widely support hevc codec for video encoding and decoding https://developer.mozilla.org/en-US/docs/Web/Media/Guides/Formats/Video_codecs#hevc_h.265. Supported on Chrome 107+, Edge...
Added stricter typings for `ARIAMixin` with a fallback to also allow any other string. Also used `${bigint}` and `${number}` to type, integer and number only properties. I wasn't sure if...
### Summary incorrect type definition for `document.getElementById()` and `shadowRoot.getElementById()` ### Expected vs. Actual Behavior The type definition in lib.dom shows the signature as: ```ts interface Document extends Node, DocumentOrShadowRoot, FontFaceSource,...
### Summary Node.parentElement has type `HTMLElement | null` but it should be `Element | null` ### Expected vs. Actual Behavior Expected: `node.parentElement` type to be `Element | null` Actual: `HTMLElement...