@types/react 18.0.22 → 18.0.24

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.
Files changed (3) hide show
  1. react/README.md +1 -1
  2. react/index.d.ts +6 -6
  3. react/package.json +2 -2
react/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.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Mon, 24 Oct 2022 17:02:37 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/index.d.ts CHANGED
@@ -1249,6 +1249,8 @@ declare namespace React {
1249
1249
  target: EventTarget & T;
1250
1250
  }
1251
1251
 
1252
+ export type ModifierKey = "Alt" | "AltGraph" | "CapsLock" | "Control" | "Fn" | "FnLock" | "Hyper" | "Meta" | "NumLock" | "ScrollLock" | "Shift" | "Super" | "Symbol" | "SymbolLock";
1253
+
1252
1254
  interface KeyboardEvent<T = Element> extends UIEvent<T, NativeKeyboardEvent> {
1253
1255
  altKey: boolean;
1254
1256
  /** @deprecated */
@@ -1258,7 +1260,7 @@ declare namespace React {
1258
1260
  /**
1259
1261
  * 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.
1260
1262
  */
1261
- getModifierState(key: string): boolean;
1263
+ getModifierState(key: ModifierKey): boolean;
1262
1264
  /**
1263
1265
  * See the [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#named-key-attribute-values). for possible values
1264
1266
  */
@@ -1284,7 +1286,7 @@ declare namespace React {
1284
1286
  /**
1285
1287
  * 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.
1286
1288
  */
1287
- getModifierState(key: string): boolean;
1289
+ getModifierState(key: ModifierKey): boolean;
1288
1290
  metaKey: boolean;
1289
1291
  movementX: number;
1290
1292
  movementY: number;
@@ -1303,7 +1305,7 @@ declare namespace React {
1303
1305
  /**
1304
1306
  * 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.
1305
1307
  */
1306
- getModifierState(key: string): boolean;
1308
+ getModifierState(key: ModifierKey): boolean;
1307
1309
  metaKey: boolean;
1308
1310
  shiftKey: boolean;
1309
1311
  targetTouches: TouchList;
@@ -1857,6 +1859,7 @@ declare namespace React {
1857
1859
  hidden?: boolean | undefined;
1858
1860
  id?: string | undefined;
1859
1861
  lang?: string | undefined;
1862
+ nonce?: string | undefined;
1860
1863
  placeholder?: string | undefined;
1861
1864
  slot?: string | undefined;
1862
1865
  spellCheck?: Booleanish | undefined;
@@ -1977,7 +1980,6 @@ declare namespace React {
1977
1980
  multiple?: boolean | undefined;
1978
1981
  muted?: boolean | undefined;
1979
1982
  name?: string | undefined;
1980
- nonce?: string | undefined;
1981
1983
  noValidate?: boolean | undefined;
1982
1984
  open?: boolean | undefined;
1983
1985
  optimum?: number | undefined;
@@ -2390,7 +2392,6 @@ declare namespace React {
2390
2392
  defer?: boolean | undefined;
2391
2393
  integrity?: string | undefined;
2392
2394
  noModule?: boolean | undefined;
2393
- nonce?: string | undefined;
2394
2395
  referrerPolicy?: HTMLAttributeReferrerPolicy | undefined;
2395
2396
  src?: string | undefined;
2396
2397
  type?: string | undefined;
@@ -2421,7 +2422,6 @@ declare namespace React {
2421
2422
 
2422
2423
  interface StyleHTMLAttributes<T> extends HTMLAttributes<T> {
2423
2424
  media?: string | undefined;
2424
- nonce?: string | undefined;
2425
2425
  scoped?: boolean | undefined;
2426
2426
  type?: string | undefined;
2427
2427
  }
react/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react",
3
- "version": "18.0.22",
3
+ "version": "18.0.24",
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": "f092726471afd8e8301f411b8985d23d0afc491893fe654a3d4995e7daf48ea1",
149
+ "typesPublisherContentHash": "7834dcdae9bdbf084395b391465cbd6a7e838a24ca26482cf3bd8fe799f1c88f",
150
150
  "typeScriptVersion": "4.1",
151
151
  "exports": {
152
152
  ".": {