Skip to content

Commit c4ef948

Browse files
committed
Fix type
1 parent 067f24d commit c4ef948

File tree

3 files changed

+1363
-462
lines changed

3 files changed

+1363
-462
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"changes":{"package.json":"Patch"},"note":"Fix type","date":"2025-11-12T00:37:20.435405800Z"}

build.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,21 +134,22 @@ output += `export type Pseudos = AdvancedPseudos | SimplePseudos\n`
134134

135135
output += `export interface StandardProperties extends StandardLonghandProperties,StandardShorthandProperties{}
136136
export interface VendorProperties extends VendorLonghandProperties,VendorShorthandProperties{}
137-
export interface Properties extends StandardProperties,VendorProperties{}\n`
137+
export interface Properties extends StandardProperties,VendorProperties{}
138+
export type Globals = "-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset"\n`
138139

139140
output += `export namespace Property {\n`
140141
for (const [property, value] of standardLonghandProperties) {
141-
output += ` export type ${toPascalCase(property)} = ${convertType(value.syntax, syntaxes)};\n`
142+
output += ` export type ${toPascalCase(property)} = ${convertType(value.syntax, syntaxes)} | Globals | (string & {})\n`
142143
}
143144
for (const [property, value] of standardShorthandProperties) {
144-
output += ` export type ${toPascalCase(property)} = ${convertType(value.syntax, syntaxes)};\n`
145+
output += ` export type ${toPascalCase(property)} = ${convertType(value.syntax, syntaxes)} | Globals | (string & {})\n`
145146
}
146147

147148
for (const [property, value] of vendorLonghandProperties) {
148-
output += ` export type ${toPascalCase(property)} = ${convertType(value.syntax, syntaxes)};\n`
149+
output += ` export type ${toPascalCase(property)} = ${convertType(value.syntax, syntaxes)} | Globals | (string & {})\n`
149150
}
150151
for (const [property, value] of vendorShorthandProperties) {
151-
output += ` export type ${toPascalCase(property)} = ${convertType(value.syntax, syntaxes)};\n`
152+
output += ` export type ${toPascalCase(property)} = ${convertType(value.syntax, syntaxes)} | Globals | (string & {})\n`
152153
}
153154

154155
output += `}\n`

0 commit comments

Comments
 (0)