Skip to content

Workflow is not exported from the package #172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
giorgosera opened this issue Aug 17, 2022 · 3 comments
Closed

Workflow is not exported from the package #172

giorgosera opened this issue Aug 17, 2022 · 3 comments

Comments

@giorgosera
Copy link

giorgosera commented Aug 17, 2022

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:

@antmendoza
Copy link
Contributor

Thank you @giorgosera for reporting this.

@giorgosera
Copy link
Author

Hopefully, soon I'll know enough about the Serverless DSL and this lib to submit a PR to fix it :) Thanks for your reply.

@antmendoza antmendoza mentioned this issue Jan 28, 2023
@antmendoza
Copy link
Contributor

fixed here #175

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants