-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Remove Deno.Signals enum #11909
Remove Deno.Signals enum #11909
Conversation
Using a string literal union, while it would still allow some unsupported signals, would greatly improve usability in editors. For example: export type Signal = "SIGHUP" | "SIGINT";
export function kill(signal: Signal): void; |
Wonder if these should be case insensitive ala dom events? |
@caspervonb I think it would just be more work - given the Signal string literal union, I think it will be clear that upper case is expected. |
Would only be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM from me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
`Deno.signal` enum was removed in denoland/deno#11909, but the examples still use it. This updates the examples to use the `Signal` union type that replaced the enum.
Fixes #11900