Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PropertySchema

Represents a class property or method argument definition.

Hierarchy

Index

Constructors

constructor

Properties

allowLabelsAsValue

allowLabelsAsValue: boolean = false

Optional backReference

backReference: BackReferenceOptions<any>

Whether its a back reference.

Protected Optional cacheKey

cacheKey: undefined | string

Protected Optional classType

classType: ClassType<any>

Protected Optional classTypeForwardRef

classTypeForwardRef: ForwardedRef<any>

Protected Optional classTypeResolved

classTypeResolved: ClassType<any>

Optional exclude

exclude: "all" | "plain" | string

hasDefaultValue

hasDefaultValue: boolean = false

Optional index

isArray

isArray: boolean = false

isDecorated

isDecorated: boolean = false

Whether this property is decorated.

isId

isId: boolean = false

isMap

isMap: boolean = false

isOptional

isOptional: boolean = false

isParentReference

isParentReference: boolean = false

isPartial

isPartial: boolean = false

Whether given classType can be populated partially (for example in patch mechanisms).

isReference

isReference: boolean = false

Whether its a owning reference.

isReferenceKey

isReferenceKey: boolean = false

Whether its a foreign key from a owning reference.

Optional methodName

methodName: undefined | string

When this property belongs to method as argument then this contains the name of the method.

name

name: string

Optional templateArgs

templateArgs: PropertySchema[]

type

type: Types = "any"

typeSet

typeSet: boolean = false

Used in decorator to check whether type has been set already.

validators

validators: ClassType<PropertyValidator>[] = []

Accessors

resolveClassType

  • get resolveClassType(): ClassType<any> | undefined

Methods

clone

  • Returns PropertySchema

getCacheKey

  • getCacheKey(): string

getForeignClassDecorator

  • Returns PropertySchema | undefined

getForeignKeyName

  • getForeignKeyName(): string
  • Internal note: for multi pk support, this will return a string[] in the future.

    Returns string

getRequiredForeignFieldsForProxy

  • When this.classType is referenced, this returns the fields necessary to instantiate a proxy object.

    Returns PropertySchema[]

getResolvedClassSchema

  • Returns ClassSchema

getResolvedClassType

  • getResolvedClassType(): ClassType<any>
  • Returns ClassType<any>

getResolvedClassTypeForValidType

  • getResolvedClassTypeForValidType(): ClassType<any> | undefined
  • Returns ClassType<any> | undefined

getTemplateArg

  • Parameters

    • position: number

    Returns PropertySchema | undefined

isActualOptional

  • isActualOptional(): boolean

isRealProperty

  • isRealProperty(): boolean

isResolvedClassTypeIsDecorated

  • isResolvedClassTypeIsDecorated(): boolean
  • Returns boolean

setClassType

  • setClassType(classType?: ClassType<any>): void
  • Parameters

    • Optional classType: ClassType<any>

    Returns void

setFromJSType

  • setFromJSType(type: any): void
  • Parameters

    • type: any

    Returns void

setFromJSValue

  • setFromJSValue(value: any): void
  • Parameters

    • value: any

    Returns void

toJSON

Static createFromPropertySchema

  • createFromPropertySchema(propertySchema: PropertySchema, isArray?: undefined | false | true, isMap?: undefined | false | true, isPartial?: undefined | false | true): PropertyCompilerSchema

Static fromJSON

Static getTypeFromJSType

  • getTypeFromJSType(type: any): Types
  • Parameters

    • type: any

    Returns Types

Generated using TypeDoc