-
Notifications
You must be signed in to change notification settings - Fork 399
Open
Labels
Description
When making schema changes that affect TypeScript type definitions, dev-call build-artifacts fails type checking before it can regenerate the types - a chicken-and-egg problem.
Example
Adding a new option to logo-light-dark-specifier in definitions.yml:
- id: logo-light-dark-specifier
anyOf:
- enum: [false] # NEW
- ref: logo-specifierThen updating code to handle the new option:
if (spec === false) {
return undefined;
}Running build-artifacts fails:
TS2367 [ERROR]: This comparison appears to be unintentional because the types
'string | objectOutputType<...>' and 'boolean' have no overlap.
if (spec === false) {
~~~~~~~~~~~~~~
The types haven't been regenerated yet, so TypeScript doesn't know spec can be false.
Current workaround
Add // @ts-ignore temporarily, run build-artifacts, then remove the comment.
Suggestion
We could add a --no-check flag to dev-call build-artifacts that passes through to Deno, allowing type regeneration to proceed despite temporary type mismatches.