restatedev / sdk-typescript

Restate SDK for JavaScript/Typescript
MIT License
46 stars 8 forks source link

Skip JSON serialization in `ctx.run` #410

Closed slinkydeveloper closed 1 month ago

slinkydeveloper commented 2 months ago

ctx.run now enforces JSON serialization, but we should provide some way to just serialize bytes.

One idea could be to just have some options on the ctx.run to specify raw output:

ctx.run(closure, {raw: true})

From discussion: https://discord.com/channels/1128210118216007792/1136316066696532069/1268769376115363930

slinkydeveloper commented 1 month ago

Solved by https://github.com/restatedev/sdk-typescript/commit/38fa97cfca0b3aaa970ce843c15f918c9541b718