Skip to content

plainToInstance support #397

@chriskuech

Description

@chriskuech

Is there an existing issue that is already proposing this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe it

plainToClass is incorrectly named. class-transformer has since provided a properly named plainToInstance function with seemingly identical interface. Please pull in this change from upstream.

Describe the solution you'd like

Pull in plainToInstance from upstream class-transformer repo

Teachability, documentation, adoption, migration strategy

Identically to plainToClass but plainToInstance.

What is the motivation / use case for changing the behavior?

  • Accuracy of function names
  • Minimize difference between class-transformer and @nestjs/class-transformer
  • This bug means we need to blacklist class-transformer from our imports, which means either @nestjs/class-transformer updates to include the correct interface or we revert to the inaccurate interface

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