The declared class for an entity, with the ONE shared degradation.
Every table this repo builds implements getExactTypeName: the parser
transport and @ifc-lite/cache's reader both construct theirs through
entityTableFromColumns, and apps/viewer/src/utils/serverEntityTable.ts
implements it on its own literal. The member is nonetheless OPTIONAL, for
two reasons that outlive that list:
EntityTable is a published @ifc-lite/data type. Requiring a new
method breaks every implementer outside this repo at once, and buys
nothing the fallback below does not already give them.
Requiring it would not actually enforce it here either. The partial
EntityTable doubles across the repo's tests reach the type through
as unknown as EntityTable, which satisfies the compiler while supplying
no such method at runtime; an optional call is what keeps those honest
instead of throwing.
So the degradation lives here, once. Every caller would otherwise pick its
own fallback, and two callers picking different ones is how one model
exports inconsistently. getTypeName is the honest fallback: a table that
never tracked the parsed name knows nothing more exact than its enum.
The declared class for an entity, with the ONE shared degradation.
Every table this repo builds implements
getExactTypeName: the parser transport and@ifc-lite/cache's reader both construct theirs throughentityTableFromColumns, andapps/viewer/src/utils/serverEntityTable.tsimplements it on its own literal. The member is nonetheless OPTIONAL, for two reasons that outlive that list:EntityTableis a published@ifc-lite/datatype. Requiring a new method breaks every implementer outside this repo at once, and buys nothing the fallback below does not already give them.EntityTabledoubles across the repo's tests reach the type throughas unknown as EntityTable, which satisfies the compiler while supplying no such method at runtime; an optional call is what keeps those honest instead of throwing.So the degradation lives here, once. Every caller would otherwise pick its own fallback, and two callers picking different ones is how one model exports inconsistently.
getTypeNameis the honest fallback: a table that never tracked the parsed name knows nothing more exact than its enum.