This commit is contained in:
Asaki Yuki 2026-01-23 15:15:48 +07:00
parent 6817734ed9
commit 99c294a9ba
14 changed files with 19528 additions and 19413 deletions

View file

@ -9,7 +9,7 @@ function toCamelCase(str: string) {
const intelliSense: string[] = [
'import { Type as T } from "../enums/Type.js"\n',
"export type Namespace = keyof IntelliSense;",
"export type Element<T extends Namespace> = IntelliSense[T]",
"export type Element<T extends Namespace> = Extract<keyof IntelliSense[T], string>",
"export type VanillaType<T extends Namespace, K extends Element<T>> = IntelliSense[T][K]\n",
"export type IntelliSense = {",
]

View file

@ -11,7 +11,6 @@ for (const key in schema) {
const data = schema[key]
if (data.enum) {
const enumName = key.match(/\w+$/)?.[0].toCamelCase(true)!
console.log(enumName)
index.push(`export { ${enumName} } from "./${enumName}.js"`)
const count = new Map<string, number>()