-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Improve MainModuleFactory type emitted by create_tsd #24087
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Looks you likely need to run some tests with |
Whoops, should've thought about there being tests for this. Sorry about that. Since I will need to set up the whole toolchain to run that, it's going to take a bit though. |
The way I recommend doing it is |
Thanks but I'm on windows, without LLVM or clang. 😅 |
|
I'm happy to do that rebase for you if install emsdk is too much? (But how are you running emscripten then? |
Nah, it was just a oversight - I forgot to set the env variable like you told me to. It works great! |
So... running with I'm not confident that everything works as intended because when I run random tests, many fail, e.g.:
Which is interesting given that "Current" node is 23. Anyway... I only stumbled across this randomly and usually don't use emscripten, so it's probably easiest for both of us if you run that. Thanks for offering that! |
Actually I was chatting with @brendandahl and we think maybe the DefinitelyTyped definition is wrong here. We really want something that is a object/dictionary that matches |
We can maybe land this for now then move away from it. BTW, are using using the generated types in combination with |
No but thanks for asking! (Long story: I arrived here from trying to improve the tree sitter TypeScript types, which are currently not in the best shape. I stumbled across this PR and thought that maybe it didn't get any attention because of the missing PR description or maybe because it didn't address the problem at the root, so I tried to. |
@brendandahl should file a bug to have https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/emscripten/index.d.ts removed? It seems like emscripten-generated types via |
Yeah, I can do that. It looks like that file as some better typing information for a few interfaces that we could pull over and put in the JS doc comments for the library (which will then generate TS definitions). |
This is in accordance with the type on DefinitelyTyped.