Open hoodmane opened 9 months ago
Okay I made the following to convert from the typescript declarations for the JS builtins to mypy: https://github.com/hoodmane/ts-to-python
But then maybe those also cover everything in the webidl?
The biggest annoyance I've found compared to webidl is that webidl distinguishes between integer and floating point types but typescript doesn't.
In #12 I added some type tests. The biggest issue that they seem to reveal is that we don't see JS builtins. For example, suppose someone uses
Object
:This sort of code is pretty common in practice and ideally we'd want to be able to typecheck this. Since it's not in the webidl we'd need to get the info from some other source. Unfortunately that seems like a lot of work...
Some thoughts: