@types/react 18.2.1 → 18.2.2
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/README.md +1 -1
- react/package.json +2 -2
- react/ts5.0/experimental.d.ts +18 -0
- react/ts5.0/global.d.ts +1 -0
- react/ts5.0/index.d.ts +27 -5
react/README.md
CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for React (https://react.dev/).
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react.
|
9
9
|
|
10
10
|
### Additional Details
|
11
|
-
* Last updated: Wed, 03 May 2023
|
11
|
+
* Last updated: Wed, 03 May 2023 20:32:43 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/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react",
|
3
|
-
"version": "18.2.
|
3
|
+
"version": "18.2.2",
|
4
4
|
"description": "TypeScript definitions for React",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",
|
6
6
|
"license": "MIT",
|
@@ -158,7 +158,7 @@
|
|
158
158
|
"@types/scheduler": "*",
|
159
159
|
"csstype": "^3.0.2"
|
160
160
|
},
|
161
|
-
"typesPublisherContentHash": "
|
161
|
+
"typesPublisherContentHash": "e929af8a16a9eb46475643cee5493bf45dcf962806ff8ddc1e0200888ff4fed2",
|
162
162
|
"typeScriptVersion": "4.3",
|
163
163
|
"exports": {
|
164
164
|
".": {
|
react/ts5.0/experimental.d.ts
CHANGED
@@ -38,6 +38,9 @@ import React = require('./next');
|
|
38
38
|
|
39
39
|
export {};
|
40
40
|
|
41
|
+
declare const UNDEFINED_VOID_ONLY: unique symbol;
|
42
|
+
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
|
43
|
+
|
41
44
|
declare module '.' {
|
42
45
|
export interface SuspenseProps {
|
43
46
|
/**
|
@@ -105,4 +108,19 @@ declare module '.' {
|
|
105
108
|
|
106
109
|
// tslint:disable-next-line ban-types
|
107
110
|
export function experimental_useEffectEvent<T extends Function>(event: T): T;
|
111
|
+
|
112
|
+
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS {
|
113
|
+
functions: (formData: FormData) => void;
|
114
|
+
}
|
115
|
+
|
116
|
+
export interface TransitionStartFunction {
|
117
|
+
/**
|
118
|
+
* Marks all state updates inside the async function as transitions
|
119
|
+
*
|
120
|
+
* @see {https://react.dev/reference/react/ts5.0/useTransition#starttransition}
|
121
|
+
*
|
122
|
+
* @param callback
|
123
|
+
*/
|
124
|
+
(callback: () => Promise<VoidOrUndefinedOnly>): void;
|
125
|
+
}
|
108
126
|
}
|
react/ts5.0/global.d.ts
CHANGED
@@ -149,6 +149,7 @@ interface SVGTSpanElement extends SVGElement { }
|
|
149
149
|
interface SVGUseElement extends SVGElement { }
|
150
150
|
interface SVGViewElement extends SVGElement { }
|
151
151
|
|
152
|
+
interface FormData {}
|
152
153
|
interface Text { }
|
153
154
|
interface TouchList { }
|
154
155
|
interface WebGLRenderingContext { }
|
react/ts5.0/index.d.ts
CHANGED
@@ -1898,11 +1898,21 @@ declare namespace React {
|
|
1898
1898
|
is?: string | undefined;
|
1899
1899
|
}
|
1900
1900
|
|
1901
|
+
/**
|
1902
|
+
* For internal usage only.
|
1903
|
+
* Different release channels declare additional types of ReactNode this particular release channel accepts.
|
1904
|
+
* App or library types should never augment this interface.
|
1905
|
+
*/
|
1906
|
+
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS {}
|
1907
|
+
|
1901
1908
|
interface AllHTMLAttributes<T> extends HTMLAttributes<T> {
|
1902
1909
|
// Standard HTML Attributes
|
1903
1910
|
accept?: string | undefined;
|
1904
1911
|
acceptCharset?: string | undefined;
|
1905
|
-
action?:
|
1912
|
+
action?:
|
1913
|
+
| string
|
1914
|
+
| undefined
|
1915
|
+
| DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS];
|
1906
1916
|
allowFullScreen?: boolean | undefined;
|
1907
1917
|
allowTransparency?: boolean | undefined;
|
1908
1918
|
alt?: string | undefined;
|
@@ -1931,7 +1941,10 @@ declare namespace React {
|
|
1931
1941
|
download?: any;
|
1932
1942
|
encType?: string | undefined;
|
1933
1943
|
form?: string | undefined;
|
1934
|
-
formAction?:
|
1944
|
+
formAction?:
|
1945
|
+
| string
|
1946
|
+
| undefined
|
1947
|
+
| DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS];
|
1935
1948
|
formEncType?: string | undefined;
|
1936
1949
|
formMethod?: string | undefined;
|
1937
1950
|
formNoValidate?: boolean | undefined;
|
@@ -2059,7 +2072,10 @@ declare namespace React {
|
|
2059
2072
|
interface ButtonHTMLAttributes<T> extends HTMLAttributes<T> {
|
2060
2073
|
disabled?: boolean | undefined;
|
2061
2074
|
form?: string | undefined;
|
2062
|
-
formAction?:
|
2075
|
+
formAction?:
|
2076
|
+
| string
|
2077
|
+
| DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS]
|
2078
|
+
| undefined;
|
2063
2079
|
formEncType?: string | undefined;
|
2064
2080
|
formMethod?: string | undefined;
|
2065
2081
|
formNoValidate?: boolean | undefined;
|
@@ -2118,7 +2134,10 @@ declare namespace React {
|
|
2118
2134
|
|
2119
2135
|
interface FormHTMLAttributes<T> extends HTMLAttributes<T> {
|
2120
2136
|
acceptCharset?: string | undefined;
|
2121
|
-
action?:
|
2137
|
+
action?:
|
2138
|
+
| string
|
2139
|
+
| undefined
|
2140
|
+
| DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS];
|
2122
2141
|
autoComplete?: string | undefined;
|
2123
2142
|
encType?: string | undefined;
|
2124
2143
|
method?: string | undefined;
|
@@ -2208,7 +2227,10 @@ declare namespace React {
|
|
2208
2227
|
disabled?: boolean | undefined;
|
2209
2228
|
enterKeyHint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send' | undefined;
|
2210
2229
|
form?: string | undefined;
|
2211
|
-
formAction?:
|
2230
|
+
formAction?:
|
2231
|
+
| string
|
2232
|
+
| DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS]
|
2233
|
+
| undefined;
|
2212
2234
|
formEncType?: string | undefined;
|
2213
2235
|
formMethod?: string | undefined;
|
2214
2236
|
formNoValidate?: boolean | undefined;
|