Socket
Socket
Sign inDemoInstall

@types/react

Package Overview
Dependencies
Maintainers
1
Versions
601
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/react - npm Package Compare versions

Comparing version 18.2.24 to 18.2.28

26

react/canary.d.ts

@@ -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];
}

30

react/experimental.d.ts

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc