Skip to content

feature: better return types on instanceToPlainΒ #1834

@alvissraghnall

Description

@alvissraghnall

Description

Excerpt from a previous issue [cos I share their thought process]:

class MyClass {
  @Expose({ name: 'desc', toPlainOnly: true })
  description: string
}

const x = { description: 'asc' }
const y = plainToInstance(MyClass, x)
const z = instanceToPlain(y) // type: Record<string, any>;

Proposed solution

I'd have to go through the codebase. Just documenting this first so I could fall back to it in a minute.

Metadata

Metadata

Assignees

No one assigned

    Labels

    flag: needs discussionIssues which needs discussion before implementation.type: featureIssues related to new features.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions