@types/react 18.2.46 → 18.2.47

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.
Files changed (3) hide show
  1. react/README.md +1 -1
  2. react/index.d.ts +9 -8
  3. react/package.json +2 -2
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: Thu, 28 Dec 2023 15:06:50 GMT
11
+ * Last updated: Sat, 06 Jan 2024 09:35:38 GMT
12
12
  * Dependencies: [@types/prop-types](https://npmjs.com/package/@types/prop-types), [@types/scheduler](https://npmjs.com/package/@types/scheduler), [csstype](https://npmjs.com/package/csstype)
13
13
 
14
14
  # Credits
react/index.d.ts CHANGED
@@ -148,6 +148,9 @@ declare namespace React {
148
148
  ref?: LegacyRef<T> | undefined;
149
149
  }
150
150
 
151
+ /**
152
+ * @deprecated Use `ComponentElement<P, ClassicComponent<P, any>>` instead.
153
+ */
151
154
  type ClassicElement<P> = CElement<P, ClassicComponent<P, ComponentState>>;
152
155
 
153
156
  // string fallback for custom web-components
@@ -269,9 +272,6 @@ declare namespace React {
269
272
 
270
273
  // Custom components
271
274
  function createFactory<P>(type: FunctionComponent<P>): FunctionComponentFactory<P>;
272
- function createFactory<P>(
273
- type: ClassType<P, ClassicComponent<P, ComponentState>, ClassicComponentClass<P>>,
274
- ): CFactory<P, ClassicComponent<P, ComponentState>>;
275
275
  function createFactory<P, T extends Component<P, ComponentState>, C extends ComponentClass<P>>(
276
276
  type: ClassType<P, T, C>,
277
277
  ): CFactory<P, T>;
@@ -307,11 +307,6 @@ declare namespace React {
307
307
  props?: Attributes & P | null,
308
308
  ...children: ReactNode[]
309
309
  ): FunctionComponentElement<P>;
310
- function createElement<P extends {}>(
311
- type: ClassType<P, ClassicComponent<P, ComponentState>, ClassicComponentClass<P>>,
312
- props?: ClassAttributes<ClassicComponent<P, ComponentState>> & P | null,
313
- ...children: ReactNode[]
314
- ): CElement<P, ClassicComponent<P, ComponentState>>;
315
310
  function createElement<P extends {}, T extends Component<P, ComponentState>, C extends ComponentClass<P>>(
316
311
  type: ClassType<P, T, C>,
317
312
  props?: ClassAttributes<T> & P | null,
@@ -545,6 +540,9 @@ declare namespace React {
545
540
 
546
541
  class PureComponent<P = {}, S = {}, SS = any> extends Component<P, S, SS> {}
547
542
 
543
+ /**
544
+ * @deprecated Use `ClassicComponent` from `create-react-class`
545
+ */
548
546
  interface ClassicComponent<P = {}, S = {}> extends Component<P, S> {
549
547
  replaceState(nextState: S, callback?: () => void): void;
550
548
  isMounted(): boolean;
@@ -612,6 +610,9 @@ declare namespace React {
612
610
  displayName?: string | undefined;
613
611
  }
614
612
 
613
+ /**
614
+ * @deprecated Use `ClassicComponentClass` from `create-react-class`
615
+ */
615
616
  interface ClassicComponentClass<P = {}> extends ComponentClass<P> {
616
617
  new(props: P, context?: any): ClassicComponent<P, ComponentState>;
617
618
  getDefaultProps?(): P;
react/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react",
3
- "version": "18.2.46",
3
+ "version": "18.2.47",
4
4
  "description": "TypeScript definitions for react",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",
6
6
  "license": "MIT",
@@ -201,6 +201,6 @@
201
201
  "@types/scheduler": "*",
202
202
  "csstype": "^3.0.2"
203
203
  },
204
- "typesPublisherContentHash": "9ab41da0d8ef1418c01f1176d751f434d2fe97b4abf39eed1b8cb12dfb603b05",
204
+ "typesPublisherContentHash": "4d5bb16e7ec79da2c8b7ea8a4b8f99ac0843cf9d2bfa1166de5ef25823d3bd67",
205
205
  "typeScriptVersion": "4.6"
206
206
  }