-
Notifications
You must be signed in to change notification settings - Fork 18
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
How to use Process module? #28
Comments
This library was written before records mapped to JS objects, so it’s a little more cumbersome than modern ReScript. Fixing that is on my list to do, but that’s a big job. There is an instance of type As for why exit takes a we could look at adding a second mapping that applies to the default - that’s very easy to do. |
Thank you. I prefer not to NodeJs.Process.exitWithCode(NodeJs.Process.process, 0) which may or may not look a littlte too much for the task :( What would the alternative mapping look like? |
I can understand not wanting to open entire modules coming from JS, but ReScript works a bit differently. If you look at the compiled JS it's importing entire modules regardless and only using what it needs to 🤷♂️ An alternate binding would be:
If this was added to the
|
Or, to answer your actual question (sorry about that)
would then give you |
Unless I am not seeing something very obvious, why is everything in
Process
module typed(t, ...) => ...
?Something as seemingly trivial as
NodeJs.Process.exit(0)
just wouldn't work.The text was updated successfully, but these errors were encountered: