Skip to content

Commit 0a1e363

Browse files
fix: ts declaration errors
1 parent c63d4da commit 0a1e363

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

index.d.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ declare namespace html {
1414
/**
1515
* A const used to represent a html fragment.
1616
*/
17-
export declare const Fragment: unique symbol
17+
export const Fragment: unique symbol
1818

1919
/**
2020
* Escapes a string for safe use as HTML text content.
@@ -119,19 +119,19 @@ declare namespace html {
119119
/**
120120
* Here for interop with preact and many build systems.
121121
*/
122-
export declare const h = createElement
122+
export const h: typeof createElement
123123

124-
export declare type Children =
124+
export type Children =
125125
| number
126126
| string
127127
| boolean
128128
| null
129129
| undefined
130130
| Children[]
131131

132-
export declare type PropsWithChildren<T = {}> = { children?: Children } & T
132+
export type PropsWithChildren<T = {}> = { children?: Children } & T
133133

134-
export declare type Component<T = {}> = (
134+
export type Component<T = {}> = (
135135
this: void,
136136
props: PropsWithChildren<T>
137137
) => JSX.Element

tsconfig.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@
3333
"noUncheckedIndexedAccess": true,
3434
"noImplicitOverride": true,
3535
"noPropertyAccessFromIndexSignature": true,
36-
"skipDefaultLibCheck": true,
37-
"skipLibCheck": true
36+
"skipDefaultLibCheck": true
3837
},
3938
"include": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.d.ts"]
4039
}

0 commit comments

Comments
 (0)