Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10087 from ZanMinKian/zmj-support_return_type
feat(common): allow to serialize plain object
- Loading branch information
Showing
4 changed files
with
24 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { ClassTransformOptions } from '../interfaces/external/class-transform-options.interface'; | ||
import { Type } from '../interfaces'; | ||
|
||
export interface ClassSerializerContextOptions extends ClassTransformOptions { | ||
type?: Type<any>; | ||
} |
4 changes: 2 additions & 2 deletions
4
packages/common/serializer/decorators/serialize-options.decorator.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { SetMetadata } from '../../decorators'; | ||
import { ClassTransformOptions } from '../../interfaces/external/class-transform-options.interface'; | ||
import { ClassSerializerContextOptions } from '../class-serializer.interfaces'; | ||
import { CLASS_SERIALIZER_OPTIONS } from '../class-serializer.constants'; | ||
|
||
export const SerializeOptions = (options: ClassTransformOptions) => | ||
export const SerializeOptions = (options: ClassSerializerContextOptions) => | ||
SetMetadata(CLASS_SERIALIZER_OPTIONS, options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './class-serializer.interceptor'; | ||
export * from './decorators'; | ||
export * from './class-serializer.interfaces'; |