-
Notifications
You must be signed in to change notification settings - Fork 5.5k
fix(types): additionalProps context
#16027
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
base: master
Are you sure you want to change the base?
Conversation
`this` is bound to the current set of props. Example: https://github.com/PipedreamHQ/pipedream/blob/3aea15a61225ce3a782f9ef3563a9a3bf60ee788/components/google_calendar/sources/upcoming-event-alert/upcoming-event-alert.mjs#L40
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
|
@joscha is attempting to deploy a commit to the Pipedreamers Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe changes update the Changes
Suggested reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 ESLint
types/src/index.tsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
types/src/index.ts (1)
344-347: Good addition of explicitthistype for improved type safety.Adding the
this: SourcePropDefinitionsparameter to theadditionalPropsmethod provides better type safety by explicitly declaring the type ofthiswithin the function context. This matches the PR description that "thisis bound to the current set of properties" and improves developer experience by providing proper TypeScript hints.However, I noticed that the
Actioninterface has a similaradditionalPropsmethod (lines 388-390) but without the samethisparameter. For consistency, consider applying the same pattern there.Consider also updating the
additionalPropsmethod in theActioninterface for consistency:additionalProps?: ( + this: ActionPropDefinitions, previousPropDefs: ActionPropDefinitions ) => Promise<ActionPropDefinitions>;
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
types/src/index.ts(1 hunks)
🧰 Additional context used
🪛 GitHub Actions: Pull Request Checks
types/src/index.ts
[error] 1-1: Definition for rule '@typescript-eslint/ban-types' was not found.
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: pnpm publish
thisis bound to the current set of props.See https://pipedream.com/docs/workflows/contributing/components/api/
Example:
pipedream/components/google_calendar/sources/upcoming-event-alert/upcoming-event-alert.mjs
Line 40 in 3aea15a
Summary by CodeRabbit