Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/tasks/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import { helloWorldTask } from "./trigger/hello-world";

async function triggerHelloWorld() {
//This triggers the task and returns a handle
const handle = await helloWorld.trigger({ message: "Hello world!" });
const handle = await helloWorldTask.trigger({ message: "Hello world!" });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix inconsistency between export and usage.

The example shows helloWorldTask.trigger(), but the task is exported as helloWorld in the example above. This creates a confusing inconsistency for readers.

To maintain consistency, the export in the example should also be updated:

-export const helloWorld = task({
+export const helloWorldTask = task({

Committable suggestion skipped: line range outside the PR's diff.


//You can use the handle to check the status of the task, cancel and retry it.
console.log("Task is running with handle", handle.id);
Expand Down