Open technicallyty opened 2 weeks ago
when generating proto code that has type of
map<uint64, someotherType> telescope generates uncompilable typescript. map key types can only be a Number type.
map<uint64, someotherType>
Number
example here:
https://github.com/technicallyty/telescope-test/blob/4a69452e6587c1a0de70069dd774a227cf4adfde/src/codegen/cosmos/auth/v1beta1/auth.ts#L124
that line produces an error:
this is the message it generated from:
message Foo { map<uint64, string> bar = 1; }
docs here say we can use long or bigint for 64 bit integer types, however neither type is valid when used in a map as key.
if both bigint or long's not valid key type, then we need to fix this using string as the key type and do the converting in this case:
when generating proto code that has type of
map<uint64, someotherType>
telescope generates uncompilable typescript. map key types can only be aNumber
type.example here:
https://github.com/technicallyty/telescope-test/blob/4a69452e6587c1a0de70069dd774a227cf4adfde/src/codegen/cosmos/auth/v1beta1/auth.ts#L124
that line produces an error:![image](https://github.com/user-attachments/assets/461f3327-a0ee-45d6-ace8-d1dcba18e7f3)
this is the message it generated from:
docs here say we can use long or bigint for 64 bit integer types, however neither type is valid when used in a map as key.