Options
All
  • Public
  • Public/Protected
  • All
Menu

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 ContainerReflection.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

Properties

anchor?: string

The name of the anchor of this child. TODO: Reflections shouldn't know anchors exist. Move this to a serializer.

comment?: Comment

The parsed documentation comment attached to this reflection.

cssClasses?: string

A list of generated css classes that should be applied to representations of this reflection in the generated markup. TODO: Reflections shouldn't know about CSS. Move this property to the correct serializer.

decorates?: Type[]

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

decorators?: Decorator[]

A list of all decorators attached to this reflection.

flags: ReflectionFlags = ...
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. TODO: Reflections shouldn't know how they are rendered. Move this to the correct serializer.

id: number

Unique id of this reflection.

The kind of this reflection.

kindString?: string

The human readable string representation of the kind of this reflection. Set during the resolution phase by GroupPlugin

name: string

The symbol name of this reflection.

originalName: string

The original name of the TypeScript declaration.

parent?: Reflection

The reflection this reflection is a child of.

sources?: SourceReference[]

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

url?: string

The url of this reflection in the generated documentation. TODO: Reflections shouldn't know urls exist. Move this to a serializer.

Accessors

Methods

  • findReflectionByName(arg: string | string[]): undefined | Reflection
  • getAlias(): string
  • getChildByName(arg: string | string[]): undefined | Reflection
  • getFriendlyFullName(): string
  • getFullName(separator?: string): string
  • Return the full name of this reflection. Intended for use in debugging. For log messages intended to be displayed to the user for them to fix, prefer getFriendlyFullName instead.

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

    Parameters

    • separator: string = "."

      Separator used to join the names of the reflections.

    Returns string

    The full name of this reflection.

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

    Parameters

    • indent: string = ""

      Used internally to indent child reflections.

    Returns string

Generated using TypeDoc