@types/react 18.2.46 → 18.2.48

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.
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: Mon, 15 Jan 2024 09:07:05 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;
@@ -2455,10 +2456,10 @@ declare namespace React {
2455
2456
 
2456
2457
  interface MetaHTMLAttributes<T> extends HTMLAttributes<T> {
2457
2458
  charSet?: string | undefined;
2459
+ content?: string | undefined;
2458
2460
  httpEquiv?: string | undefined;
2459
- name?: string | undefined;
2460
2461
  media?: string | undefined;
2461
- content?: string | undefined;
2462
+ name?: string | undefined;
2462
2463
  }
2463
2464
 
2464
2465
  interface MeterHTMLAttributes<T> extends HTMLAttributes<T> {
react/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/react",
3
- "version": "18.2.46",
3
+ "version": "18.2.48",
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": "fc13b2b40312ff0746a89155473d332ecb923a60c52ab414c3711f90c1230bbe",
205
205
  "typeScriptVersion": "4.6"
206
206
  }
react/ts5.0/index.d.ts CHANGED
@@ -2458,9 +2458,10 @@ declare namespace React {
2458
2458
 
2459
2459
  interface MetaHTMLAttributes<T> extends HTMLAttributes<T> {
2460
2460
  charSet?: string | undefined;
2461
+ content?: string | undefined;
2461
2462
  httpEquiv?: string | undefined;
2462
- name?: string | undefined;
2463
2463
  media?: string | undefined;
2464
+ name?: string | undefined;
2464
2465
  }
2465
2466
 
2466
2467
  interface MeterHTMLAttributes<T> extends HTMLAttributes<T> {