JSMonk / hegel

An advanced static type checker
https://hegel.js.org
MIT License
2.09k stars 59 forks source link

Document (automate?) maintenance of typings package #378

Open SamB opened 1 year ago

SamB commented 1 year ago

I was looking at what you've got in packages/typings, and it looks like some of it comes from TypeScript's bundled libs and some of it comes from @types/node.

It would be a good idea to add a README describing how these are extracted, especially the parts from TypeScript's libs, since that stuff is originally not from files named anything like index.d.ts, whereas the filenames for the node stuff look like the ones from DefinitelyTyped.

I would sort of hope that the procedure would end up something like "run this script, passing in a TypeScript version number, and/or this other script, passing a @types/node version number". (Presumably one would also need to run the tests and eyeball the diffs for anything suspicious. I guess it would also generally be a good idea to add tests for new APIs, to make sure the typechecker actually lets you use them.)

(Of course, this also leaves me wondering: what if I'm using a different version of node, or want some control over the allowed EcmaScript features?)