From 19c20ac74739b0cdfd034ebf07bf1341fb02da83 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Thu, 4 Jul 2024 20:26:26 +0300 Subject: [PATCH] docs: remove limitation on arrow functions in workflows (#7958) --- .../constructor-constraints/page.mdx | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/www/apps/book/app/advanced-development/workflows/constructor-constraints/page.mdx b/www/apps/book/app/advanced-development/workflows/constructor-constraints/page.mdx index ced0965b5f2ba..116f1d445386b 100644 --- a/www/apps/book/app/advanced-development/workflows/constructor-constraints/page.mdx +++ b/www/apps/book/app/advanced-development/workflows/constructor-constraints/page.mdx @@ -6,30 +6,6 @@ export const metadata = { This chapter lists some constraints to keep in mind when defining a workflow's constructor function. -## No Arrow Functions - -The function passed to the `createWorkflow` function can’t be an arrow function: - -```ts highlights={[["5", "=>", "Function can't be an arrow function"], ["13", "", "Correct way of defining the function."]]} -// Don't -const myWorkflow = createWorkflow< - WorkflowInput, - WorkflowOutput ->("hello-world", (input) => { - // ... -}) - -// Do -const myWorkflow = createWorkflow< - WorkflowInput, - WorkflowOutput ->("hello-world", function (input) { - // ... -}) -``` - ---- - ## No Async Functions The function passed to the `createWorkflow` can’t be an async function: