@types/react
Advanced tools
Comparing version 18.2.24 to 18.2.28
@@ -30,2 +30,5 @@ /** | ||
declare const UNDEFINED_VOID_ONLY: unique symbol; | ||
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never }; | ||
declare module "." { | ||
@@ -87,2 +90,25 @@ interface ThenableImpl<T> { | ||
export function unstable_useCacheRefresh(): () => void; | ||
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS { | ||
functions: (formData: FormData) => void; | ||
} | ||
export interface TransitionStartFunction { | ||
/** | ||
* Marks all state updates inside the async function as transitions | ||
* | ||
* @see {https://react.dev/reference/react/useTransition#starttransition} | ||
* | ||
* @param callback | ||
*/ | ||
(callback: () => Promise<VoidOrUndefinedOnly>): void; | ||
} | ||
function useOptimistic<State>( | ||
passthrough: State, | ||
): [State, (action: State | ((pendingState: State) => State)) => void]; | ||
function useOptimistic<State, Action>( | ||
passthrough: State, | ||
reducer: (state: State, action: Action) => State, | ||
): [State, (action: Action) => void]; | ||
} |
@@ -118,24 +118,10 @@ /** | ||
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS { | ||
functions: (formData: FormData) => void; | ||
} | ||
export interface TransitionStartFunction { | ||
/** | ||
* Marks all state updates inside the async function as transitions | ||
* | ||
* @see {https://react.dev/reference/react/useTransition#starttransition} | ||
* | ||
* @param callback | ||
*/ | ||
(callback: () => Promise<VoidOrUndefinedOnly>): void; | ||
} | ||
function experimental_useOptimistic<State>( | ||
passthrough: State, | ||
): [State, (action: State | ((pendingState: State) => State)) => void]; | ||
function experimental_useOptimistic<State, Action>( | ||
passthrough: State, | ||
reducer: (state: State, action: Action) => State, | ||
): [State, (action: Action) => void]; | ||
type Reference = object; | ||
type TaintableUniqueValue = string | bigint | ArrayBufferView; | ||
function experimental_taintUniqueValue( | ||
message: string | undefined, | ||
lifetime: Reference, | ||
value: TaintableUniqueValue, | ||
): void; | ||
function experimental_taintObjectReference(message: string | undefined, object: Reference): void; | ||
} |
{ | ||
"name": "@types/react", | ||
"version": "18.2.24", | ||
"version": "18.2.28", | ||
"description": "TypeScript definitions for React", | ||
@@ -161,3 +161,3 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react", | ||
}, | ||
"typesPublisherContentHash": "c17adf75e0ce8a2aea840595092cfa07671746c86fd5213d1c3bdd302ab350d9", | ||
"typesPublisherContentHash": "d84865062448a4b06761860f5ba928a0a5244074cd19fd2e7237510577202b2c", | ||
"typeScriptVersion": "4.5", | ||
@@ -164,0 +164,0 @@ "exports": { |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Sun, 01 Oct 2023 10:05:57 GMT | ||
* Last updated: Tue, 10 Oct 2023 18:07:33 GMT | ||
* 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) | ||
@@ -14,0 +14,0 @@ * Global values: `React` |
@@ -30,2 +30,5 @@ /** | ||
declare const UNDEFINED_VOID_ONLY: unique symbol; | ||
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never }; | ||
declare module "." { | ||
@@ -87,2 +90,25 @@ interface ThenableImpl<T> { | ||
export function unstable_useCacheRefresh(): () => void; | ||
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS { | ||
functions: (formData: FormData) => void; | ||
} | ||
export interface TransitionStartFunction { | ||
/** | ||
* Marks all state updates inside the async function as transitions | ||
* | ||
* @see {https://react.dev/reference/react/ts5.0/useTransition#starttransition} | ||
* | ||
* @param callback | ||
*/ | ||
(callback: () => Promise<VoidOrUndefinedOnly>): void; | ||
} | ||
function useOptimistic<State>( | ||
passthrough: State, | ||
): [State, (action: State | ((pendingState: State) => State)) => void]; | ||
function useOptimistic<State, Action>( | ||
passthrough: State, | ||
reducer: (state: State, action: Action) => State, | ||
): [State, (action: Action) => void]; | ||
} |
@@ -118,24 +118,10 @@ /** | ||
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS { | ||
functions: (formData: FormData) => void; | ||
} | ||
export interface TransitionStartFunction { | ||
/** | ||
* Marks all state updates inside the async function as transitions | ||
* | ||
* @see {https://react.dev/reference/react/ts5.0/useTransition#starttransition} | ||
* | ||
* @param callback | ||
*/ | ||
(callback: () => Promise<VoidOrUndefinedOnly>): void; | ||
} | ||
function experimental_useOptimistic<State>( | ||
passthrough: State, | ||
): [State, (action: State | ((pendingState: State) => State)) => void]; | ||
function experimental_useOptimistic<State, Action>( | ||
passthrough: State, | ||
reducer: (state: State, action: Action) => State, | ||
): [State, (action: Action) => void]; | ||
type Reference = object; | ||
type TaintableUniqueValue = string | bigint | ArrayBufferView; | ||
function experimental_taintUniqueValue( | ||
message: string | undefined, | ||
lifetime: Reference, | ||
value: TaintableUniqueValue, | ||
): void; | ||
function experimental_taintObjectReference(message: string | undefined, object: Reference): void; | ||
} |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
365404
7269