-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Enforce option value via types #889
Labels
Milestone
Comments
Tyriar
added
type/enhancement
Features or improvements to existing features
help wanted
labels
Aug 16, 2017
I think this is already done in setOption(key: 'bellStyle', value: null | 'none' | 'visual' | 'sound' | 'both'): void;
/**
* Sets an option on the terminal.
* @param key The option key.
* @param value The option value.
*/
setOption(key: 'cursorStyle', value: null | 'block' | 'underline' | 'bar'): void; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think we can extend StringOption and similar to actually check the value at compile time, not just the type.
https://github.com/sourcelair/xterm.js/blob/39328d6e0c05b1f1f574303ad0288687ca6f813f/src/Types.ts#L33-L35
The text was updated successfully, but these errors were encountered: