feature: better return types on instanceToPlain
Author: alvissraghnallCreated Nov 1, 2025Updated Nov 13, 2025
Labelstype: featureflag: needs discussion
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.
Source: typestack/class-transformer