Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ClassTransformOptions

Options to be passed during transformation.

see

https://github.com/typestack/class-transformer

publicapi

Hierarchy

  • ClassTransformOptions

Index

Properties

Optional enableCircularCheck

enableCircularCheck: boolean

If set to true then class transformer will perform a circular check. (Circular check is turned off by default) This option is useful when you know for sure that your types might have a circular dependency.

Optional enableImplicitConversion

enableImplicitConversion: boolean

If set to true class-transformer will attempt conversion based on TS reflected type

Optional excludeExtraneousValues

excludeExtraneousValues: boolean

If set to true class-transformer will exclude properties which are not part of the original class and exposing all class properties (with undefined, if nothing else is given)

Optional excludePrefixes

excludePrefixes: string[]

Excludes properties with the given prefixes. For example, if you mark your private properties with "" and "__" you can set this option's value to ["", "__"] and all private properties will be skipped. This works only for "exposeAll" strategy.

Optional groups

groups: string[]

Only properties with given groups will be transformed.

Optional ignoreDecorators

ignoreDecorators: boolean

If set to true then class transformer will ignore all @Expose and @Exclude decorators and what's inside them. This option is useful if you want to "clone" your object but not apply decorators affects.

Optional strategy

strategy: "excludeAll" | "exposeAll"

Exclusion strategy. By default exposeAll is used, which means that it will expose all properties that are transformed by default.

Optional targetMaps

targetMaps: any[]

Target maps allows to set a Types of the transforming object without using @Type decorator. This is useful when you are transforming external classes, or if you already have type metadata for objects and you don't want to set it up again.

Optional version

version: number

Only properties with "since" > version < "until" will be transformed.

Generated using TypeDoc