Closed
Description
What happened:
I'm following the example here which builds a workflow from a source.
However, when I try this Module '"@severlessworkflow/sdk-typescript"' has no exported member 'Workflow'.
What you expected to happen:
I'd expect to be able to run the example.
How to reproduce it:
You can try following the examples in the README and run the example I mentioned above.
Try to do this:
import { Specification, Workflow } from '@severlessworkflow/sdk-typescript';
Anything else we need to know?:
Looking at the other examples I can see that the way Workflow is imported is inconsistent. For example, in a subsequent examples here's how it's imported:
import { Workflow } from '../src/lib/definitions/workflow';
const workflowAsJson: string = Workflow.toJson(workflow);
It seems like a typo to me since I wouldn't expect to import from '../src/lib/definitions/workflow'
but from the package itself.
If I try this then it works
import { Specification, } from '@severlessworkflow/sdk-typescript';
const source = "actual dsl string here"
const workflow: Specification.Workflow = Specification.Workflow.fromSource(source);
Environment:
Metadata
Metadata
Assignees
Labels
No labels