Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Property

Information on a Type property.

Hierarchy

Index

Properties

Protected context

The ReflectContext that is managing the Type.

name

name: string

The name of the property.

parent

parent: Type

The Type that owns this property.

Accessors

type

  • The Type of the property. (Only available if the --emitDecoratorMetadata compiler option is enabled.)

    Returns Type

Methods

getAnnotations

  • getAnnotations(): any[]
  • getAnnotations<T>(annotationCtr: Constructor<T>): T[]
  • Gets a list of annotations for the property.

    Returns any[]

  • Gets a list of the specified type of annotations for the property.

    Type parameters

    • T

    Parameters

    • annotationCtr: Constructor<T>

      The constructor function used to filter the annotations.

    Returns T[]

getValue

  • getValue(obj: Object): any
  • Gets the value of the property on a target object.

    Parameters

    • obj: Object

      The target object.

    Returns any

hasAnnotation

  • hasAnnotation(annotationCtr: Constructor<any>): boolean
  • Checks if the property has the specified type of annotation.

    Parameters

    • annotationCtr: Constructor<any>

      The constructor function for the annotation to look for.

    Returns boolean

setValue

  • setValue(obj: Object, value: any): void
  • Sets the value of the property on a target object.

    Parameters

    • obj: Object

      The target object.

    • value: any

      The value to set.

    Returns void

Generated using TypeDoc