Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1413 - fix typo for deserialize and deserializeArray #1679

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
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