docs: add JSDoc to WhereCell and improve Stripe plugin typings - #17722
Open
NitinSemwal2605 wants to merge 1 commit into
Open
docs: add JSDoc to WhereCell and improve Stripe plugin typings#17722NitinSemwal2605 wants to merge 1 commit into
NitinSemwal2605 wants to merge 1 commit into
Conversation
NitinSemwal2605
requested review from
AlessioGr,
JarrodMFlesch and
jacobsfletch
as code owners
August 8, 2026 18:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
docs: add JSDoc to WhereCell and improve Stripe plugin typings
Which branch should this PR target?
mainWhat?
This PR resolves a couple of incomplete documentation and typing issues in the codebase marked with
@todo/TODO.packages/ui: Adds a comprehensive JSDoc block totransformWhereToNaturalLanguageandQueryPresetsWhereCell, replacing a vague/** @todo: improve this */.packages/plugin-stripe: Improves typings and adds JSDoc to all exported types intypes.ts. Specifically, it derivesstripeResourceTypedirectly from the Stripe SDK instead of a hardcoded union ('customers' | 'products'), and computesstripeResourceTypeSingularfrom the former so the two cannot go out of sync.Why?
transformWhereToNaturalLanguagecurrently only reading the first condition) in the IDE.keyof Pick<Stripe, ...>) eliminates the need to manually update static union types if new resource types are supported in the future. Deriving the singular mapping via a utility type ensures the plural/singular counterparts never drift apart.How?
In
packages/ui/.../WhereCell/index.tsx:@todowith a full JSDoc block detailing the function's parameters, return values, an example, and a note about its current limitations.In
packages/plugin-stripe/src/types.ts:StripeResourceSingularMapmapping plural keys to singular string literals.stripeResourceTypetokeyof Pick<Stripe, 'customers' | 'products'>.stripeResourceTypeSingularto look up the singular form from the map usingstripeResourceType.SyncConfig,StripePluginConfig, and others.Fixes #