npm

@rescript/webapi

0.1.0-experimental-29b94b3 • Public • Published

experimental-rescript-webapi

Experimental successor to rescript-webapi

New approach to webapi bindings (TODO)

  1. Find out if it is possible to adapt https://github.com/microsoft/TypeScript-DOM-lib-generator to output .res files
  1. Try to type most things with records with which we can model inheritance, but for readability and performance's sake it will be better to keep type spread and the necessity for coercion at a minimum and rather duplicate field names (which should not be a problem when everything is generated) as well as identity functions (coercion can be expensive with big record fields).
  2. 80/20 approach, we want to model the more common APIs in a way so that they are delightful to use while the more obscure ones can be harder to use, but those should still be documented well.
  3. In essence, we apply the rescript-core way of doing things here once again, so doc tests can be implemented as well.

TypeScript-DOM-lib-generator

The repository TypeScript-DOM-lib-generator was originally forked into nojaf/TypeScript-DOM-lib-generator but has since been copied into tools/TypeScript-DOM-lib-generator for easier collaboration.

Package Sidebar

Install

npm i @rescript/webapi

Weekly Downloads

467

Version

0.1.0-experimental-29b94b3

License

MIT

Unpacked Size

2.68 MB

Total Files

281

Last publish

Collaborators

  • _zth
  • cristianoc
  • cknittel
  • ryyppy
  • chenglou
  • hongbo_zhang