Home > @microsoft/api-extractor-model > ApiIndexSignature

ApiIndexSignature class

Represents a TypeScript index signature.

Signature:

export declare class ApiIndexSignature extends ApiIndexSignature_base 

Constructors

Constructor Modifiers Description
(constructor)(options)   Constructs a new instance of the ApiIndexSignature class

Properties

Property Modifiers Type Description
containerKey   string  
kind   ApiItemKind  

Methods

Method Modifiers Description
buildCanonicalReference()   (BETA)
getContainerKey(overloadIndex) static  

Remarks

This is part of the ApiModel hierarchy of classes, which are serializable representations of API declarations.

ApiIndexSignature represents a TypeScript declaration such as [x: number]: number in this example:

export interface INumberTable {
  // An index signature
  [value: number]: number;

  // An overloaded index signature
  [name: string]: number;
}