@types/react 17.0.51 → 17.0.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
react v17.0/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for React (http://facebook.github.io/reac
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react/v17.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 25 Oct 2022 18:02:53 GMT
11
+ * Last updated: Thu, 27 Oct 2022 11:32:50 GMT
12
12
  * Dependencies: [@types/csstype](https://npmjs.com/package/@types/csstype), [@types/prop-types](https://npmjs.com/package/@types/prop-types), [@types/scheduler](https://npmjs.com/package/@types/scheduler)
13
13
  * Global values: `React`
14
14
 
react v17.0/index.d.ts CHANGED
@@ -1196,6 +1196,8 @@ declare namespace React {
1196
1196
  target: EventTarget & T;
1197
1197
  }
1198
1198
 
1199
+ export type ModifierKey = "Alt" | "AltGraph" | "CapsLock" | "Control" | "Fn" | "FnLock" | "Hyper" | "Meta" | "NumLock" | "ScrollLock" | "Shift" | "Super" | "Symbol" | "SymbolLock";
1200
+
1199
1201
  interface KeyboardEvent<T = Element> extends UIEvent<T, NativeKeyboardEvent> {
1200
1202
  altKey: boolean;
1201
1203
  /** @deprecated */
@@ -1205,7 +1207,7 @@ declare namespace React {
1205
1207
  /**
1206
1208
  * 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.
1207
1209
  */
1208
- getModifierState(key: string): boolean;
1210
+ getModifierState(key: ModifierKey): boolean;
1209
1211
  /**
1210
1212
  * See the [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#named-key-attribute-values). for possible values
1211
1213
  */
@@ -1231,7 +1233,7 @@ declare namespace React {
1231
1233
  /**
1232
1234
  * 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.
1233
1235
  */
1234
- getModifierState(key: string): boolean;
1236
+ getModifierState(key: ModifierKey): boolean;
1235
1237
  metaKey: boolean;
1236
1238
  movementX: number;
1237
1239
  movementY: number;
@@ -1250,7 +1252,7 @@ declare namespace React {
1250
1252
  /**
1251
1253
  * 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.
1252
1254
  */
1253
- getModifierState(key: string): boolean;
1255
+ getModifierState(key: ModifierKey): boolean;
1254
1256
  metaKey: boolean;
1255
1257
  shiftKey: boolean;
1256
1258
  targetTouches: TouchList;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react",
3
- "version": "17.0.51",
3
+ "version": "17.0.52",
4
4
  "description": "TypeScript definitions for React",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",
6
6
  "license": "MIT",
@@ -146,7 +146,7 @@
146
146
  "@types/scheduler": "*",
147
147
  "csstype": "^3.0.2"
148
148
  },
149
- "typesPublisherContentHash": "0bfce8e92c6654643e6cc96318206cc4fb7ded28a24f2e442a70bb18a814bc2b",
149
+ "typesPublisherContentHash": "47c092a6bebf08099b32af5effb816d6d485e7ad065c409fcaf1ba01ab0b1549",
150
150
  "typeScriptVersion": "4.1",
151
151
  "exports": {
152
152
  ".": {