diff --git a/.changeset/violet-boxes-watch.md b/.changeset/violet-boxes-watch.md new file mode 100644 index 00000000000..0843d9935c3 --- /dev/null +++ b/.changeset/violet-boxes-watch.md @@ -0,0 +1,6 @@ +--- +'@clerk/shared': minor +'@clerk/types': minor +--- + +Ensure all hooks use typedoc for clerk docs diff --git a/.typedoc/custom-plugin.mjs b/.typedoc/custom-plugin.mjs index 973f71b4b8b..dbfca8f057f 100644 --- a/.typedoc/custom-plugin.mjs +++ b/.typedoc/custom-plugin.mjs @@ -10,7 +10,6 @@ const FILES_WITHOUT_HEADINGS = [ 'use-organization-params.mdx', 'paginated-resources.mdx', 'pages-or-infinite-options.mdx', - 'pages-or-infinite-options.mdx', 'paginated-hook-config.mdx', 'use-organization-list-return.mdx', 'use-organization-list-params.mdx', @@ -19,6 +18,21 @@ const FILES_WITHOUT_HEADINGS = [ 'verify-token-options.mdx', 'public-organization-data-json.mdx', 'organization-membership-public-user-data.mdx', + 'use-checkout-return.mdx', + 'use-checkout-options.mdx', + 'use-payment-element-return.mdx', + 'use-payment-methods-return.mdx', + 'use-payment-attempts-return.mdx', + 'use-plans-return.mdx', + 'use-statements-return.mdx', + 'hook-params.mdx', + 'use-subscription-params.mdx', + 'subscription-result.mdx', + 'needs-reverification-parameters.mdx', + 'use-reverification-options.mdx', + 'use-reverification-params.mdx', + 'payment-element-provider-props.mdx', + 'payment-element-props.mdx', ]; /** @@ -29,6 +43,8 @@ const LINK_REPLACEMENTS = [ ['set-active-params', '/docs/reference/javascript/types/set-active-params'], ['clerk-paginated-response', '/docs/reference/javascript/types/clerk-paginated-response'], ['paginated-resources', '#paginated-resources'], + ['use-checkout-options', '#use-checkout-options'], + ['needs-reverification-parameters', '#needs-reverification-parameters'], ['create-organization-params', '#create-organization-params'], ['session-resource', '/docs/reference/javascript/session'], ['signed-in-session-resource', '/docs/reference/javascript/session'], @@ -62,13 +78,18 @@ const LINK_REPLACEMENTS = [ ['billing-payer-resource', '/docs/reference/javascript/types/billing-payer-resource'], ['billing-plan-resource', '/docs/reference/javascript/types/billing-plan-resource'], ['billing-checkout-totals', '/docs/reference/javascript/types/billing-checkout-totals'], + ['billing-checkout-resource', '/docs/reference/javascript/types/billing-checkout-resource'], ['billing-money-amount', '/docs/reference/javascript/types/billing-money-amount'], ['billing-subscription-item-resource', '/docs/reference/javascript/types/billing-subscription-item-resource'], ['feature-resource', '/docs/reference/javascript/types/feature-resource'], ['billing-statement-group', '/docs/reference/javascript/types/billing-statement-group'], + ['billing-statement-resource', '/docs/reference/javascript/types/billing-statement-resource'], + ['billing-subscription-resource', '/docs/reference/javascript/types/billing-subscription-resource'], + ['clerk-api-response-error', '/docs/reference/javascript/types/clerk-api-response-error'], ['billing-statement-totals', '/docs/reference/javascript/types/billing-statement-totals'], ['billing-payment-resource', '/docs/reference/javascript/types/billing-payment-resource'], ['deleted-object-resource', '/docs/reference/javascript/types/deleted-object-resource'], + ['use-checkout-return', '/docs/reference/hooks/use-checkout#returns'], ]; /** diff --git a/.typedoc/extract-returns-and-params.mjs b/.typedoc/extract-returns-and-params.mjs new file mode 100644 index 00000000000..3e938c908c4 --- /dev/null +++ b/.typedoc/extract-returns-and-params.mjs @@ -0,0 +1,179 @@ +// @ts-check +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +/** + * Extracts the "## Returns" section from a markdown file and writes it to a separate file. + * @param {string} filePath - The path to the markdown file + * @returns {boolean} True if a file was created + */ +function extractReturnsSection(filePath) { + const content = fs.readFileSync(filePath, 'utf-8'); + + // Find the "## Returns" section + const returnsStart = content.indexOf('## Returns'); + + if (returnsStart === -1) { + return false; // No Returns section found + } + + // Find the next heading after "## Returns" (or end of file) + const afterReturns = content.slice(returnsStart + 10); // Skip past "## Returns" + const nextHeadingMatch = afterReturns.match(/\n## /); + const returnsEnd = + nextHeadingMatch && typeof nextHeadingMatch.index === 'number' + ? returnsStart + 10 + nextHeadingMatch.index + : content.length; + + // Extract the Returns section and trim trailing whitespace + const returnsContent = content.slice(returnsStart, returnsEnd).trimEnd(); + + // Generate the new filename: use-auth.mdx -> use-auth-return.mdx + const fileName = path.basename(filePath, '.mdx'); + const dirName = path.dirname(filePath); + const newFilePath = path.join(dirName, `${fileName}-return.mdx`); + + // Write the extracted Returns section to the new file + fs.writeFileSync(newFilePath, returnsContent, 'utf-8'); + + console.log(`[extract-returns] Created ${path.relative(process.cwd(), newFilePath)}`); + return true; +} + +/** + * Replaces generic type names in the parameters table with expanded types. + * @param {string} content + * @returns {string} + */ +function replaceGenericTypesInParamsTable(content) { + // Replace Fetcher in the parameters table + content = content.replace( + /(\|\s*`fetcher`\s*\|\s*)`Fetcher`(\s*\|)/g, + '$1`Fetcher extends (...args: any[]) => Promise`$2', + ); + return content; +} + +/** + * Extracts the "## Parameters" section from a markdown file and writes it to a separate file. + * @param {string} filePath - The path to the markdown file + * @returns {boolean} True if a file was created + */ +function extractParametersSection(filePath) { + const content = fs.readFileSync(filePath, 'utf-8'); + const fileName = path.basename(filePath, '.mdx'); + const dirName = path.dirname(filePath); + + // Always use -params suffix + const suffix = '-params'; + const targetFileName = `${fileName}${suffix}.mdx`; + const propsFileName = `${fileName}-props.mdx`; + + // Delete any existing -props file (TypeDoc-generated) + const propsFilePath = path.join(dirName, propsFileName); + if (fs.existsSync(propsFilePath)) { + fs.unlinkSync(propsFilePath); + console.log(`[extract-returns] Deleted ${path.relative(process.cwd(), propsFilePath)}`); + } + + // Find the "## Parameters" section + const paramsStart = content.indexOf('## Parameters'); + + if (paramsStart === -1) { + return false; // No Parameters section found + } + + // Find the next heading after "## Parameters" (or end of file) + const afterParams = content.slice(paramsStart + 13); // Skip past "## Parameters" + const nextHeadingMatch = afterParams.match(/\n## /); + const paramsEnd = + nextHeadingMatch && typeof nextHeadingMatch.index === 'number' + ? paramsStart + 13 + nextHeadingMatch.index + : content.length; + + // Extract the Parameters section and trim trailing whitespace + const paramsContent = content.slice(paramsStart, paramsEnd).trimEnd(); + const processedParams = replaceGenericTypesInParamsTable(paramsContent); + + // Write to new file + const newFilePath = path.join(dirName, targetFileName); + fs.writeFileSync(newFilePath, processedParams, 'utf-8'); + + console.log(`[extract-returns] Created ${path.relative(process.cwd(), newFilePath)}`); + return true; +} + +/** + * Recursively reads all .mdx files in a directory, excluding generated files + * @param {string} dir - The directory to read + * @returns {string[]} Array of file paths + */ +function getAllMdxFiles(dir) { + /** @type {string[]} */ + const files = []; + + if (!fs.existsSync(dir)) { + return files; + } + + const entries = fs.readdirSync(dir, { withFileTypes: true }); + + for (const entry of entries) { + const fullPath = path.join(dir, entry.name); + + if (entry.isDirectory()) { + files.push(...getAllMdxFiles(fullPath)); + } else if (entry.isFile() && entry.name.endsWith('.mdx')) { + // Exclude generated files + const isGenerated = + entry.name.endsWith('-return.mdx') || entry.name.endsWith('-params.mdx') || entry.name.endsWith('-props.mdx'); + if (!isGenerated) { + files.push(fullPath); + } + } + } + + return files; +} + +/** + * Main function to process all clerk-react files + */ +function main() { + const packages = ['clerk-react']; + const dirs = packages.map(folder => path.join(__dirname, 'temp-docs', folder)); + + for (const dir of dirs) { + if (!fs.existsSync(dir)) { + console.log(`[extract-returns] ${dir} directory not found, skipping extraction`); + continue; + } + + const mdxFiles = getAllMdxFiles(dir); + console.log(`[extract-returns] Processing ${mdxFiles.length} files in ${dir}/`); + + let returnsCount = 0; + let paramsCount = 0; + + for (const filePath of mdxFiles) { + // Extract Returns sections + if (extractReturnsSection(filePath)) { + returnsCount++; + } + + // Extract Parameters sections + if (extractParametersSection(filePath)) { + paramsCount++; + } + } + + console.log(`[extract-returns] Extracted ${returnsCount} Returns sections`); + console.log(`[extract-returns] Extracted ${paramsCount} Parameters sections`); + } +} + +main(); diff --git a/package.json b/package.json index a4df0bbbabe..cd1f341f12e 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "test:typedoc": "pnpm typedoc:generate && cd ./.typedoc && vitest run", "turbo:clean": "turbo daemon clean", "typedoc:generate": "pnpm build:declarations && pnpm typedoc:generate:skip-build", - "typedoc:generate:skip-build": "typedoc --tsconfig tsconfig.typedoc.json && rm -rf .typedoc/docs && mv .typedoc/temp-docs .typedoc/docs", + "typedoc:generate:skip-build": "typedoc --tsconfig tsconfig.typedoc.json && node .typedoc/extract-returns-and-params.mjs && rimraf .typedoc/docs && cpy '.typedoc/temp-docs/**' '.typedoc/docs' && rimraf .typedoc/temp-docs", "version-packages": "changeset version && pnpm install --lockfile-only --engine-strict=false", "version-packages:canary": "./scripts/canary.mjs", "version-packages:snapshot": "./scripts/snapshot.mjs", diff --git a/packages/shared/src/errors/clerkApiResponseError.ts b/packages/shared/src/errors/clerkApiResponseError.ts index 671c41bef5c..2d895067f2d 100644 --- a/packages/shared/src/errors/clerkApiResponseError.ts +++ b/packages/shared/src/errors/clerkApiResponseError.ts @@ -11,6 +11,9 @@ interface ClerkAPIResponseOptions extends Omit['checkout']; + /** + * An optional object to customize the appearance of the Stripe Payment Element. This allows you to match the form's styling to your application's theme. + */ stripeAppearance?: internalStripeAppearance; /** - * Default to `user` if not provided. + * Specifies whether to fetch for the current user or organization. * * @default 'user' */ for?: ForPayerType; + /** + * An optional description to display to the user within the payment element UI. + */ paymentDescription?: string; }; @@ -248,7 +260,17 @@ const PaymentElementInternalRoot = (props: PropsWithChildren) => { return {props.children}; }; -const PaymentElement = ({ fallback }: { fallback?: ReactNode }) => { +/** + * @interface + */ +export type PaymentElementProps = { + /** + * Optional fallback content, such as a loading skeleton, to display while the payment form is being initialized. + */ + fallback?: ReactNode; +}; + +const PaymentElement = ({ fallback }: PaymentElementProps) => { const { setIsPaymentElementReady, paymentMethodOrder, @@ -315,7 +337,13 @@ const throwLibsMissingError = () => { ); }; -type UsePaymentElementReturn = { +/** + * @interface + */ +export type UsePaymentElementReturn = { + /** + * A function that submits the payment form data to the payment provider. It returns a promise that resolves with either a `data` object containing a payment token on success, or an `error` object on failure. + */ submit: () => Promise< | { data: { gateway: 'stripe'; paymentToken: string }; @@ -326,13 +354,25 @@ type UsePaymentElementReturn = { error: PaymentElementError; } >; + /** + * A function that resets the payment form to its initial, empty state. + */ reset: () => Promise; + /** + * A boolean that indicates if the payment form UI has been rendered and is ready for user input. This is useful for disabling a submit button until the form is interactive. + */ isFormReady: boolean; } & ( | { + /** + * An object containing information about the initialized payment provider. It is `undefined` until `isProviderReady` is `true`. + */ provider: { name: 'stripe'; }; + /** + * A boolean that indicates if the underlying payment provider (e.g. Stripe) has been fully initialized. + */ isProviderReady: true; } | { diff --git a/packages/shared/src/react/contexts.tsx b/packages/shared/src/react/contexts.tsx index 77bef33fcd7..8e9e11a75c8 100644 --- a/packages/shared/src/react/contexts.tsx +++ b/packages/shared/src/react/contexts.tsx @@ -25,9 +25,23 @@ const [SessionContext, useSessionContext] = createContextAndHook({}); -type UseCheckoutOptions = { +/** + * @interface + */ +export type UseCheckoutOptions = { + /** + * Specifies if the checkout is for an organization. + * + * @default 'user' + */ for?: ForPayerType; + /** + * The billing period for the plan. + */ planPeriod: BillingSubscriptionPlanPeriod; + /** + * The ID of the subscription plan to check out (e.g. `cplan_xxx`). + */ planId: string; }; diff --git a/packages/shared/src/react/hooks/createBillingPaginatedHook.tsx b/packages/shared/src/react/hooks/createBillingPaginatedHook.tsx index 7e77f165047..93ed851eb2d 100644 --- a/packages/shared/src/react/hooks/createBillingPaginatedHook.tsx +++ b/packages/shared/src/react/hooks/createBillingPaginatedHook.tsx @@ -23,6 +23,18 @@ type BillingHookConfig { + /** + * Specifies whether to fetch for the current user or organization. + * + * @default 'user' + */ + for?: ForPayerType; +} + /** * A hook factory that creates paginated data fetching hooks for commerce-related resources. * It provides a standardized way to create hooks that can fetch either user or organization resources @@ -43,10 +55,6 @@ export function createBillingPaginatedHook) { - type HookParams = PaginatedHookConfig & { - for?: ForPayerType; - }; - return function useBillingHook( params?: T, ): PaginatedResources { diff --git a/packages/shared/src/react/hooks/useCheckout.ts b/packages/shared/src/react/hooks/useCheckout.ts index 9715384c46a..6a137371410 100644 --- a/packages/shared/src/react/hooks/useCheckout.ts +++ b/packages/shared/src/react/hooks/useCheckout.ts @@ -27,11 +27,23 @@ type ForceNull = { [K in keyof T]: null; }; +/** + * @inline + */ type CheckoutProperties = Omit, 'pathRoot' | 'status'>; +/** + * @inline + */ type FetchStatusAndError = | { + /** + * Returns an error object if any part of the checkout process fails. + */ error: ClerkAPIResponseError; + /** + * The data fetching status. + */ fetchStatus: 'error'; } | { @@ -40,34 +52,73 @@ type FetchStatusAndError = }; /** - * @internal + * @inline * On status === 'needs_initialization', all properties are null. - * On status === 'needs_confirmation' or 'completed', all properties are defined the same as the CommerceCheckoutResource. + * On status === 'needs_confirmation' or 'completed', all properties are defined the same as the BillingCheckoutResource. */ type CheckoutPropertiesPerStatus = | ({ + /** + * @inline + * The current status of the checkout session. The following statuses are possible: + *
    + *
  • `needs_initialization`: The checkout hasn't started but the hook is mounted. Call `start()` to continue.
  • + *
  • `needs_confirmation`: The checkout has been initialized and is awaiting confirmation. Call `confirm()` to continue.
  • + *
  • `completed`: The checkout has been successfully confirmed. Call `finalize()` to complete the checkout.
  • + *
+ */ status: Extract<__experimental_CheckoutCacheState['status'], 'needs_initialization'>; } & ForceNull) | ({ status: Extract<__experimental_CheckoutCacheState['status'], 'needs_confirmation' | 'completed'>; } & CheckoutProperties); +/** + * @interface + */ +export type UseCheckoutReturn = FetchStatusAndError & + CheckoutPropertiesPerStatus & { + /** + * A function that confirms and finalizes the checkout process, usually after the user has provided and validated payment information. + */ + confirm: __experimental_CheckoutInstance['confirm']; + /** + * A function that initializes the checkout process by creating a checkout resource on the server. + */ + start: __experimental_CheckoutInstance['start']; + /** + * A function that clears the current checkout state from the cache. + */ + clear: () => void; + /** + * A function that finalizes the checkout process. Can optionally accept a `navigate()` function to redirect the user after completion. + */ + finalize: (params?: { navigate?: SetActiveNavigate }) => void; + getState: () => __experimental_CheckoutCacheState; + /** + * A boolean that indicates if the `start()` method is in progress. + */ + isStarting: boolean; + /** + * A boolean that indicates if the `confirm()` method is in progress. + */ + isConfirming: boolean; + }; + type __experimental_UseCheckoutReturn = { - checkout: FetchStatusAndError & - CheckoutPropertiesPerStatus & { - confirm: __experimental_CheckoutInstance['confirm']; - start: __experimental_CheckoutInstance['start']; - clear: () => void; - finalize: (params?: { navigate?: SetActiveNavigate }) => void; - getState: () => __experimental_CheckoutCacheState; - isStarting: boolean; - isConfirming: boolean; - }; + checkout: UseCheckoutReturn; }; -type Params = Parameters[0]; +type UseCheckoutParams = Parameters[0]; -export const useCheckout = (options?: Params): __experimental_UseCheckoutReturn => { +/** + * @function + * + * @param [options] - An object containing the configuration for the checkout flow. + * + * **Required** if the hook is used without a `` wrapping the component tree. + */ +export const useCheckout = (options?: UseCheckoutParams): __experimental_UseCheckoutReturn => { const contextOptions = useCheckoutContext(); const { for: forOrganization, planId, planPeriod } = options || contextOptions; diff --git a/packages/shared/src/react/hooks/usePaymentAttempts.tsx b/packages/shared/src/react/hooks/usePaymentAttempts.tsx index 50c2f4a0ef0..fd0a4953b05 100644 --- a/packages/shared/src/react/hooks/usePaymentAttempts.tsx +++ b/packages/shared/src/react/hooks/usePaymentAttempts.tsx @@ -16,3 +16,8 @@ export const usePaymentAttempts = createBillingPaginatedHook; diff --git a/packages/shared/src/react/hooks/usePaymentMethods.tsx b/packages/shared/src/react/hooks/usePaymentMethods.tsx index 0c8f9a9e8d1..d97ad7c61f3 100644 --- a/packages/shared/src/react/hooks/usePaymentMethods.tsx +++ b/packages/shared/src/react/hooks/usePaymentMethods.tsx @@ -18,3 +18,8 @@ export const usePaymentMethods = createBillingPaginatedHook; diff --git a/packages/shared/src/react/hooks/usePlans.tsx b/packages/shared/src/react/hooks/usePlans.tsx index 0b724041bcf..db7e73bfe3c 100644 --- a/packages/shared/src/react/hooks/usePlans.tsx +++ b/packages/shared/src/react/hooks/usePlans.tsx @@ -19,3 +19,8 @@ export const usePlans = createBillingPaginatedHook; diff --git a/packages/shared/src/react/hooks/useReverification.ts b/packages/shared/src/react/hooks/useReverification.ts index 107fa645285..24284783f6f 100644 --- a/packages/shared/src/react/hooks/useReverification.ts +++ b/packages/shared/src/react/hooks/useReverification.ts @@ -37,9 +37,18 @@ type ExcludeClerkError = T extends { clerk_error: any } ? never : T; /** * @interface */ -type NeedsReverificationParameters = { +export type NeedsReverificationParameters = { + /** + * Marks the reverification process as cancelled and rejects the original request. + */ cancel: () => void; + /** + * Marks the reverification process as complete and retries the original request. + */ complete: () => void; + /** + * The verification level required for the reverification process. + */ level: SessionVerificationLevel | undefined; }; @@ -48,13 +57,14 @@ type NeedsReverificationParameters = { * * @interface */ -type UseReverificationOptions = { +export type UseReverificationOptions = { /** - * A handler that is called when reverification is needed, this will opt-out of using the default UI when provided. + * Handler for the reverification process. Opts out of using the default UI. Use this to build a custom UI. * - * @param cancel - A function that will cancel the reverification process. - * @param complete - A function that will retry the original request after reverification. - * @param level - The level returned with the reverification hint. + * @param properties - Callbacks and info to control the reverification flow. + * @param properties.cancel - A function that will cancel the reverification process. + * @param properties.complete - A function that will retry the original request after reverification. + * @param properties.level - The level returned with the reverification hint. */ onNeedsReverification?: (properties: NeedsReverificationParameters) => void; }; @@ -73,7 +83,13 @@ type UseReverification = < Fetcher extends (...args: any[]) => Promise | undefined, Options extends UseReverificationOptions = UseReverificationOptions, >( + /** + * A function that returns a promise. + */ fetcher: Fetcher, + /** + * Optional configuration object extending `UseReverificationOptions`. + */ options?: Options, ) => UseReverificationResult; diff --git a/packages/shared/src/react/hooks/useStatements.tsx b/packages/shared/src/react/hooks/useStatements.tsx index 31a99c726d1..162bd563a99 100644 --- a/packages/shared/src/react/hooks/useStatements.tsx +++ b/packages/shared/src/react/hooks/useStatements.tsx @@ -16,3 +16,8 @@ export const useStatements = createBillingPaginatedHook; diff --git a/packages/shared/src/react/hooks/useSubscription.types.ts b/packages/shared/src/react/hooks/useSubscription.types.ts index 0ead84085bc..62bd5a352c1 100644 --- a/packages/shared/src/react/hooks/useSubscription.types.ts +++ b/packages/shared/src/react/hooks/useSubscription.types.ts @@ -1,21 +1,45 @@ import type { BillingSubscriptionResource, ForPayerType } from '../../types'; +/** + * @interface + */ export type UseSubscriptionParams = { + /** + * Specifies whether to fetch the subscription for an organization or a user. + * + * @default 'user' + */ for?: ForPayerType; /** * If true, the previous data will be kept in the cache until new data is fetched. - * Defaults to false. + * + * @default false */ keepPreviousData?: boolean; }; +/** + * @interface + */ export type SubscriptionResult = { + /** + * The subscription object, `undefined` before the first fetch, or `null` if no subscription exists. + */ data: BillingSubscriptionResource | undefined | null; + /** + * Any error that occurred during the data fetch, or `undefined` if no error occurred. + */ error: Error | undefined; + /** + * A boolean that indicates whether the initial data is still being fetched. + */ isLoading: boolean; + /** + * A boolean that indicates whether any request is still in flight, including background updates. + */ isFetching: boolean; /** - * Revalidate or refetch the subscription data. + * Function to manually revalidate or refresh the subscription data. */ revalidate: () => Promise | void; }; diff --git a/packages/shared/src/types/billing.ts b/packages/shared/src/types/billing.ts index 14ce4647eb5..04f5522767f 100644 --- a/packages/shared/src/types/billing.ts +++ b/packages/shared/src/types/billing.ts @@ -759,7 +759,7 @@ export interface BillingCheckoutResource extends ClerkResource { */ planPeriod: BillingSubscriptionPlanPeriod; /** - * Unix timestamp (milliseconds) of when the current period starts. + * The start date of the plan period, represented as a Unix timestamp. */ planPeriodStart?: number; /** diff --git a/packages/shared/src/types/clerk.ts b/packages/shared/src/types/clerk.ts index d2336044eaf..80e44a934d5 100644 --- a/packages/shared/src/types/clerk.ts +++ b/packages/shared/src/types/clerk.ts @@ -79,6 +79,9 @@ export type __experimental_CheckoutOptions = { planId: string; }; +/** + * @inline + */ type CheckoutResult = | { data: BillingCheckoutResource; diff --git a/packages/shared/typedoc.json b/packages/shared/typedoc.json index 53be052f366..d81428d4607 100644 --- a/packages/shared/typedoc.json +++ b/packages/shared/typedoc.json @@ -1,6 +1,13 @@ { "$schema": "https://typedoc.org/schema.json", - "entryPoints": ["./src/index.ts", "./src/react/types.ts", "./src/react/hooks/*.{ts,tsx}", "./src/types/*.ts"], + "entryPoints": [ + "./src/index.ts", + "./src/react/types.ts", + "./src/react/hooks/*.{ts,tsx}", + "./src/react/commerce.tsx", + "./src/react/contexts.tsx", + "./src/types/*.ts" + ], "compilerOptions": { "noImplicitAny": false }