Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export function classToClassFromExist<T>(object: T, fromObject: T | T[], options
*
* @deprecated This function is being removed. Please use
* ```
* JSON.stringify(instanceToPlain(object, options))
* JSON.stringify(plainToInstance(object, options))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was good at the original 'instanceToPlain'

* ```
*/
export function serialize<T>(object: T, options?: ClassTransformOptions): string;
Expand All @@ -138,7 +138,7 @@ export function serialize<T>(object: T | T[], options?: ClassTransformOptions):
*
* @deprecated This function is being removed. Please use the following instead:
* ```
* instanceToClass(cls, JSON.parse(json), options)
* plainToInstance(cls, JSON.parse(json), options)
* ```
*/
export function deserialize<T>(cls: ClassConstructor<T>, json: string, options?: ClassTransformOptions): T {
Expand All @@ -150,7 +150,7 @@ export function deserialize<T>(cls: ClassConstructor<T>, json: string, options?:
*
* @deprecated This function is being removed. Please use the following instead:
* ```
* JSON.parse(json).map(value => instanceToClass(cls, value, options))
* JSON.parse(json).map(value => plainToInstance(cls, value, options))
* ```
*
*/
Expand Down