Skip to content

Commit d640d40

Browse files
authoredJan 17, 2023
Update to use node16 module resolution in tsconfig.json
Reviewed-by: Remco Haszing <remcohaszing@gmail.com> Reviewed-by: Titus Wormer <tituswormer@gmail.com> Closes GH-723.
1 parent e63707f commit d640d40

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed
 

‎lib/ast-to-react.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* @typedef {import('hast').DocType} Doctype
2020
* @typedef {import('property-information').Info} Info
2121
* @typedef {import('property-information').Schema} Schema
22-
* @typedef {import('./complex-types').ReactMarkdownProps} ReactMarkdownProps
22+
* @typedef {import('./complex-types.js').ReactMarkdownProps} ReactMarkdownProps
2323
*
2424
* @typedef Raw
2525
* @property {'raw'} type
@@ -87,7 +87,7 @@
8787
* @property {TableRowComponent|ReactMarkdownNames} tr
8888
* @property {UnorderedListComponent|ReactMarkdownNames} ul
8989
*
90-
* @typedef {Partial<Omit<import('./complex-types').NormalComponents, keyof SpecialComponents> & SpecialComponents>} Components
90+
* @typedef {Partial<Omit<import('./complex-types.js').NormalComponents, keyof SpecialComponents> & SpecialComponents>} Components
9191
*
9292
* @typedef Options
9393
* @property {boolean} [sourcePos=false]

‎test/test.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,7 @@ test('should pass index of a node under its parent to components if `includeElem
11581158
test('should be able to render components with forwardRef in HOC', () => {
11591159
/**
11601160
* @typedef {import('react').Ref<HTMLAnchorElement>} Ref
1161-
* @typedef {JSX.IntrinsicElements['a'] & import('../lib/ast-to-react').ReactMarkdownProps} Props
1161+
* @typedef {JSX.IntrinsicElements['a'] & import('../lib/ast-to-react.js').ReactMarkdownProps} Props
11621162
*/
11631163

11641164
/**

‎tsconfig.json

+3-8
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,14 @@
22
"include": ["lib/**/*.js", "test/**/*.jsx", "test/**/*.js", "index.js"],
33
"exclude": ["**/*.min.js"],
44
"compilerOptions": {
5-
"target": "ES2020",
6-
"lib": ["ES2020", "DOM"],
7-
"module": "ES2020",
8-
"moduleResolution": "node",
5+
"target": "es2021",
6+
"lib": ["es2020", "dom"],
7+
"module": "node16",
98
"jsx": "react",
10-
"allowJs": true,
119
"checkJs": true,
1210
"declaration": true,
1311
"emitDeclarationOnly": true,
14-
"allowSyntheticDefaultImports": true,
1512
"skipLibCheck": true,
16-
"noImplicitAny": false,
17-
"noImplicitThis": true,
1813
"strict": true
1914
}
2015
}

0 commit comments

Comments
 (0)
Please sign in to comment.