We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It would be more type-safe if we could wrap primitives using the newtype pattern. The API would then become:
pub struct KeyCode(pub i32); extern { # [ wasm_bindgen ( method , getter , js_name = keyCode ) ] pub fn key_code(this: &IKeyboardEvent) -> KeyCode; }
Currently, KeyCode is defined as an alias and the enum values becomes constants in a separate type.
KeyCode
ts2rs/monaco-editor/src/monaco_extern.rs
Lines 219 to 220 in 6d35731
ts2rs/monaco-editor/src/monaco_help.rs
Lines 22 to 171 in 6d35731
The text was updated successfully, but these errors were encountered:
No branches or pull requests
It would be more type-safe if we could wrap primitives using the newtype pattern. The API would then become:
Currently,
KeyCode
is defined as an alias and the enum values becomes constants in a separate type.ts2rs/monaco-editor/src/monaco_extern.rs
Lines 219 to 220 in 6d35731
ts2rs/monaco-editor/src/monaco_help.rs
Lines 22 to 171 in 6d35731
The text was updated successfully, but these errors were encountered: