Fix: Typo on overview.mdx#1460
Conversation
the import helloWorldTask wasn't called correctly at an example
|
WalkthroughThe pull request modifies the documentation in the Changes
Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
matt-aitken
left a comment
There was a problem hiding this comment.
@data-diego good spot!
I think it would be better if we changed the import to helloWorld because then it will match the export from the code snippet just above this.
docs/tasks/overview.mdx
Outdated
| 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!" }); |
There was a problem hiding this comment.
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.
Now the import is called `helloWorld` instead of `helloWorldTask` to be consistent with the filename as requested
|
Sure, changes committed |
✅ Checklist
Testing
the import
helloWorldTaskwasn't called correctly at an exampleChangelog
before it was imported as
helloWorldTaskbut used ashelloWorld, now its consistentScreenshots
💯
Summary by CodeRabbit
helloWorldtask tohelloWorldTask, including changes to example code for clarity.