Skip to content

Commit

Permalink
Fix TypeScript error: Cannot find name 'Fragment'.
Browse files Browse the repository at this point in the history
  • Loading branch information
jablko committed Aug 19, 2021
1 parent 5025349 commit 0760acb
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 12 deletions.
1 change: 0 additions & 1 deletion packages/loader/types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"module": "commonjs",
"lib": ["dom", "es6"],
"strict": true,
"skipLibCheck": true,
"baseUrl": ".",
"jsx": "react",
"paths": {
Expand Down
1 change: 0 additions & 1 deletion packages/mdx/types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"module": "commonjs",
"lib": ["dom", "es6"],
"strict": true,
"skipLibCheck": true,
"baseUrl": ".",
"jsx": "react",
"paths": {
Expand Down
13 changes: 10 additions & 3 deletions packages/preact/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
// TypeScript Version: 3.4
// TypeScript Version: 3.5

import {h, Context, AnyComponent, Fragment, FunctionComponent} from 'preact'
import {
h,
Context,
AnyComponent,
Fragment,
FunctionComponent,
VNode
} from 'preact'

/**
* Mapping of names for JSX components to React components
Expand Down Expand Up @@ -52,7 +59,7 @@ declare function useMDXComponents(
*/
declare function withMDXComponents(
child: AnyComponent<ComponentsProp>
): ReactElement | null
): VNode | null

/**
* Preact hyperscript function wrapped with handler for MDX content
Expand Down
1 change: 0 additions & 1 deletion packages/preact/types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"module": "commonjs",
"lib": ["dom", "es6"],
"strict": true,
"skipLibCheck": true,
"baseUrl": ".",
"jsx": "react",
"jsxFactory": "h",
Expand Down
2 changes: 1 addition & 1 deletion packages/react/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import {
Context,
Consumer,
ComponentType,
Fragment,
FunctionComponent,
ReactElement,
createElement
Expand Down
1 change: 0 additions & 1 deletion packages/react/types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"module": "commonjs",
"lib": ["dom", "es6"],
"strict": true,
"skipLibCheck": true,
"baseUrl": ".",
"jsx": "react",
"paths": {
Expand Down
1 change: 0 additions & 1 deletion packages/remark-mdx/types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"module": "commonjs",
"lib": ["dom", "es6"],
"strict": true,
"skipLibCheck": true,
"baseUrl": ".",
"jsx": "react",
"paths": {
Expand Down
1 change: 0 additions & 1 deletion packages/runtime/types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"module": "commonjs",
"lib": ["dom", "es6"],
"strict": true,
"skipLibCheck": true,
"baseUrl": ".",
"jsx": "react",
"paths": {
Expand Down
1 change: 0 additions & 1 deletion packages/vue-loader/types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"module": "commonjs",
"lib": ["dom", "es6"],
"strict": true,
"skipLibCheck": true,
"baseUrl": ".",
"jsx": "react",
"paths": {
Expand Down
1 change: 0 additions & 1 deletion packages/vue/types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"module": "commonjs",
"lib": ["dom", "es6"],
"strict": true,
"skipLibCheck": true,
"baseUrl": ".",
"jsx": "react",
"paths": {
Expand Down

0 comments on commit 0760acb

Please sign in to comment.