-
Notifications
You must be signed in to change notification settings - Fork 159
Open
Labels
editorialchanges to wording, grammar, etc that don't modify the intended behaviorchanges to wording, grammar, etc that don't modify the intended behavior
Description
The TypeScript definition for webcodecs in DefinitelyTyped is outdated, so I'm trying to generate a new one from official IDL using a modified version of microsoft/TypeScript-DOM-lib-generator. It worked, but old tests didn't pass.
The reason is that the old version was generated from Chromium IDL, which differs from official IDL.
For example, AudioDecoderSupport
dictionary in official IDL is
Lines 1565 to 1568 in 46eaed1
dictionary AudioDecoderSupport { | |
boolean supported; | |
AudioDecoderConfig config; | |
}; |
and Chromium version
dictionary AudioDecoderSupport {
required boolean supported;
required AudioDecoderConfig config;
};
Looking at related steps, these fields are definitely assigned, so the required
keyword is correct.
Marking them as required
more precisely reflects shape of the value, and TypeScript-DOM-lib-generator needs them to generate more correct type definitions.
Metadata
Metadata
Assignees
Labels
editorialchanges to wording, grammar, etc that don't modify the intended behaviorchanges to wording, grammar, etc that don't modify the intended behavior