Skip to content
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

feat: workflow types support generic params #3167

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dh94
Copy link

@dh94 dh94 commented Nov 25, 2024

Improves types usability, instead of writing

type Env {
   MY_WORKFLOW: Workflow;
}

// ... some logic in other file
env.MY_WORKFLOW.create({
  params: {
     some_param: 1
   } as MyWorkflowParams
 });

We could do something like

type Env {
   MY_WORKFLOW: Workflow<MyWorkflowParams>;
}

// ... some logic in other file
env.MY_WORKFLOW.create({
  params: {
     some_param: 1
   }
});

@dh94 dh94 requested review from a team as code owners November 25, 2024 15:13
@dh94 dh94 requested review from anonrig and mar-cf November 25, 2024 15:13
Copy link

github-actions bot commented Nov 25, 2024

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@dh94
Copy link
Author

dh94 commented Nov 25, 2024

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Nov 25, 2024
@dh94
Copy link
Author

dh94 commented Nov 26, 2024

not sure what to do with the failed CI check, seems unrelated 😅

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.

3 participants