File tree Expand file tree Collapse file tree 3 files changed +11
-14
lines changed Expand file tree Collapse file tree 3 files changed +11
-14
lines changed Original file line number Diff line number Diff line change 6
6
7
7
/* eslint-env browser */
8
8
9
- // @ts -expect-error: TS in VS Code doesn’t seem to infer this.
10
- import * as hastscript from 'https://esm.sh/hastscript@8?dev'
11
-
12
- /** @type {typeof import('hastscript').h } */
13
- const h = hastscript . h
14
- /** @type {typeof import('hastscript').s } */
15
- const s = hastscript . s
9
+ import { h , s } from 'https://esm.sh/hastscript@8?dev'
16
10
17
11
export function createTree ( ) {
18
12
return h ( 'div' , [
Original file line number Diff line number Diff line change @@ -25,13 +25,16 @@ import {renderToStaticMarkup} from 'react-dom/server'
25
25
// @ts -expect-error: ESM types are wrong.
26
26
const Sval = sval . default
27
27
28
- /** @type {{Fragment: Fragment, jsx: Jsx, jsxs: Jsx} } */
29
- // @ts -expect-error: the react types are missing.
30
- const production = { Fragment : prod . Fragment , jsx : prod . jsx , jsxs : prod . jsxs }
28
+ const production = /** @type {{Fragment: Fragment, jsx: Jsx, jsxs: Jsx} } */ ( {
29
+ Fragment : prod . Fragment ,
30
+ jsx : prod . jsx ,
31
+ jsxs : prod . jsxs
32
+ } )
31
33
32
- /** @type {{Fragment: Fragment, jsxDEV: JsxDev} } */
33
- // @ts -expect-error: the react types are missing.
34
- const development = { Fragment : dev . Fragment , jsxDEV : dev . jsxDEV }
34
+ const development = /** @type {{Fragment: Fragment, jsxDEV: JsxDev} } */ ( {
35
+ Fragment : dev . Fragment ,
36
+ jsxDEV : dev . jsxDEV
37
+ } )
35
38
36
39
test ( 'core' , async function ( t ) {
37
40
await t . test ( 'should expose the public api' , async function ( ) {
Original file line number Diff line number Diff line change 11
11
"target" : " es2022"
12
12
},
13
13
"exclude" : [" coverage/" , " node_modules/" ],
14
- "include" : [" **/**.js" , " lib/components.d.ts" ]
14
+ "include" : [" **/**.js" , " lib/components.d.ts" , " types.d.ts " ]
15
15
}
You can’t perform that action at this time.
0 commit comments