Skip to content

fix(types): allow string '0' | '1' for fail_existing on customers.create#475

Open
rachit367 wants to merge 1 commit into
razorpay:masterfrom
rachit367:fix-fail-existing-string-type
Open

fix(types): allow string '0' | '1' for fail_existing on customers.create#475
rachit367 wants to merge 1 commit into
razorpay:masterfrom
rachit367:fix-fail-existing-string-type

Conversation

@rachit367
Copy link
Copy Markdown

Fixes #463.

The Razorpay Customers API accepts fail_existing as either a string ('0' / '1'), a number (0 / 1), or a boolean, but the current TypeScript declaration only allows the boolean / numeric forms. TypeScript users who pass the string form (matching what the docs show) get a type error.

Widens the type to include '0' | '1'. Single line change in lib/types/customers.d.ts. No runtime code touched.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect TypeScript Typings for fail_existing in customers.create (should allow '0' | '1' strings)

1 participant