Skip to content

Improve type inference for workflows defied from an interface #432

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

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

igalshilman
Copy link
Contributor

with this PR it is now possible to init a workflow client by defining an interface manually. For example:

type MyWorkflow = {

    run(ctx: unknown, arg: string): Promise<string>;

}

ingress.workflowClient<MyWorkflow>( { ... },
theKey).submitWorkflow("hi")

with this commit it is now possible to init a workflow client
by defining an interface manually. For example:

```

type MyWorkflow = {

    run(ctx: unknown, arg: string): Promise<string>;

}

ingress.workflowClient<MyWorkflow>( { ... },
theKey).submitWorkflow("hi")

```
@igalshilman igalshilman merged commit e7d271c into restatedev:main Sep 23, 2024
3 checks passed
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

Successfully merging this pull request may close these issues.

1 participant