-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
fix(types): support shorthand prop defs #16028
base: master
Are you sure you want to change the base?
Conversation
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. |
WalkthroughThis pull request updates the TypeScript type definitions in the Changes
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 ✨ Finishing Touches
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)
261-261
: The type enhancement correctly adds support for shorthand property definitions.This change adds
ServiceDBProp["type"]
to the allowed types in theSourcePropDefinitions
interface, enabling developers to use the string literal"$.service.db"
directly instead of creating a fullServiceDBProp
object. This provides a more convenient shorthand syntax when defining service DB props.For consistency, consider applying similar type enhancements to
ActionPropDefinitions
andAppPropDefinitions
interfaces. This would provide the same shorthand capability across all prop definition interfaces:export interface ActionPropDefinitions { - [name: string]: PropDefinitionReference | App<Methods, AppPropDefinitions> | UserProp | DataStoreProp | HttpRequestProp; + [name: string]: PropDefinitionReference | App<Methods, AppPropDefinitions> | UserProp | DataStoreProp | HttpRequestProp | DataStoreProp["type"]; } export interface AppPropDefinitions { - [name: string]: PropDefinitionReference | App<Methods, AppPropDefinitions> | UserProp; + [name: string]: PropDefinitionReference | App<Methods, AppPropDefinitions> | UserProp | UserProp["type"]; }
📜 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
i.e.:
See
https://github.com/PipedreamHQ/pipedream/blob/3aea15a61225ce3a782f9ef3563a9a3bf60ee788/components/pipedream/sources/new-scheduled-tasks/new-scheduled-tasks.mjs#L29C5-L29C23
Summary by CodeRabbit