Skip to content

The function 'get' with default value and infer=true still returns undefined #1460

Closed
@tomerslice

Description

@tomerslice

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

When putting infer=true in the function 'get' you get the value with undefined.
When you add a default value you don't remove the undefined.

Minimum reproduction code

https://gist.github.com/tomerslice/49e523846129dc8e88a5aa28d536fc4f

Steps to reproduce

No response

Expected behavior

The type of the undefined should be remove.

Package version

3.0.1

NestJS version

10.2.3

Node.js version

18

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions