serverlessworkflow / sdk-typescript

Typescript SDK for Serverless Workflow
https://serverlessworkflow.io/
Apache License 2.0
64 stars 16 forks source link

Builder doesn't support union types well #89

Closed JBBianchi closed 3 years ago

JBBianchi commented 3 years ago

What happened:

startdefValidator().stateName('foo'); 
// Property 'stateName' does not exist on type 'Builder<Startdef>'.
//  Property 'stateName' does not exist on type '{ build: () => Startdef; } & string'.

What you expected to happen: To work without TS complaining.

How to reproduce it: See What happened

Anything else we need to know?: Will be fixed in an upcoming PR