Skip to content

Commit

Permalink
Update to use node16 module resolution in tsconfig.json
Browse files Browse the repository at this point in the history
Reviewed-by: Remco Haszing <remcohaszing@gmail.com>
Reviewed-by: Titus Wormer <tituswormer@gmail.com>

Closes GH-723.
  • Loading branch information
ChristianMurphy authored Jan 17, 2023
1 parent e63707f commit d640d40
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
4 changes: 2 additions & 2 deletions lib/ast-to-react.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @typedef {import('hast').DocType} Doctype
* @typedef {import('property-information').Info} Info
* @typedef {import('property-information').Schema} Schema
* @typedef {import('./complex-types').ReactMarkdownProps} ReactMarkdownProps
* @typedef {import('./complex-types.js').ReactMarkdownProps} ReactMarkdownProps
*
* @typedef Raw
* @property {'raw'} type
Expand Down Expand Up @@ -87,7 +87,7 @@
* @property {TableRowComponent|ReactMarkdownNames} tr
* @property {UnorderedListComponent|ReactMarkdownNames} ul
*
* @typedef {Partial<Omit<import('./complex-types').NormalComponents, keyof SpecialComponents> & SpecialComponents>} Components
* @typedef {Partial<Omit<import('./complex-types.js').NormalComponents, keyof SpecialComponents> & SpecialComponents>} Components
*
* @typedef Options
* @property {boolean} [sourcePos=false]
Expand Down
2 changes: 1 addition & 1 deletion test/test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,7 @@ test('should pass index of a node under its parent to components if `includeElem
test('should be able to render components with forwardRef in HOC', () => {
/**
* @typedef {import('react').Ref<HTMLAnchorElement>} Ref
* @typedef {JSX.IntrinsicElements['a'] & import('../lib/ast-to-react').ReactMarkdownProps} Props
* @typedef {JSX.IntrinsicElements['a'] & import('../lib/ast-to-react.js').ReactMarkdownProps} Props
*/

/**
Expand Down
11 changes: 3 additions & 8 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,14 @@
"include": ["lib/**/*.js", "test/**/*.jsx", "test/**/*.js", "index.js"],
"exclude": ["**/*.min.js"],
"compilerOptions": {
"target": "ES2020",
"lib": ["ES2020", "DOM"],
"module": "ES2020",
"moduleResolution": "node",
"target": "es2021",
"lib": ["es2020", "dom"],
"module": "node16",
"jsx": "react",
"allowJs": true,
"checkJs": true,
"declaration": true,
"emitDeclarationOnly": true,
"allowSyntheticDefaultImports": true,
"skipLibCheck": true,
"noImplicitAny": false,
"noImplicitThis": true,
"strict": true
}
}

0 comments on commit d640d40

Please sign in to comment.