@types/mdx 2.0.1 → 2.0.2

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. mdx/README.md +1 -1
  2. mdx/package.json +2 -2
  3. mdx/types.d.ts +10 -11
mdx/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for mdx (https://github.com/mdx-js/mdx).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mdx.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Sun, 17 Oct 2021 19:31:17 GMT
11
+ * Last updated: Sun, 15 May 2022 17:31:38 GMT
12
12
  * Dependencies: none
13
13
  * Global values: none
14
14
 
mdx/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/mdx",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "TypeScript definitions for mdx",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mdx",
6
6
  "license": "MIT",
@@ -30,6 +30,6 @@
30
30
  },
31
31
  "scripts": {},
32
32
  "dependencies": {},
33
- "typesPublisherContentHash": "b7ee723a8e8a51357fdba1928d23f2f6d00238c340cc18b185941482b711ee00",
33
+ "typesPublisherContentHash": "467f698d026a57d65a5a8538bc047c19acb24e5dcf50e19e9dcee6f5666baf75",
34
34
  "typeScriptVersion": "3.9"
35
35
  }
mdx/types.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // Internal helper types
2
2
 
3
3
  // tslint:disable-next-line: strict-export-declare-modifiers
4
- type FunctionComponent<Props> = (props: Props) => JSX.Element;
4
+ type FunctionComponent<Props> = (props: Props) => JSX.Element | null;
5
5
  // tslint:disable-next-line: strict-export-declare-modifiers
6
6
  type ClassComponent<Props> = new (props: Props) => JSX.ElementClass;
7
7
  // tslint:disable-next-line: strict-export-declare-modifiers
@@ -18,15 +18,14 @@ interface NestedMDXComponents {
18
18
  *
19
19
  * The key is the name of the element to override. The value is the component to render instead.
20
20
  */
21
- export type MDXComponents = NestedMDXComponents &
22
- {
23
- [Key in keyof JSX.IntrinsicElements]?: Component<JSX.IntrinsicElements[Key]> | keyof JSX.IntrinsicElements;
24
- } & {
25
- /**
26
- * If a wrapper component is defined, the MDX content will be wrapped inside of it.
27
- */
28
- wrapper?: Component<any>;
29
- };
21
+ export type MDXComponents = NestedMDXComponents & {
22
+ [Key in keyof JSX.IntrinsicElements]?: Component<JSX.IntrinsicElements[Key]> | keyof JSX.IntrinsicElements;
23
+ } & {
24
+ /**
25
+ * If a wrapper component is defined, the MDX content will be wrapped inside of it.
26
+ */
27
+ wrapper?: Component<any>;
28
+ };
30
29
 
31
30
  /**
32
31
  * The props that may be passed to an MDX component.
@@ -47,7 +46,7 @@ export interface MDXProps {
47
46
  /**
48
47
  * The type of the default export of an MDX module.
49
48
  */
50
- export type MDXContent = FunctionComponent<MDXProps>;
49
+ export type MDXContent = (props: MDXProps) => JSX.Element;
51
50
 
52
51
  /**
53
52
  * A generic MDX module type.