Update tooling for new IDL and MDN #920
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR updates the tooling around extracting and transforming the IDL and MDN sources to support recent changes to the specifications and MDN.
<span class="idlHeader">WebIDL</span>
element at the top of every WebIDL block (for example in this block). With the current code, we would naively include this header in the IDL content, which broke the WebIDL parser. We now strip this header when fetching new IDLs.void
toundefined
, see add a type to represent the undefined value whatwg/webidl#60 and void -> undefined, and allow it anywhere. whatwg/webidl#906. We chose to have a bit of special handling for this, to better match the existing semantics and expectations around TypeScript'svoid
andundefined
types:undefined
if it appears in a union type, i.e.Element | undefined
instead ofElement | void
.void
, i.e.void
andPromise<void>
instead ofundefined
andPromise<undefined>
.These tooling changes were extracted from #893, but without the actual updates to the IDL and MDN sources. These sources can be updated in separate PRs, as suggested by @saschanaz.