@types/react 16.14.33 → 16.14.35

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 v16.14/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/v16.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 25 Oct 2022 18:02:53 GMT
11
+ * Last updated: Wed, 18 Jan 2023 19:02:49 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 v16.14/index.d.ts CHANGED
@@ -1198,6 +1198,8 @@ declare namespace React {
1198
1198
  target: EventTarget & T;
1199
1199
  }
1200
1200
 
1201
+ export type ModifierKey = "Alt" | "AltGraph" | "CapsLock" | "Control" | "Fn" | "FnLock" | "Hyper" | "Meta" | "NumLock" | "ScrollLock" | "Shift" | "Super" | "Symbol" | "SymbolLock";
1202
+
1201
1203
  interface KeyboardEvent<T = Element> extends UIEvent<T, NativeKeyboardEvent> {
1202
1204
  altKey: boolean;
1203
1205
  /** @deprecated */
@@ -1206,7 +1208,7 @@ declare namespace React {
1206
1208
  /**
1207
1209
  * 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.
1208
1210
  */
1209
- getModifierState(key: string): boolean;
1211
+ getModifierState(key: ModifierKey): boolean;
1210
1212
  /**
1211
1213
  * See the [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#named-key-attribute-values). for possible values
1212
1214
  */
@@ -1232,7 +1234,7 @@ declare namespace React {
1232
1234
  /**
1233
1235
  * 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.
1234
1236
  */
1235
- getModifierState(key: string): boolean;
1237
+ getModifierState(key: ModifierKey): boolean;
1236
1238
  metaKey: boolean;
1237
1239
  movementX: number;
1238
1240
  movementY: number;
@@ -1251,7 +1253,7 @@ declare namespace React {
1251
1253
  /**
1252
1254
  * 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.
1253
1255
  */
1254
- getModifierState(key: string): boolean;
1256
+ getModifierState(key: ModifierKey): boolean;
1255
1257
  metaKey: boolean;
1256
1258
  shiftKey: boolean;
1257
1259
  targetTouches: TouchList;
@@ -1903,7 +1905,7 @@ declare namespace React {
1903
1905
  content?: string | undefined;
1904
1906
  controls?: boolean | undefined;
1905
1907
  coords?: string | undefined;
1906
- crossOrigin?: string | undefined;
1908
+ crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
1907
1909
  data?: string | undefined;
1908
1910
  dateTime?: string | undefined;
1909
1911
  default?: boolean | undefined;
@@ -2192,7 +2194,7 @@ declare namespace React {
2192
2194
  autoFocus?: boolean | undefined;
2193
2195
  capture?: boolean | string | undefined; // https://www.w3.org/TR/html-media-capture/#the-capture-attribute
2194
2196
  checked?: boolean | undefined;
2195
- crossOrigin?: string | undefined;
2197
+ crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
2196
2198
  disabled?: boolean | undefined;
2197
2199
  form?: string | undefined;
2198
2200
  formAction?: string | undefined;
@@ -2243,7 +2245,7 @@ declare namespace React {
2243
2245
 
2244
2246
  interface LinkHTMLAttributes<T> extends HTMLAttributes<T> {
2245
2247
  as?: string | undefined;
2246
- crossOrigin?: string | undefined;
2248
+ crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
2247
2249
  href?: string | undefined;
2248
2250
  hrefLang?: string | undefined;
2249
2251
  integrity?: string | undefined;
@@ -2268,7 +2270,7 @@ declare namespace React {
2268
2270
  autoPlay?: boolean | undefined;
2269
2271
  controls?: boolean | undefined;
2270
2272
  controlsList?: string | undefined;
2271
- crossOrigin?: string | undefined;
2273
+ crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
2272
2274
  loop?: boolean | undefined;
2273
2275
  mediaGroup?: string | undefined;
2274
2276
  muted?: boolean | undefined;
@@ -2353,7 +2355,7 @@ declare namespace React {
2353
2355
  async?: boolean | undefined;
2354
2356
  /** @deprecated */
2355
2357
  charSet?: string | undefined;
2356
- crossOrigin?: string | undefined;
2358
+ crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
2357
2359
  defer?: boolean | undefined;
2358
2360
  integrity?: string | undefined;
2359
2361
  noModule?: boolean | undefined;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react",
3
- "version": "16.14.33",
3
+ "version": "16.14.35",
4
4
  "description": "TypeScript definitions for React",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",
6
6
  "license": "MIT",
@@ -146,8 +146,8 @@
146
146
  "@types/scheduler": "*",
147
147
  "csstype": "^3.0.2"
148
148
  },
149
- "typesPublisherContentHash": "6fa4a2e687b091b8c4156cf9cfc4eb7f28f4469daf917f30271834a87dd6673a",
150
- "typeScriptVersion": "4.1",
149
+ "typesPublisherContentHash": "1cd8adb2adbf25af0f02c5fda85037946c7dbc1c4673fd86cce0b7d2da118a26",
150
+ "typeScriptVersion": "4.2",
151
151
  "exports": {
152
152
  ".": {
153
153
  "types": {