@types/react 19.2.0 → 19.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/canary.d.ts +85 -0
- react/experimental.d.ts +0 -81
- react/index.d.ts +1 -0
- react/package.json +2 -2
- react/ts5.0/canary.d.ts +85 -0
- react/ts5.0/experimental.d.ts +0 -81
- react/ts5.0/index.d.ts +1 -0
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:
|
|
11
|
+
* Last updated: Tue, 07 Oct 2025 05:34:23 GMT
|
|
12
12
|
* Dependencies: [csstype](https://npmjs.com/package/csstype)
|
|
13
13
|
|
|
14
14
|
# Credits
|
react/canary.d.ts
CHANGED
|
@@ -32,4 +32,89 @@ type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
|
|
|
32
32
|
|
|
33
33
|
declare module "." {
|
|
34
34
|
export function unstable_useCacheRefresh(): () => void;
|
|
35
|
+
|
|
36
|
+
// @enableViewTransition
|
|
37
|
+
export interface ViewTransitionInstance {
|
|
38
|
+
/**
|
|
39
|
+
* The {@link ViewTransitionProps name} that was used in the corresponding {@link ViewTransition} component or `"auto"` if the `name` prop was omitted.
|
|
40
|
+
*/
|
|
41
|
+
name: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export type ViewTransitionClassPerType = Record<"default" | (string & {}), "none" | "auto" | (string & {})>;
|
|
45
|
+
export type ViewTransitionClass = ViewTransitionClassPerType | ViewTransitionClassPerType[string];
|
|
46
|
+
|
|
47
|
+
export interface ViewTransitionProps {
|
|
48
|
+
children?: ReactNode | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Assigns the {@link https://developer.chrome.com/blog/view-transitions-update-io24#view-transition-class `view-transition-class`} class to the underlying DOM node.
|
|
51
|
+
*/
|
|
52
|
+
default?: ViewTransitionClass | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Combined with {@link className} if this `<ViewTransition>` or its parent Component is mounted and there's no other with the same name being deleted.
|
|
55
|
+
* `"none"` is a special value that deactivates the view transition name under that condition.
|
|
56
|
+
*/
|
|
57
|
+
enter?: ViewTransitionClass | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Combined with {@link className} if this `<ViewTransition>` or its parent Component is unmounted and there's no other with the same name being deleted.
|
|
60
|
+
* `"none"` is a special value that deactivates the view transition name under that condition.
|
|
61
|
+
*/
|
|
62
|
+
exit?: ViewTransitionClass | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* "auto" will automatically assign a view-transition-name to the inner DOM node.
|
|
65
|
+
* That way you can add a View Transition to a Component without controlling its DOM nodes styling otherwise.
|
|
66
|
+
*
|
|
67
|
+
* A difference between this and the browser's built-in view-transition-name: auto is that switching the DOM nodes within the `<ViewTransition>` component preserves the same name so this example cross-fades between the DOM nodes instead of causing an exit and enter.
|
|
68
|
+
* @default "auto"
|
|
69
|
+
*/
|
|
70
|
+
name?: "auto" | (string & {}) | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* The `<ViewTransition>` or its parent Component is mounted and there's no other `<ViewTransition>` with the same name being deleted.
|
|
73
|
+
*/
|
|
74
|
+
onEnter?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
|
75
|
+
/**
|
|
76
|
+
* The `<ViewTransition>` or its parent Component is unmounted and there's no other `<ViewTransition>` with the same name being deleted.
|
|
77
|
+
*/
|
|
78
|
+
onExit?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
|
79
|
+
/**
|
|
80
|
+
* This `<ViewTransition>` is being mounted and another `<ViewTransition>` instance with the same name is being unmounted elsewhere.
|
|
81
|
+
*/
|
|
82
|
+
onShare?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
|
83
|
+
/**
|
|
84
|
+
* The content of `<ViewTransition>` has changed either due to DOM mutations or because an inner child `<ViewTransition>` has resized.
|
|
85
|
+
*/
|
|
86
|
+
onUpdate?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
|
87
|
+
ref?: Ref<ViewTransitionInstance> | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* Combined with {@link className} if this `<ViewTransition>` is being mounted and another instance with the same name is being unmounted elsewhere.
|
|
90
|
+
* `"none"` is a special value that deactivates the view transition name under that condition.
|
|
91
|
+
*/
|
|
92
|
+
share?: ViewTransitionClass | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* Combined with {@link className} if the content of this `<ViewTransition>` has changed either due to DOM mutations or because an inner child has resized.
|
|
95
|
+
* `"none"` is a special value that deactivates the view transition name under that condition.
|
|
96
|
+
*/
|
|
97
|
+
update?: ViewTransitionClass | undefined;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Opt-in for using {@link https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API View Transitions} in React.
|
|
102
|
+
* View Transitions only trigger for async updates like {@link startTransition}, {@link useDeferredValue}, Actions or <{@link Suspense}> revealing from fallback to content.
|
|
103
|
+
* Synchronous updates provide an opt-out but also guarantee that they commit immediately which View Transitions can't.
|
|
104
|
+
*
|
|
105
|
+
* @see {@link https://react.dev/reference/react/ViewTransition `<ViewTransition>` reference documentation}
|
|
106
|
+
*/
|
|
107
|
+
export const ViewTransition: ExoticComponent<ViewTransitionProps>;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* @see {@link https://react.dev/reference/react/addTransitionType `addTransitionType` reference documentation}
|
|
111
|
+
*/
|
|
112
|
+
export function addTransitionType(type: string): void;
|
|
113
|
+
|
|
114
|
+
// @enableFragmentRefs
|
|
115
|
+
export interface FragmentInstance {}
|
|
116
|
+
|
|
117
|
+
export interface FragmentProps {
|
|
118
|
+
ref?: Ref<FragmentInstance> | undefined;
|
|
119
|
+
}
|
|
35
120
|
}
|
react/experimental.d.ts
CHANGED
|
@@ -117,80 +117,6 @@ declare module "." {
|
|
|
117
117
|
): void;
|
|
118
118
|
function experimental_taintObjectReference(message: string | undefined, object: Reference): void;
|
|
119
119
|
|
|
120
|
-
export interface ViewTransitionInstance {
|
|
121
|
-
/**
|
|
122
|
-
* The {@link ViewTransitionProps name} that was used in the corresponding {@link ViewTransition} component or `"auto"` if the `name` prop was omitted.
|
|
123
|
-
*/
|
|
124
|
-
name: string;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export type ViewTransitionClassPerType = Record<"default" | (string & {}), "none" | "auto" | (string & {})>;
|
|
128
|
-
export type ViewTransitionClass = ViewTransitionClassPerType | ViewTransitionClassPerType[string];
|
|
129
|
-
|
|
130
|
-
export interface ViewTransitionProps {
|
|
131
|
-
children?: ReactNode | undefined;
|
|
132
|
-
/**
|
|
133
|
-
* Assigns the {@link https://developer.chrome.com/blog/view-transitions-update-io24#view-transition-class `view-transition-class`} class to the underlying DOM node.
|
|
134
|
-
*/
|
|
135
|
-
default?: ViewTransitionClass | undefined;
|
|
136
|
-
/**
|
|
137
|
-
* Combined with {@link className} if this `<ViewTransition>` or its parent Component is mounted and there's no other with the same name being deleted.
|
|
138
|
-
* `"none"` is a special value that deactivates the view transition name under that condition.
|
|
139
|
-
*/
|
|
140
|
-
enter?: ViewTransitionClass | undefined;
|
|
141
|
-
/**
|
|
142
|
-
* Combined with {@link className} if this `<ViewTransition>` or its parent Component is unmounted and there's no other with the same name being deleted.
|
|
143
|
-
* `"none"` is a special value that deactivates the view transition name under that condition.
|
|
144
|
-
*/
|
|
145
|
-
exit?: ViewTransitionClass | undefined;
|
|
146
|
-
/**
|
|
147
|
-
* "auto" will automatically assign a view-transition-name to the inner DOM node.
|
|
148
|
-
* That way you can add a View Transition to a Component without controlling its DOM nodes styling otherwise.
|
|
149
|
-
*
|
|
150
|
-
* A difference between this and the browser's built-in view-transition-name: auto is that switching the DOM nodes within the `<ViewTransition>` component preserves the same name so this example cross-fades between the DOM nodes instead of causing an exit and enter.
|
|
151
|
-
* @default "auto"
|
|
152
|
-
*/
|
|
153
|
-
name?: "auto" | (string & {}) | undefined;
|
|
154
|
-
/**
|
|
155
|
-
* The `<ViewTransition>` or its parent Component is mounted and there's no other `<ViewTransition>` with the same name being deleted.
|
|
156
|
-
*/
|
|
157
|
-
onEnter?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
|
158
|
-
/**
|
|
159
|
-
* The `<ViewTransition>` or its parent Component is unmounted and there's no other `<ViewTransition>` with the same name being deleted.
|
|
160
|
-
*/
|
|
161
|
-
onExit?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
|
162
|
-
/**
|
|
163
|
-
* This `<ViewTransition>` is being mounted and another `<ViewTransition>` instance with the same name is being unmounted elsewhere.
|
|
164
|
-
*/
|
|
165
|
-
onShare?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
|
166
|
-
/**
|
|
167
|
-
* The content of `<ViewTransition>` has changed either due to DOM mutations or because an inner child `<ViewTransition>` has resized.
|
|
168
|
-
*/
|
|
169
|
-
onUpdate?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
|
170
|
-
ref?: Ref<ViewTransitionInstance> | undefined;
|
|
171
|
-
/**
|
|
172
|
-
* Combined with {@link className} if this `<ViewTransition>` is being mounted and another instance with the same name is being unmounted elsewhere.
|
|
173
|
-
* `"none"` is a special value that deactivates the view transition name under that condition.
|
|
174
|
-
*/
|
|
175
|
-
share?: ViewTransitionClass | undefined;
|
|
176
|
-
/**
|
|
177
|
-
* Combined with {@link className} if the content of this `<ViewTransition>` has changed either due to DOM mutations or because an inner child has resized.
|
|
178
|
-
* `"none"` is a special value that deactivates the view transition name under that condition.
|
|
179
|
-
*/
|
|
180
|
-
update?: ViewTransitionClass | undefined;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Opt-in for using {@link https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API View Transitions} in React.
|
|
185
|
-
* View Transitions only trigger for async updates like {@link startTransition}, {@link useDeferredValue}, Actions or <{@link Suspense}> revealing from fallback to content.
|
|
186
|
-
* Synchronous updates provide an opt-out but also guarantee that they commit immediately which View Transitions can't.
|
|
187
|
-
*
|
|
188
|
-
* @see {@link https://github.com/facebook/react/pull/31975}
|
|
189
|
-
*/
|
|
190
|
-
export const unstable_ViewTransition: ExoticComponent<ViewTransitionProps>;
|
|
191
|
-
|
|
192
|
-
export function unstable_addTransitionType(type: string): void;
|
|
193
|
-
|
|
194
120
|
// @enableGestureTransition
|
|
195
121
|
// Implemented by the specific renderer e.g. `react-dom`.
|
|
196
122
|
// Keep in mind that augmented interfaces merge their JSDoc so if you put
|
|
@@ -207,13 +133,6 @@ declare module "." {
|
|
|
207
133
|
options?: GestureOptions,
|
|
208
134
|
): () => void;
|
|
209
135
|
|
|
210
|
-
// @enableFragmentRefs
|
|
211
|
-
export interface FragmentInstance {}
|
|
212
|
-
|
|
213
|
-
export interface FragmentProps {
|
|
214
|
-
ref?: Ref<FragmentInstance> | undefined;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
136
|
// @enableSrcObject
|
|
218
137
|
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_IMG_SRC_TYPES {
|
|
219
138
|
srcObject: Blob;
|
react/index.d.ts
CHANGED
|
@@ -3036,6 +3036,7 @@ declare namespace React {
|
|
|
3036
3036
|
}
|
|
3037
3037
|
|
|
3038
3038
|
interface DialogHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
3039
|
+
closedby?: "any" | "closerequest" | "none" | undefined;
|
|
3039
3040
|
onCancel?: ReactEventHandler<T> | undefined;
|
|
3040
3041
|
onClose?: ReactEventHandler<T> | undefined;
|
|
3041
3042
|
open?: boolean | undefined;
|
react/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/react",
|
|
3
|
-
"version": "19.2.
|
|
3
|
+
"version": "19.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",
|
|
@@ -205,6 +205,6 @@
|
|
|
205
205
|
"csstype": "^3.0.2"
|
|
206
206
|
},
|
|
207
207
|
"peerDependencies": {},
|
|
208
|
-
"typesPublisherContentHash": "
|
|
208
|
+
"typesPublisherContentHash": "68c52e24d44da5913d4220a0dd3380ca866be4e58a724ee668fa152a7b358e72",
|
|
209
209
|
"typeScriptVersion": "5.2"
|
|
210
210
|
}
|
react/ts5.0/canary.d.ts
CHANGED
|
@@ -32,4 +32,89 @@ type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
|
|
|
32
32
|
|
|
33
33
|
declare module "." {
|
|
34
34
|
export function unstable_useCacheRefresh(): () => void;
|
|
35
|
+
|
|
36
|
+
// @enableViewTransition
|
|
37
|
+
export interface ViewTransitionInstance {
|
|
38
|
+
/**
|
|
39
|
+
* The {@link ViewTransitionProps name} that was used in the corresponding {@link ViewTransition} component or `"auto"` if the `name` prop was omitted.
|
|
40
|
+
*/
|
|
41
|
+
name: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export type ViewTransitionClassPerType = Record<"default" | (string & {}), "none" | "auto" | (string & {})>;
|
|
45
|
+
export type ViewTransitionClass = ViewTransitionClassPerType | ViewTransitionClassPerType[string];
|
|
46
|
+
|
|
47
|
+
export interface ViewTransitionProps {
|
|
48
|
+
children?: ReactNode | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Assigns the {@link https://developer.chrome.com/blog/view-transitions-update-io24#view-transition-class `view-transition-class`} class to the underlying DOM node.
|
|
51
|
+
*/
|
|
52
|
+
default?: ViewTransitionClass | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Combined with {@link className} if this `<ViewTransition>` or its parent Component is mounted and there's no other with the same name being deleted.
|
|
55
|
+
* `"none"` is a special value that deactivates the view transition name under that condition.
|
|
56
|
+
*/
|
|
57
|
+
enter?: ViewTransitionClass | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Combined with {@link className} if this `<ViewTransition>` or its parent Component is unmounted and there's no other with the same name being deleted.
|
|
60
|
+
* `"none"` is a special value that deactivates the view transition name under that condition.
|
|
61
|
+
*/
|
|
62
|
+
exit?: ViewTransitionClass | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* "auto" will automatically assign a view-transition-name to the inner DOM node.
|
|
65
|
+
* That way you can add a View Transition to a Component without controlling its DOM nodes styling otherwise.
|
|
66
|
+
*
|
|
67
|
+
* A difference between this and the browser's built-in view-transition-name: auto is that switching the DOM nodes within the `<ViewTransition>` component preserves the same name so this example cross-fades between the DOM nodes instead of causing an exit and enter.
|
|
68
|
+
* @default "auto"
|
|
69
|
+
*/
|
|
70
|
+
name?: "auto" | (string & {}) | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* The `<ViewTransition>` or its parent Component is mounted and there's no other `<ViewTransition>` with the same name being deleted.
|
|
73
|
+
*/
|
|
74
|
+
onEnter?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
|
75
|
+
/**
|
|
76
|
+
* The `<ViewTransition>` or its parent Component is unmounted and there's no other `<ViewTransition>` with the same name being deleted.
|
|
77
|
+
*/
|
|
78
|
+
onExit?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
|
79
|
+
/**
|
|
80
|
+
* This `<ViewTransition>` is being mounted and another `<ViewTransition>` instance with the same name is being unmounted elsewhere.
|
|
81
|
+
*/
|
|
82
|
+
onShare?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
|
83
|
+
/**
|
|
84
|
+
* The content of `<ViewTransition>` has changed either due to DOM mutations or because an inner child `<ViewTransition>` has resized.
|
|
85
|
+
*/
|
|
86
|
+
onUpdate?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
|
87
|
+
ref?: Ref<ViewTransitionInstance> | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* Combined with {@link className} if this `<ViewTransition>` is being mounted and another instance with the same name is being unmounted elsewhere.
|
|
90
|
+
* `"none"` is a special value that deactivates the view transition name under that condition.
|
|
91
|
+
*/
|
|
92
|
+
share?: ViewTransitionClass | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* Combined with {@link className} if the content of this `<ViewTransition>` has changed either due to DOM mutations or because an inner child has resized.
|
|
95
|
+
* `"none"` is a special value that deactivates the view transition name under that condition.
|
|
96
|
+
*/
|
|
97
|
+
update?: ViewTransitionClass | undefined;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Opt-in for using {@link https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API View Transitions} in React.
|
|
102
|
+
* View Transitions only trigger for async updates like {@link startTransition}, {@link useDeferredValue}, Actions or <{@link Suspense}> revealing from fallback to content.
|
|
103
|
+
* Synchronous updates provide an opt-out but also guarantee that they commit immediately which View Transitions can't.
|
|
104
|
+
*
|
|
105
|
+
* @see {@link https://react.dev/reference/react/ViewTransition `<ViewTransition>` reference documentation}
|
|
106
|
+
*/
|
|
107
|
+
export const ViewTransition: ExoticComponent<ViewTransitionProps>;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* @see {@link https://react.dev/reference/react/addTransitionType `addTransitionType` reference documentation}
|
|
111
|
+
*/
|
|
112
|
+
export function addTransitionType(type: string): void;
|
|
113
|
+
|
|
114
|
+
// @enableFragmentRefs
|
|
115
|
+
export interface FragmentInstance {}
|
|
116
|
+
|
|
117
|
+
export interface FragmentProps {
|
|
118
|
+
ref?: Ref<FragmentInstance> | undefined;
|
|
119
|
+
}
|
|
35
120
|
}
|
react/ts5.0/experimental.d.ts
CHANGED
|
@@ -117,80 +117,6 @@ declare module "." {
|
|
|
117
117
|
): void;
|
|
118
118
|
function experimental_taintObjectReference(message: string | undefined, object: Reference): void;
|
|
119
119
|
|
|
120
|
-
export interface ViewTransitionInstance {
|
|
121
|
-
/**
|
|
122
|
-
* The {@link ViewTransitionProps name} that was used in the corresponding {@link ViewTransition} component or `"auto"` if the `name` prop was omitted.
|
|
123
|
-
*/
|
|
124
|
-
name: string;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export type ViewTransitionClassPerType = Record<"default" | (string & {}), "none" | "auto" | (string & {})>;
|
|
128
|
-
export type ViewTransitionClass = ViewTransitionClassPerType | ViewTransitionClassPerType[string];
|
|
129
|
-
|
|
130
|
-
export interface ViewTransitionProps {
|
|
131
|
-
children?: ReactNode | undefined;
|
|
132
|
-
/**
|
|
133
|
-
* Assigns the {@link https://developer.chrome.com/blog/view-transitions-update-io24#view-transition-class `view-transition-class`} class to the underlying DOM node.
|
|
134
|
-
*/
|
|
135
|
-
default?: ViewTransitionClass | undefined;
|
|
136
|
-
/**
|
|
137
|
-
* Combined with {@link className} if this `<ViewTransition>` or its parent Component is mounted and there's no other with the same name being deleted.
|
|
138
|
-
* `"none"` is a special value that deactivates the view transition name under that condition.
|
|
139
|
-
*/
|
|
140
|
-
enter?: ViewTransitionClass | undefined;
|
|
141
|
-
/**
|
|
142
|
-
* Combined with {@link className} if this `<ViewTransition>` or its parent Component is unmounted and there's no other with the same name being deleted.
|
|
143
|
-
* `"none"` is a special value that deactivates the view transition name under that condition.
|
|
144
|
-
*/
|
|
145
|
-
exit?: ViewTransitionClass | undefined;
|
|
146
|
-
/**
|
|
147
|
-
* "auto" will automatically assign a view-transition-name to the inner DOM node.
|
|
148
|
-
* That way you can add a View Transition to a Component without controlling its DOM nodes styling otherwise.
|
|
149
|
-
*
|
|
150
|
-
* A difference between this and the browser's built-in view-transition-name: auto is that switching the DOM nodes within the `<ViewTransition>` component preserves the same name so this example cross-fades between the DOM nodes instead of causing an exit and enter.
|
|
151
|
-
* @default "auto"
|
|
152
|
-
*/
|
|
153
|
-
name?: "auto" | (string & {}) | undefined;
|
|
154
|
-
/**
|
|
155
|
-
* The `<ViewTransition>` or its parent Component is mounted and there's no other `<ViewTransition>` with the same name being deleted.
|
|
156
|
-
*/
|
|
157
|
-
onEnter?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
|
158
|
-
/**
|
|
159
|
-
* The `<ViewTransition>` or its parent Component is unmounted and there's no other `<ViewTransition>` with the same name being deleted.
|
|
160
|
-
*/
|
|
161
|
-
onExit?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
|
162
|
-
/**
|
|
163
|
-
* This `<ViewTransition>` is being mounted and another `<ViewTransition>` instance with the same name is being unmounted elsewhere.
|
|
164
|
-
*/
|
|
165
|
-
onShare?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
|
166
|
-
/**
|
|
167
|
-
* The content of `<ViewTransition>` has changed either due to DOM mutations or because an inner child `<ViewTransition>` has resized.
|
|
168
|
-
*/
|
|
169
|
-
onUpdate?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
|
170
|
-
ref?: Ref<ViewTransitionInstance> | undefined;
|
|
171
|
-
/**
|
|
172
|
-
* Combined with {@link className} if this `<ViewTransition>` is being mounted and another instance with the same name is being unmounted elsewhere.
|
|
173
|
-
* `"none"` is a special value that deactivates the view transition name under that condition.
|
|
174
|
-
*/
|
|
175
|
-
share?: ViewTransitionClass | undefined;
|
|
176
|
-
/**
|
|
177
|
-
* Combined with {@link className} if the content of this `<ViewTransition>` has changed either due to DOM mutations or because an inner child has resized.
|
|
178
|
-
* `"none"` is a special value that deactivates the view transition name under that condition.
|
|
179
|
-
*/
|
|
180
|
-
update?: ViewTransitionClass | undefined;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Opt-in for using {@link https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API View Transitions} in React.
|
|
185
|
-
* View Transitions only trigger for async updates like {@link startTransition}, {@link useDeferredValue}, Actions or <{@link Suspense}> revealing from fallback to content.
|
|
186
|
-
* Synchronous updates provide an opt-out but also guarantee that they commit immediately which View Transitions can't.
|
|
187
|
-
*
|
|
188
|
-
* @see {@link https://github.com/facebook/react/pull/31975}
|
|
189
|
-
*/
|
|
190
|
-
export const unstable_ViewTransition: ExoticComponent<ViewTransitionProps>;
|
|
191
|
-
|
|
192
|
-
export function unstable_addTransitionType(type: string): void;
|
|
193
|
-
|
|
194
120
|
// @enableGestureTransition
|
|
195
121
|
// Implemented by the specific renderer e.g. `react-dom`.
|
|
196
122
|
// Keep in mind that augmented interfaces merge their JSDoc so if you put
|
|
@@ -207,13 +133,6 @@ declare module "." {
|
|
|
207
133
|
options?: GestureOptions,
|
|
208
134
|
): () => void;
|
|
209
135
|
|
|
210
|
-
// @enableFragmentRefs
|
|
211
|
-
export interface FragmentInstance {}
|
|
212
|
-
|
|
213
|
-
export interface FragmentProps {
|
|
214
|
-
ref?: Ref<FragmentInstance> | undefined;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
136
|
// @enableSrcObject
|
|
218
137
|
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_IMG_SRC_TYPES {
|
|
219
138
|
srcObject: Blob;
|
react/ts5.0/index.d.ts
CHANGED
|
@@ -3035,6 +3035,7 @@ declare namespace React {
|
|
|
3035
3035
|
}
|
|
3036
3036
|
|
|
3037
3037
|
interface DialogHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
3038
|
+
closedby?: "any" | "closerequest" | "none" | undefined;
|
|
3038
3039
|
onCancel?: ReactEventHandler<T> | undefined;
|
|
3039
3040
|
onClose?: ReactEventHandler<T> | undefined;
|
|
3040
3041
|
open?: boolean | undefined;
|