|
|
|
|
|
by WorldMaker
3149 days ago
|
|
Typescript has inference for "plain" JS files if you use the `--allowJS` flag. That inference is also made available more directly in dts-gen [1], which is a tool built around Typescript inferencing that produces decent first pass type definition files for a library. dts-gen may be something to try the next time you need a definition file. (Personally, I still prefer to start a new definition file by hand, but it's good to have an automated option, even if only to double-check your work.) [1] https://github.com/Microsoft/dts-gen |
|