Socket
Socket
Sign inDemoInstall

@types/react

Package Overview
Dependencies
Maintainers
1
Versions
598
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.0.27 to 18.2.6

react/ts5.0/experimental.d.ts

34

react/experimental.d.ts

@@ -41,3 +41,12 @@ /**

declare const UNDEFINED_VOID_ONLY: unique symbol;
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
declare module '.' {
// Need an interface to not cause ReactNode to be a self-referential type.
interface PromiseLikeOfReactNode extends PromiseLike<ReactNode> {}
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_REACT_NODES {
promises: PromiseLikeOfReactNode;
}
export interface SuspenseProps {

@@ -108,3 +117,26 @@ /**

// tslint:disable-next-line ban-types
export function experimental_useEvent<T extends Function>(event: T): T;
export function experimental_useEffectEvent<T extends Function>(event: T): T;
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];
}

@@ -152,2 +152,3 @@ /*

interface FormData {}
interface Text { }

@@ -157,1 +158,3 @@ interface TouchList { }

interface WebGL2RenderingContext { }
interface TrustedHTML { }

@@ -1,2 +0,12 @@

// Expose `JSX` namespace in `global` namespace
import './';
import * as React from './';
export namespace JSX {
interface Element extends React.JSX.Element {}
interface ElementClass extends React.JSX.ElementClass {}
interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<C, P>;
interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
interface IntrinsicClassAttributes<T> extends React.JSX.IntrinsicClassAttributes<T> {}
interface IntrinsicElements extends React.JSX.IntrinsicElements {}
}

@@ -1,2 +0,12 @@

// Expose `JSX` namespace in `global` namespace
import './';
import * as React from './';
export namespace JSX {
interface Element extends React.JSX.Element {}
interface ElementClass extends React.JSX.ElementClass {}
interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<C, P>;
interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
interface IntrinsicClassAttributes<T> extends React.JSX.IntrinsicClassAttributes<T> {}
interface IntrinsicElements extends React.JSX.IntrinsicElements {}
}

4

react/next.d.ts

@@ -58,3 +58,3 @@ /**

interface ServerContextJSONArray extends ReadonlyArray<ServerContextJSONArray> {}
interface ServerContextJSONArray extends ReadonlyArray<ServerContextJSONValue> {}
export type ServerContextJSONValue =

@@ -75,3 +75,3 @@ | string

* @version 16.8.0
* @see https://reactjs.org/docs/hooks-reference.html#usecontext
* @see https://react.dev/reference/react/useContext
*/

@@ -78,0 +78,0 @@ function useContext<T extends ServerContextJSONValue>(context: ServerContext<T>): T;

{
"name": "@types/react",
"version": "18.0.27",
"version": "18.2.6",
"description": "TypeScript definitions for React",

@@ -143,2 +143,9 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",

"types": "index.d.ts",
"typesVersions": {
"<=5.0": {
"*": [
"ts5.0/*"
]
}
},
"repository": {

@@ -155,6 +162,9 @@ "type": "git",

},
"typesPublisherContentHash": "9fe92d5e956ab2c31da7ffe14998f63a047b60ad3535ea9d4c629616fe5f512d",
"typeScriptVersion": "4.2",
"typesPublisherContentHash": "c2bc059f2a425eccfea97f64d97f713fa3727098c1d3ee4e21b0c9d9b5775f19",
"typeScriptVersion": "4.3",
"exports": {
".": {
"types@<=5.0": {
"default": "./ts5.0/index.d.ts"
},
"types": {

@@ -165,2 +175,5 @@ "default": "./index.d.ts"

"./next": {
"types@<=5.0": {
"default": "./ts5.0/next.d.ts"
},
"types": {

@@ -171,2 +184,5 @@ "default": "./next.d.ts"

"./experimental": {
"types@<=5.0": {
"default": "./ts5.0/experimental.d.ts"
},
"types": {

@@ -177,2 +193,5 @@ "default": "./experimental.d.ts"

"./jsx-runtime": {
"types@<=5.0": {
"default": "./ts5.0/jsx-runtime.d.ts"
},
"types": {

@@ -183,2 +202,5 @@ "default": "./jsx-runtime.d.ts"

"./jsx-dev-runtime": {
"types@<=5.0": {
"default": "./ts5.0/jsx-dev-runtime.d.ts"
},
"types": {

@@ -185,0 +207,0 @@ "default": "./jsx-dev-runtime.d.ts"

@@ -5,3 +5,3 @@ # Installation

# Summary
This package contains type definitions for React (http://facebook.github.io/react/).
This package contains type definitions for React (https://react.dev/).

@@ -12,3 +12,3 @@ # Details

### Additional Details
* Last updated: Wed, 18 Jan 2023 19:02:49 GMT
* Last updated: Sat, 06 May 2023 11:32:49 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)

@@ -15,0 +15,0 @@ * Global values: `React`

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc