telescope icon indicating copy to clipboard operation
telescope copied to clipboard

generating map types with uint64 keys yields uncompilable typescript

Open technicallyty opened this issue 7 months ago • 2 comments

when generating proto code that has type of

map<uint64, someotherType> telescope generates uncompilable typescript. map key types can only be a Number 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

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.

technicallyty avatar Jul 08 '24 17:07 technicallyty