Open Ange-FE opened 1 year ago
Hi, please excuse us that we haven't got chance to fix this yet. There's a work around for this:
tsDisable: {
patterns: ["**/tx.registry.ts"],
}
We can use tsDisable for compilation errors in files.
Hope this could help
Thank you very much!
recently we posted this PR for this: https://github.com/cosmology-tech/telescope/pull/488
I have noticed that version 1.0.11 has issues again with generating the types with different writer types
Ok...I believe with these configs there shouldn't be the problem:
prototypes.typingsFormat.useTelescopeGeneratedType: true prototypes.enableRegistryLoader: false
Still getting this issue myself
My solution was to turn off options.interfaces.enabled
while enabling options.prototypes.typingsFormat.useTelescopeGeneratedType
:
telescope({
protoDirs,
outPath,
options: {
interfaces: {
- enabled: true,
+ enabled: false,
useUnionTypes: false,
},
prototypes: {
includePackageVar: false,
addTypeUrlToDecoders: true,
typingsFormat: {
useDeepPartial: false,
useExact: false,
timestamp: 'timestamp',
duration: 'duration',
+ useTelescopeGeneratedType: true,
},
methods: { toJSON: true, fromJSON: true },
},
lcdClients: { enabled: false },
rpcClients: { enabled: false },
},
})
Simply setting useTelescopeGeneratedType=true
fixed it for me with telescope v1.8.3
Transpile generating types with different writers resulting in code that cannot be used due to mismatch of types,
Type error: Type '{ typeUrl: string; encode(message: MsgGrant, writer?: BinaryWriter): BinaryWriter; decode(input: Uint8Array | BinaryReader, length?: number): MsgGrant; ... 7 more ...; toProtoMsg(message: MsgGrant): MsgGrantProtoMsg; }' is not assignable to type 'GeneratedType'.
steps to replicate: