File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -411,13 +411,23 @@ external displayName: component<'props> => option<string> = "displayName"
411
411
412
412
// Actions
413
413
414
- type transitionFunction = unit => promise <unit >
415
-
414
+ type transitionFunction = unit => unit
416
415
type transitionStartFunction = transitionFunction => unit
417
416
417
+ type transitionFunctionAsync = unit => promise <unit >
418
+ type transitionStartFunctionAsync = transitionFunctionAsync => unit
419
+
420
+ /** `startTransition` lets you render a part of the UI in the background. */
421
+ @module ("react" )
422
+ external startTransition : transitionStartFunction = "startTransition"
423
+ @module ("react" )
424
+ external startTransitionAsync : transitionStartFunctionAsync = "startTransition"
425
+
418
426
/** `useTransition` is a React Hook that lets you render a part of the UI in the background. */
419
427
@module ("react" )
420
428
external useTransition : unit => (bool , transitionStartFunction ) = "useTransition"
429
+ @module ("react" )
430
+ external useTransitionAsync : unit => (bool , transitionStartFunctionAsync ) = "useTransition"
421
431
422
432
type action <'state , 'payload > = ('state , 'payload ) => promise <'state >
423
433
You can’t perform that action at this time.
0 commit comments