-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
Bug Description:
The errors below were seen when typescript was updated to the latest v5.x:
tsp-typescript-client:
tsp-typescript-client: tsp-typescript-client: $ tsc
Error: tsp-typescript-client: src/protocol/serialization.ts(153,19): error TS2322: Type 'any[]' is not assignable to type 'T'.
tsp-typescript-client: 'T' could be instantiated with an arbitrary type which could be unrelated to 'any[]'.
Error: tsp-typescript-client: src/protocol/serialization.ts(169,11): error TS2322: Type 'Deserialized<T> & {}' is not assignable to type 'T'.
tsp-typescript-client: 'T' could be instantiated with an arbitrary type which could be unrelated to 'Deserialized<T> & {}'.
tsp-typescript-client:
tsp-typescript-client: tsp-typescript-client: error Command failed with exit code 2.
Seems related to microsoft/TypeScript#56941.
Reading quickly it seems that TypeScript, starting around v5.8.x, became more strict about generic types used in return statements. I think that fixing this would entail making a couple of return types "tighter" to satisfy the new check.
Steps to Reproduce:
- Update the version range for dependency typescript to the latest v5.x
- try to build
- see if you get typescript error TS2322
Additional Information
- Operating System:
Metadata
Metadata
Assignees
Labels
No labels