Skip to content

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

Description

@jalexw

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions