Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit 0fc3cb0

Browse files
committed
chore: fix global types generation
1 parent ccd188d commit 0fc3cb0

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

env.d.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import type { HTMLAttributes, VNode } from "vue"
2+
import type { ChakraProps } from "@chakra-ui/vue-system"
3+
4+
declare global {
5+
namespace h.JSX {
6+
interface Element extends VNode {}
7+
interface ElementClass {
8+
$props: {}
9+
}
10+
interface ElementAttributesProperty {
11+
$props: {}
12+
}
13+
14+
interface IntrinsicAttributes
15+
extends Omit<HTMLAttributes, "color">,
16+
ChakraProps {}
17+
}
18+
}

scripts/generate-global-types.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,24 @@ type ComponentsImport = typeof ChakraComponents
1313

1414
async function generateComponents() {
1515
let code = `
16+
import type { HTMLAttributes, VNode } from "vue";
17+
import type { ChakraProps } from "@chakra-ui/vue-system";
18+
19+
declare global {
20+
namespace h.JSX {
21+
interface Element extends VNode {}
22+
interface ElementClass {
23+
$props: {}
24+
}
25+
interface ElementAttributesProperty {
26+
$props: {}
27+
}
28+
29+
interface IntrinsicAttributes
30+
extends Omit<HTMLAttributes, "color">,
31+
ChakraProps {}
32+
}
33+
}
1634
`
1735

1836
for (const component in ChakraComponents) {

0 commit comments

Comments
 (0)