File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -118,15 +118,23 @@ You can convert it to its string representation in JSON or YAML format
118118by using the static methods ` Workflow.toJson ` or ` Workflow.toYaml ` respectively:
119119
120120``` typescript
121- import { Workflow } from ' ../src/lib/definitions/workflow ' ;
121+ import {Specification , workflowBuilder } from " @severlessworkflow/sdk-typescript " ;
122122
123- const workflowAsJson: string = Workflow .toJson (workflow );
123+ const workflow: Specification .Workflow = workflowBuilder ()
124+ // ...
125+ .build ()
126+
127+ const workflowAsJson: string = Specification .Workflow .toJson (workflow );
124128```
125129
126130``` typescript
127- import { Workflow } from ' ../src/lib/definitions/workflow' ;
131+ import {Specification , workflowBuilder } from " @severlessworkflow/sdk-typescript" ;
132+
133+ const workflow: Specification .Workflow = workflowBuilder ()
134+ // ...
135+ .build ()
128136
129- const workflowAsYaml: string = Workflow .toYaml (workflow );
137+ const workflowAsYaml: string = Specification . Workflow .toYaml (workflow );
130138```
131139
132140
You can’t perform that action at this time.
0 commit comments