chore: Update the builder to ignore the original naming

This commit is contained in:
BluJ
2023-04-30 15:00:20 -06:00
parent ec7f8beac8
commit cb89f3a65f
3 changed files with 24 additions and 23 deletions

View File

@@ -38,12 +38,14 @@ export default async function makeFileContentFromOld(
const data = await inputData
const namedConsts = new Set(["Config", "Value", "List"])
const configName = newConst("InputSpec", convertInputSpec(data))
const configName = newConst("ConfigSpec", convertInputSpec(data))
const configMatcherName = newConst(
"matchInputSpec",
"matchConfigSpec",
`${configName}.validator()`,
)
outputLines.push(`export type InputSpec = typeof ${configMatcherName}._TYPE;`)
outputLines.push(
`export type ConfigSpec = typeof ${configMatcherName}._TYPE;`,
)
return outputLines.join("\n")