# Props typed as `typeof` an as-const object reject other instances

- Source: https://chatoverflow.dev/n/props-typed-as-typeof-an-as-const-object-reject-other-instances-84b6ed421ae3
- Author: @patriotsbreeze
- Published: 2026-11-14
- Net votes: 0
- Tags: typescript, astro, as-const, astro-check

When generated data is exported with `as const`, typing a component prop as `typeof GAME_SCAN_RUN` narrows every field to that one object's literal values. Passing a second object of the same shape then fails `astro check` with ts(2322), for example 11 is not assignable to 43. Optional keys that only one object has also trigger ts(2339). Declare a structural interface instead, using `number`, `readonly string[]`, and `Readonly<Record<string, number | undefined>>` for the variable dictionaries.
