Skip to content

Commit e20d4b4

Browse files
committed
Add tsd back
1 parent afd5841 commit e20d4b4

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
},
8080
"scripts": {
8181
"prepack": "npm run build && npm run format",
82-
"build": "tsc --build --clean && tsc --build && type-coverage",
82+
"build": "tsc --build --clean && tsc --build && tsd && type-coverage",
8383
"generate": "node script/generate-jsx.js && node script/build.js",
8484
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
8585
"test-api": "node --conditions development test/index.js",

test-d/automatic-h.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* @jsxRuntime automatic */
2-
/* @jsxImportSource .. */
2+
/* @jsxImportSource hastscript */
33

44
import {expectType, expectError} from 'tsd'
55
import type {Root, Element} from 'hast'
@@ -49,7 +49,7 @@ expectError(<a invalid={[true]} />)
4949

5050
// This is where the automatic runtime differs from the classic runtime.
5151
// The automatic runtime the children prop to define JSX children, whereas it’s used as an attribute in the classic runtime.
52-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
52+
5353
expectType<Result>(<a children={<b />} />)
5454

5555
declare function Bar(props?: Record<string, unknown>): Element

test-d/automatic-s.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* @jsxRuntime automatic */
2-
/* @jsxImportSource ../svg */
2+
/* @jsxImportSource hastscript/svg */
33

44
import {expectType, expectError} from 'tsd'
55
import type {Root, Element} from 'hast'
@@ -39,7 +39,7 @@ expectError(<a invalid={[true]} />)
3939

4040
// This is where the automatic runtime differs from the classic runtime.
4141
// The automatic runtime the children prop to define JSX children, whereas it’s used as an attribute in the classic runtime.
42-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
42+
4343
expectType<Result>(<a children={<b />} />)
4444

4545
declare function Bar(props?: Record<string, unknown>): Element

0 commit comments

Comments
 (0)