Skip to content

aapocketz/TypeScript-WebCodecs-generator

 
 

Repository files navigation

WebCodecs Typescript lib generator

This repo is forked from https://github.com/microsoft/TypeScript-DOM-lib-generator to generate TypeScript bindings from the WebCodecs IDL files in the Chromium repo.

Build Instructions

To get things setup:

npm install

To generate the .d.ts files

cat /path/to/chromium/src/third_party/blink/renderer/modules/webcodecs/*.idl > inputfiles/idl/webcodecs.widl
npm run build
npm run baseline-accept

You can then run git diff to look at the changes. Then,

cp baselines/webcodecs.generated.d.ts /path/to/DefinitelyTyped/types/dom-webcodecs/

If there are diffs to baselines/dom.generated.d.ts, these will need to be handled manually.

For WebCodecs, we assume that all APIs are exposed to both Window and DedicatedWorker, including AudioBuffer (part of the Web Audio spec). If this assumption does not hold in the future, we may need to split the declarations into two sets. Note that inputfiles/idl/Web Audio.widl has been manually edited in this repo and running fetch-idl will overwrite these edits.

About

Tool for generating dom related TypeScript and JavaScript library files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 98.5%
  • JavaScript 1.4%
  • Other 0.1%
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy