Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Reflection

Base class for all reflection classes.

While generating a documentation, TypeDoc generates an instance of ProjectReflection as the root for all reflections within the project. All other reflections are represented by the DeclarationReflection class.

This base class exposes the basic properties one may use to traverse the reflection tree. You can use the children and parent properties to walk the tree. The groups property contains a list of all children grouped and sorted for being rendered.

Hierarchy

Index

Constructors

constructor

Properties

Private _alias

_alias: string

Url safe alias for this reflection.

see

[[BaseReflection.getAlias]]

Private _aliases

_aliases: string[]

anchor

anchor: string

The name of the anchor of this child.

comment

comment: Comment

The parsed documentation comment attached to this reflection.

cssClasses

cssClasses: string

A list of generated css classes that should be applied to representations of this reflection in the generated markup.

decorates

decorates: Type[]

A list of all types that are decorated by this reflection.

decorators

decorators: Decorator[]

A list of all decorators attached to this reflection.

flags

flags: ReflectionFlags = []

hasOwnDocument

hasOwnDocument: boolean

Is the url pointing to an individual document?

When FALSE, the url points to an anchor tag on a page of a different reflection.

id

id: number

Unique id of this reflection.

kind

The kind of this reflection.

kindString

kindString: string

The human readable string representation of the kind of this reflection.

name

name: string = ""

The symbol name of this reflection.

originalName

originalName: string

The original name of the TypeScript declaration.

parent

parent: Reflection

The reflection this reflection is a child of.

sources

sources: SourceReference[]

A list of all source files that contributed to this reflection.

url

url: string

The url of this reflection in the generated documentation.

Methods

findReflectionByName

getAlias

  • getAlias(): string

getChildByName

getFullName

  • getFullName(separator?: string): string
  • Return the full name of this reflection.

    The full name contains the name of this reflection and the names of all parent reflections.

    Parameters

    • Default value separator: string = "."

      Separator used to join the names of the reflections.

    Returns string

    The full name of this reflection.

hasComment

  • hasComment(): boolean

hasGetterOrSetter

  • hasGetterOrSetter(): boolean

isProject

  • isProject(): boolean

kindOf

setFlag

toObject

  • toObject(): any

toString

  • toString(): string

toStringHierarchy

  • toStringHierarchy(indent?: string): string
  • Return a string representation of this reflection and all of its children.

    Parameters

    • Default value indent: string = ""

      Used internally to indent child reflections.

    Returns string

traverse

  • Traverse all potential child reflections of this reflection.

    The given callback will be invoked for all children, signatures and type parameters attached to this reflection.

    Parameters

    • callback: TraverseCallback

      The callback function that should be applied for each child reflection.

    Returns void

Generated using TypeDoc