Skip to content

Incorrect types in declaration file #177

Open

Description

@charesbast

Warning: Github issues are not an official support channel for Recurly. If you have an urgent request we suggest you contact us through an official channel: support@recurly.com or https://recurly.zendesk.com

Describe the bug

Types definitions are incorrect:

  • all fields are optional and nullable
  • some types are not strongly typed (ex: Plan.state -> string instead of an enum)

short example from the declaration file:

export declare class Plan {
  /**
   * Plan ID
   */
  id?: string | null; -> should be id: string;

That's a big problem because in that state those type definitions cannot be used... Are you aware of that issue ? And do you plan to fix it ?

Thanks !

Activity

  1. wcauchois commented on May 17, 2021

    @wcauchois

    I want to chime in here that it's very inconvenient that every type is nullable (e.g. id on invoice - link). Could the developers please fix this to reflect what fields are actually nullable? This leads to code with either tons of redundant nullability checks, or null assertions.

  2. Silverwolf90 commented on May 23, 2022

    @Silverwolf90

    I want to chime in here that it's very inconvenient that every type is nullable (e.g. id on invoice - link). Could the developers please fix this to reflect what fields are actually nullable? This leads to code with either tons of redundant nullability checks, or null assertions.

    Well I'm here a year later to complain about the same thing. It's a terrible developer experience.

  3. dmmulroy commented on Jun 11, 2022

    @dmmulroy

    I want to chime in here that it's very inconvenient that every type is nullable (e.g. id on invoice - link). Could the developers please fix this to reflect what fields are actually nullable? This leads to code with either tons of redundant nullability checks, or null assertions.

    I'm also here to see if there is any plans to address this?

  4. wlechowicz commented on May 9, 2025

    @wlechowicz

    5 years later, types are still terrible. Nullable ids? Nullable strings where API specifies enums? Shame.

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

    V3v2019-10-10 Clientbug?

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions