kythe.io@v0.0.68-0.20240422202219-7225dbc01741/kythe/typescript/testdata/jsdoc.ts (about)

     1  export {}
     2  
     3  //- @+5"singleLine" defines/binding VarSingleLine
     4  //- VarSingleLineDoc documents VarSingleLine
     5  //- VarSingleLineDoc.node/kind doc
     6  //- VarSingleLineDoc.text "Single-line doc."
     7  /** Single-line doc. */
     8  var singleLine;
     9  
    10  //- @+9"multiLine" defines/binding VarMultiLine
    11  //- VarMultiLineDoc documents VarMultiLine
    12  //- VarMultiLineDoc.node/kind doc
    13  //- VarMultiLineDoc.text "Multi-line doc.\n  spaced in.\nEOT"
    14  /**
    15   * Multi-line doc.
    16   *   spaced in.
    17   * EOT
    18   */
    19  const multiLine = 3;
    20  
    21  //- @+5"Class" defines/binding Class
    22  //- ClassDoc documents Class
    23  //- ClassDoc.node/kind doc
    24  //- ClassDoc.text "Class doc."
    25  /** Class doc. */
    26  class Class {
    27  //- @+5"property" defines/binding Property
    28  //- PropertyDoc documents Property
    29  //- PropertyDoc.node/kind doc
    30  //- PropertyDoc.text "Property doc."
    31    /** Property doc. */
    32    private property: string;
    33  
    34  //- @+5"method" defines/binding Method
    35  //- MethodDoc documents Method
    36  //- MethodDoc.node/kind doc
    37  //- MethodDoc.text "Method doc."
    38    /** Method doc. */
    39    method() {}
    40  
    41  //- @+8"method2" defines/binding Method2
    42  //- Method2Doc documents Method2
    43  //- Method2Doc.node/kind doc
    44  //- Method2Doc.text "Multi line doc.\n  Indented."
    45    /**
    46     * Multi line doc.
    47     *   Indented.
    48     */
    49    method2() {}
    50  }
    51  
    52  //- @+5"myFunc" defines/binding Function
    53  //- FunctionDoc documents Function
    54  //- FunctionDoc.node/kind doc
    55  //- FunctionDoc.text "Function doc."
    56  /** Function doc. */
    57  function myFunc() {}
    58  
    59  interface String {
    60  //- @+6"fontsize" defines/binding FontSize
    61  //- FontSize.tag/deprecated "The <font> element has been removed in HTML5.\nPrefer using CSS properties."
    62    /**
    63     * @deprecated The <font> element has been removed in HTML5.
    64     *             Prefer using CSS properties.
    65     */
    66    fontsize: (size: number) => string;
    67  //- @+3"big" defines/binding Big
    68  //- Big.tag/deprecated ""
    69    /** @deprecated */
    70    big: () => string;
    71  }
    72  
    73  //- @+3"PromiseAlias" defines/binding PromiseAlias
    74  //- PromiseAlias.tag/deprecated "dont use me"
    75  /** @deprecated dont use me */
    76  type PromiseAlias<T> = Promise<T>;
    77  
    78  //- @+3"Foo" defines/binding IFoo
    79  //- IFoo.tag/deprecated "use Bar"
    80  /** @deprecated use Bar */
    81  interface Foo {}
    82  
    83  //- @+3"depFunc" defines/binding DepFunc
    84  //- !{ DepFunc.tag/deprecated "is deprecated" }
    85  /**  @deprecated is deprecated */
    86  function depFunc() {}