Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Method

Information on a method.

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

parameters

returnType

  • get returnType(): Type
  • The return type of the method. (Only available if the --emitDecoratorMetadata compiler option is enabled and the method is decorated.)

    Returns Type

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[]

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

invoke

  • invoke(obj: any, args?: any[]): any
  • Invokes the method on the given object with the specified arguments.

    Parameters

    • obj: any

      The object to invoke the method on.

    • Optional args: any[]

      A list of arguments to pass to the method.

    Returns any

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