TypeScript-DOM-lib-generator
TypeScript-DOM-lib-generator copied to clipboard
Tool for generating dom related TypeScript and JavaScript library files
```ts const img = document.createElement('img') // type error: img.onerror = (e: Event) => e ``` [playground](https://www.typescriptlang.org/play/?#code/MYewdgzgLgBAlgWwOYwLwwCYmAVwQUzCgDpgAnfAQynwFEAbfAogCgHJEk2BKAKF4D0AmAAkcACwD8k3p2Lh8ZMiDJoYLfAC4YtAG6Eo3NAD4Y+XkA) Only `Window.onerror` should have the alternative signature, but not elements. See: - https://developer.mozilla.org/en-US/docs/Web/API/Window/error_event -...
TypedArrays (and `DataView`) will become generics from TypeScript 5.7 and should be supported. Related: https://github.com/microsoft/TypeScript/pull/59417
### 🔍 Search Terms AbortSignal ### Description Hello, In the `AbortSignal` definition, we can see there's an `any` instance method that actually does not exist. It should be a static...
The `AutoFill` type of `lib.dom.d.ts` is missing the following tokens: - bday - cc-additional-name - language - nickname - organization-title - photo - sex - url https://html.spec.whatwg.org/#autofill-field
Fixes #1641 Past PR #1699
## Code that should compile but doesn't ```typescript const peerConnection = new RTCPeerConnection(); peerConnection.addEventListener("datachannel", (event) => { event.channel.addEventListener("error", (event) => { console.error(event.error); }); }); ``` TypeScript complains: "TS2339: Property `error`...
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#browser_compatibility `HTMLInputElement` `type` now is `string`, supporting like 'checkbox ' is better ```ts | "button" | "checkbox" | "color" | "date" | "datetime-local" | "email" | "file" | "hidden" |...
https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1713#issuecomment-2248890913 > types/web also has some compat quirk that had to mismatch with the spec, e.g. ChildNode being only a mixin interface inherited by some Node variants but types/web had...
`RadioNodeList` currently extend `NodeList`, while this is technically correct, the items of said node list (as far as I'm aware) are guaranteed to be the radio buttons themselves, which are...
This PR adds `/** @deferred */` comments to deferred callback parameters in preparation for https://github.com/microsoft/TypeScript/pull/58729.