Skip to content

Commit 82ebfc7

Browse files
authored
Made it clearer that tasks need to be exported
1 parent f099668 commit 82ebfc7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/tasks/overview.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Here's an incredibly simple task:
1313
```ts /trigger/hello-world.ts
1414
import { task } from "@trigger.dev/sdk/v3";
1515

16-
//1. You need to export each task
16+
//1. You need to export each task, even if it's a subtask
1717
export const helloWorld = task({
1818
//2. Use a unique id for each task
1919
id: "hello-world",
@@ -25,6 +25,10 @@ export const helloWorld = task({
2525
});
2626
```
2727

28+
<Note>
29+
You must `export` each task, even subtasks inside the same file. When exported they are accessible so their configuration can be registered with the platform.
30+
</Note>
31+
2832
You can trigger this in two ways:
2933

3034
1. From the dashboard [using the "Test" feature](/run-tests).

0 commit comments

Comments
 (0)