ElectroDB requires every access pattern sharing a collection name to compose the same partition key (https://electrodb.dev/en/modeling/collections/). Nothing in src/decorators/$index.ts or src/emitter.ts checks this at compile time — a mismatch currently only surfaces at runtime, when ElectroDB's Service constructor throws.
Requesting a compile-time diagnostic: when two @index access patterns on entities in the same service declare the same collection but a different composite partition key, tsp compile should report it directly, rather than deferring the failure to whenever the generated code first constructs the Service.
ElectroDB requires every access pattern sharing a
collectionname to compose the same partition key (https://electrodb.dev/en/modeling/collections/). Nothing insrc/decorators/$index.tsorsrc/emitter.tschecks this at compile time — a mismatch currently only surfaces at runtime, when ElectroDB'sServiceconstructor throws.Requesting a compile-time diagnostic: when two
@indexaccess patterns on entities in the same service declare the samecollectionbut a different composite partition key,tsp compileshould report it directly, rather than deferring the failure to whenever the generated code first constructs theService.