File tree Expand file tree Collapse file tree 5 files changed +15
-15
lines changed
Expand file tree Collapse file tree 5 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ declare namespace preact {
100100}
101101
102102// export default React;
103- export = React ;
103+ export default React ;
104104export as namespace React ;
105105declare namespace React {
106106 // Export JSX
Original file line number Diff line number Diff line change 1- import {
1+ import type {
22 Component as PreactComponent ,
33 VNode as PreactVNode ,
44 FunctionComponent as PreactFunctionComponent ,
55 PreactElement
6- } from '../../src/internal' ;
7- import { SuspenseProps } from './suspense' ;
6+ } from '../../src/internal.d.ts ' ;
7+ import type { SuspenseProps } from './suspense.d.ts ' ;
88
9- export { ComponentChildren } from '../.. ' ;
9+ export type { ComponentChildren } from 'preact ' ;
1010
1111export { PreactElement } ;
1212
Original file line number Diff line number Diff line change 1- import {
1+ import type {
22 Options as PreactOptions ,
33 Component as PreactComponent ,
44 VNode as PreactVNode ,
55 PreactContext ,
66 HookType ,
77 ErrorInfo
8- } from '../../src/internal' ;
9- import { Reducer , StateUpdater } from '.' ;
8+ } from '../../src/internal.d.ts ' ;
9+ import type { Reducer , StateUpdater } from './index.d.ts ' ;
1010
1111export { PreactContext } ;
1212
Original file line number Diff line number Diff line change 99 "moduleResolution" : " node" ,
1010 "resolveJsonModule" : true ,
1111 "paths" : {
12- "preact" : [" ." ],
12+ "preact" : [" ./src/index.d.ts " ],
1313 "preact/*" : [" ./*" ]
1414 },
1515 "target" : " es5" ,
Original file line number Diff line number Diff line change 11export as namespace preact ;
22
3- import { JSXInternal } from './jsx.js ' ;
4- import { DOMAttributes , HTMLAttributes , SVGAttributes } from './dom.js ' ;
3+ import type { JSXInternal } from './jsx.d.ts ' ;
4+ import type { DOMAttributes , HTMLAttributes , SVGAttributes } from './dom.d.ts ' ;
55
6- export import JSX = JSXInternal ;
7- export * from './dom.js ' ;
6+ export { JSXInternal as JSX }
7+ export type * from './dom.d.ts ' ;
88
99//
1010// Preact Virtual DOM
@@ -230,7 +230,7 @@ export function createElement<P>(
230230 ...children : ComponentChildren [ ]
231231) : VNode < P > ;
232232export namespace createElement {
233- export import JSX = JSXInternal ;
233+ export { JSXInternal as JSX } ;
234234}
235235
236236export function h (
@@ -280,7 +280,7 @@ export function h<P>(
280280 ...children : ComponentChildren [ ]
281281) : VNode < Attributes & P > ;
282282export namespace h {
283- export import JSX = JSXInternal ;
283+ export { JSXInternal as JSX } ;
284284}
285285
286286//
You can’t perform that action at this time.
0 commit comments