modiimedia / arri

Arri RPC is a code-first RPC framework for end-to-end type safety in any language
MIT License
43 stars 3 forks source link

[ts-codegen] Generated SSE procedures should have a return type annotation #55

Closed joshmossas closed 5 months ago

joshmossas commented 5 months ago

Environment arri v0.45.4 node 20.12.2

Reproduction N/A

Describe the bug Generated clients with SSE procedures produce this TS error

The inferred type of '<procedure-name>' cannot be named without a reference to '.pnpm/event-source-plus@0.0.6/node_modules/event-source-plus'. This is likely not portable. A type annotation is necessary.

Additional context The fix is to have generated code add a return type annotation and import from event-source-plus

joshmossas commented 5 months ago

fix in v0.45.5