Skip to content

Fix: Typo on overview.mdx #1460

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 2 commits into from
Nov 12, 2024
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