-
-
Notifications
You must be signed in to change notification settings - Fork 699
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
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 (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/tasks/overview.mdx
Outdated
@@ -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!" }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks :)
✅ Checklist
Testing
the import
helloWorldTask
wasn't called correctly at an exampleChangelog
before it was imported as
helloWorldTask
but used ashelloWorld
, now its consistentScreenshots
💯
Summary by CodeRabbit
helloWorld
task tohelloWorldTask
, including changes to example code for clarity.