Skip to content

Error when optional property redefined on extended objects as required #43

Description

@ChrisMBarr

If I extend a type and mark an optional base property as required on the extended type like this:

export interface IBase {
  foo: string;
  bar?: string;
}

export interface IExtended extends IBase {
  other: string;
  bar: string; //this causes an error!
}

and I run this con the CLI

typeconv --from-type ts --to-type oapi --output-directory swagger-schemas --oapi-format json --oapi-version 3 \"interfaces/**/*.ts\"

It produces this error

Cannot read properties of undefined (reading 'length')

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions