@types/react-dom 18.0.6 → 18.0.8

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-dom/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for React (react-dom) (https://reactjs.or
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 05 Jul 2022 08:02:21 GMT
11
+ * Last updated: Thu, 27 Oct 2022 11:32:50 GMT
12
12
  * Dependencies: [@types/react](https://npmjs.com/package/@types/react)
13
13
  * Global values: `ReactDOM`, `ReactDOMServer`
14
14
 
react-dom/next.d.ts CHANGED
@@ -31,4 +31,21 @@ import ReactDOM = require('.');
31
31
 
32
32
  export {};
33
33
 
34
- declare module '.' {}
34
+ declare module '.' {
35
+ type PreloadAs = 'font' | 'script' | 'style';
36
+ interface PreloadOptions {
37
+ as: PreloadAs;
38
+ crossOrigin?: string | undefined;
39
+ integrity?: string | undefined;
40
+ }
41
+ function preload(href: string, options?: PreloadOptions): void;
42
+
43
+ type PreinitAs = 'script' | 'style';
44
+ interface PreinitOptions {
45
+ as: PreinitAs;
46
+ crossOrigin?: string | undefined;
47
+ precedence?: string | undefined;
48
+ integrity?: string | undefined;
49
+ }
50
+ function preinit(href: string, options?: PreinitOptions): void;
51
+ }
react-dom/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react-dom",
3
- "version": "18.0.6",
3
+ "version": "18.0.8",
4
4
  "description": "TypeScript definitions for React (react-dom)",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom",
6
6
  "license": "MIT",
@@ -49,8 +49,8 @@
49
49
  "dependencies": {
50
50
  "@types/react": "*"
51
51
  },
52
- "typesPublisherContentHash": "b61c300391418b2c9a3fe5287604ff6412998c168f8c07b1f9559e2943784b22",
53
- "typeScriptVersion": "4.0",
52
+ "typesPublisherContentHash": "3b11de1cd6e3a4b8980c02393b5ad8f327a0cab6be450186469820c97110516f",
53
+ "typeScriptVersion": "4.1",
54
54
  "exports": {
55
55
  ".": {
56
56
  "types": {
@@ -24,6 +24,8 @@ export interface OptionalEventProperties {
24
24
  type?: string | undefined;
25
25
  }
26
26
 
27
+ export type ModifierKey = "Alt" | "AltGraph" | "CapsLock" | "Control" | "Fn" | "FnLock" | "Hyper" | "Meta" | "NumLock" | "ScrollLock" | "Shift" | "Super" | "Symbol" | "SymbolLock";
28
+
27
29
  export interface SyntheticEventData extends OptionalEventProperties {
28
30
  altKey?: boolean | undefined;
29
31
  button?: number | undefined;
@@ -39,7 +41,7 @@ export interface SyntheticEventData extends OptionalEventProperties {
39
41
  deltaY?: number | undefined;
40
42
  deltaZ?: number | undefined;
41
43
  detail?: number | undefined;
42
- getModifierState?(key: string): boolean;
44
+ getModifierState?(key: ModifierKey): boolean;
43
45
  key?: string | undefined;
44
46
  keyCode?: number | undefined;
45
47
  locale?: string | undefined;