Skip to content
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

Stronger types for requests + parsing for webhook event handlers #36

Open
jalexw opened this issue Aug 2, 2023 · 0 comments
Open

Stronger types for requests + parsing for webhook event handlers #36

jalexw opened this issue Aug 2, 2023 · 0 comments

Comments

@jalexw
Copy link

jalexw commented Aug 2, 2023

Hi there,

I'm trying to use this package for a work project to handle customer subscriptions using ChargeBee. I find there are way too many anys and loose typings that make this package neither easy to use nor inline with TypeScript best practices...

For example, callbacks should not have the type any, as the following is apparently valid according to your types:

const callback = "beans"
chargebee.subscription.list().request(callback)

I'd like to see strict: true enabled in the tsconfig.json configuration's compiler options to make this library more developer friendly...

Also, some methods/schemas to validate the incoming data within our webhook event handlers would be really helpful... May I recommend setting up some Zod schemas?

Kind Regards,
-Alex

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

No branches or pull requests

1 participant