Skip to content

Commit

Permalink
Add tsd back
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jan 4, 2023
1 parent afd5841 commit e20d4b4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
},
"scripts": {
"prepack": "npm run build && npm run format",
"build": "tsc --build --clean && tsc --build && type-coverage",
"build": "tsc --build --clean && tsc --build && tsd && type-coverage",
"generate": "node script/generate-jsx.js && node script/build.js",
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
"test-api": "node --conditions development test/index.js",
Expand Down
4 changes: 2 additions & 2 deletions test-d/automatic-h.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* @jsxRuntime automatic */
/* @jsxImportSource .. */
/* @jsxImportSource hastscript */

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

// This is where the automatic runtime differs from the classic runtime.
// The automatic runtime the children prop to define JSX children, whereas it’s used as an attribute in the classic runtime.
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment

expectType<Result>(<a children={<b />} />)

declare function Bar(props?: Record<string, unknown>): Element
Expand Down
4 changes: 2 additions & 2 deletions test-d/automatic-s.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* @jsxRuntime automatic */
/* @jsxImportSource ../svg */
/* @jsxImportSource hastscript/svg */

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

// This is where the automatic runtime differs from the classic runtime.
// The automatic runtime the children prop to define JSX children, whereas it’s used as an attribute in the classic runtime.
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment

expectType<Result>(<a children={<b />} />)

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

0 comments on commit e20d4b4

Please sign in to comment.