Similiar to https://github.com/dogben/TypeScript-WebCodecs-generator, this is another fork of https://github.com/microsoft/TypeScript-DOM-lib-generator to generate a d.ts for specified IDL.
- TypeScript-DOM-lib-generator now uses @w3c/webref as source of IDLs. w3c/webref has already included
webcodecs.idl
. - TypeScript-DOM-lib-generator then uses @mdn/browser-compat-data to filter out exporimental features (have less then two browser engines support them).
So:
- Only include
webcodecs.idl
when loading from @w3c/webref - Disable @mdn/browser-compat-data to preserve it
- Several small tweaks to remove other non-needed types
However, webcodecs.idl
from @w3c/webref
is too loose for real-world use.
So it's currently still using IDLs from Chromium source code (version 95.0.4638.60).
See https://github.com/dogben/TypeScript-WebCodecs-generator/blob/master/README.md