Skip to content
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

chore(core): update QwikKeyboardEvent type #5433

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/docs/src/routes/api/qwik/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -1848,7 +1848,7 @@
}
],
"kind": "Interface",
"content": "```typescript\nexport interface QwikKeyboardEvent<T = Element> extends SyntheticEvent<T, NativeKeyboardEvent> \n```\n**Extends:** SyntheticEvent&lt;T, [NativeKeyboardEvent](#nativekeyboardevent)<!-- -->&gt;\n\n\n| Property | Modifiers | Type | Description |\n| --- | --- | --- | --- |\n| [altKey](#) | | boolean | |\n| [charCode](#) | | number | |\n| [ctrlKey](#) | | boolean | |\n| [isComposing](#) | | boolean | |\n| [key](#) | | string | See the \\[DOM Level 3 Events spec\\](https://www.w3.org/TR/uievents-key/\\#named-key-attribute-values). for possible values |\n| [keyCode](#) | | number | |\n| [locale](#) | | string | |\n| [location](#) | | number | |\n| [metaKey](#) | | boolean | |\n| [repeat](#) | | boolean | |\n| [shiftKey](#) | | boolean | |\n| [which](#) | | number | |\n\n\n| Method | Description |\n| --- | --- |\n| [getModifierState(key)](#qwikkeyboardevent-getmodifierstate) | See \\[DOM Level 3 Events spec\\](https://www.w3.org/TR/uievents-key/\\#keys-modifier). for a list of valid (case-sensitive) arguments to this method. |",
"content": "```typescript\nexport interface QwikKeyboardEvent<T = Element> extends SyntheticEvent<T, NativeKeyboardEvent> \n```\n**Extends:** SyntheticEvent&lt;T, [NativeKeyboardEvent](#nativekeyboardevent)<!-- -->&gt;\n\n\n| Property | Modifiers | Type | Description |\n| --- | --- | --- | --- |\n| [altKey](#) | | boolean | |\n| [charCode](#) | | number | |\n| [code](#) | | string | |\n| [ctrlKey](#) | | boolean | |\n| [isComposing](#) | | boolean | |\n| [key](#) | | string | See the \\[DOM Level 3 Events spec\\](https://www.w3.org/TR/uievents-key/\\#named-key-attribute-values). for possible values |\n| [keyCode](#) | | number | |\n| [locale](#) | | string | |\n| [location](#) | | number | |\n| [metaKey](#) | | boolean | |\n| [repeat](#) | | boolean | |\n| [shiftKey](#) | | boolean | |\n| [which](#) | | number | |\n\n\n| Method | Description |\n| --- | --- |\n| [getModifierState(key)](#qwikkeyboardevent-getmodifierstate) | See \\[DOM Level 3 Events spec\\](https://www.w3.org/TR/uievents-key/\\#keys-modifier). for a list of valid (case-sensitive) arguments to this method. |",
"editUrl": "https://github.com/BuilderIO/qwik/tree/main/packages/qwik/src/core/render/jsx/types/jsx-qwik-events.ts",
"mdFile": "qwik.qwikkeyboardevent.md"
},
Expand Down
1 change: 1 addition & 0 deletions packages/docs/src/routes/api/qwik/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2385,6 +2385,7 @@ export interface QwikKeyboardEvent<T = Element> extends SyntheticEvent<T, Native
| ---------------- | --------- | ------- | ---------------------------------------------------------------------------------------------------------------------- |
| [altKey](#) | | boolean | |
| [charCode](#) | | number | |
| [code](#) | | string | |
| [ctrlKey](#) | | boolean | |
| [isComposing](#) | | boolean | |
| [key](#) | | string | See the [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#named-key-attribute-values). for possible values |
Expand Down
8 changes: 5 additions & 3 deletions packages/qwik/src/core/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1532,15 +1532,17 @@ export namespace QwikJSX {
export interface QwikKeyboardEvent<T = Element> extends SyntheticEvent<T, NativeKeyboardEvent> {
// (undocumented)
altKey: boolean;
// (undocumented)
// @deprecated (undocumented)
charCode: number;
// (undocumented)
code: string;
// (undocumented)
ctrlKey: boolean;
getModifierState(key: string): boolean;
// (undocumented)
isComposing: boolean;
key: string;
// (undocumented)
// @deprecated (undocumented)
keyCode: number;
// (undocumented)
locale: string;
Expand All @@ -1552,7 +1554,7 @@ export interface QwikKeyboardEvent<T = Element> extends SyntheticEvent<T, Native
repeat: boolean;
// (undocumented)
shiftKey: boolean;
// (undocumented)
// @deprecated (undocumented)
which: number;
}

Expand Down
4 changes: 4 additions & 0 deletions packages/qwik/src/core/render/jsx/types/jsx-qwik-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export interface QwikChangeEvent<T = Element> extends SyntheticEvent<T> {
export interface QwikKeyboardEvent<T = Element> extends SyntheticEvent<T, NativeKeyboardEvent> {
isComposing: boolean;
altKey: boolean;
/** @deprecated Deprecated. */
charCode: number;
ctrlKey: boolean;
/**
Expand All @@ -112,12 +113,15 @@ export interface QwikKeyboardEvent<T = Element> extends SyntheticEvent<T, Native
* spec](https://www.w3.org/TR/uievents-key/#named-key-attribute-values). for possible values
*/
key: string;
code: string;
/** @deprecated Deprecated. */
keyCode: number;
locale: string;
location: number;
metaKey: boolean;
repeat: boolean;
shiftKey: boolean;
/** @deprecated Deprecated. */
which: number;
}

Expand Down
Loading