fix(seed): use typeof on enum.enumValues for db build
TS2749: enumValues is a value, not a type — wrap with typeof before indexing. Also extends Lint & Typecheck CI job to run pnpm --filter @groombook/db typecheck so this class of error is caught at lint time rather than Docker build time. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -32,7 +32,9 @@ jobs:
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Typecheck
|
||||
run: pnpm --filter @groombook/api typecheck
|
||||
run: |
|
||||
pnpm --filter @groombook/api typecheck
|
||||
pnpm --filter @groombook/db typecheck
|
||||
|
||||
- name: Lint
|
||||
run: pnpm --filter @groombook/api lint
|
||||
|
||||
@@ -287,8 +287,8 @@ const preferredCutPool: string[] = [
|
||||
"Full Groom",
|
||||
];
|
||||
|
||||
type CoatType = schema.coatTypeEnum.enumValues[number];
|
||||
type PetSizeCategory = schema.petSizeCategoryEnum.enumValues[number];
|
||||
type CoatType = (typeof schema.coatTypeEnum.enumValues)[number];
|
||||
type PetSizeCategory = (typeof schema.petSizeCategoryEnum.enumValues)[number];
|
||||
|
||||
const coatTypePool: CoatType[] = ["short", "medium", "long", "double", "wire", "silky", "curly", "hairless"];
|
||||
const petSizeCategoryPool: PetSizeCategory[] = ["small", "medium", "large", "extra_large"];
|
||||
|
||||
Reference in New Issue
Block a user