Skip to content

"Type instantiation is excessively deep and possibly infinite" when using default: null #402

Description

@noisyscanner

Problem

As per the FAQ, we can make things required by setting default: null, if null is not a valid value.

With TypeScript I get the error Type instantiation is excessively deep and possibly infinite when trying to config.get any value, if somewhere in the schema there is default: null.

typescript 4.6.3
convict 6.2.1
@types/convict 6.1.1

(all versions latest at time of writing)

Repo here

https://github.com/noisyscanner/convict-issue
Run yarn build to see the following
image

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

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions