# mod.ts
/** Class doc */
export class Foobar extends Fizz implements Buzz, Aldrin {
    private private1?: boolean;
    protected protected1: number;
    public public1: boolean;
    public2: number;
    override public3: string;
    m = new Map<string, string>();
    s = "foo";
    a = [1, "foo"];
    fn = (a: string): void => {};

    /** Test */
    [prop: string]: number;
    /** @ignore */
    [prop: number]: number;

    /** Constructor js doc */
    constructor(name: string, private private2: number, protected protected2: number) {}

    /** Async foo method */
    async foo(): Promise<void> {
        //
    }

    /** Sync bar method */
    bar?(): void {
        //
    }

    override s() {}
}

# diagnostics
error[missing-jsdoc]: exported symbol is missing JSDoc documentation
 --> /mod.ts:4:5
  | 
4 |     protected protected1: number;
  |     ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
 --> /mod.ts:5:5
  | 
5 |     public public1: boolean;
  |     ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
 --> /mod.ts:6:5
  | 
6 |     public2: number;
  |     ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
 --> /mod.ts:7:5
  | 
7 |     override public3: string;
  |     ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
 --> /mod.ts:8:5
  | 
8 |     m = new Map<string, string>();
  |     ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
 --> /mod.ts:9:5
  | 
9 |     s = "foo";
  |     ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
  --> /mod.ts:10:5
   | 
10 |     a = [1, "foo"];
   |     ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
  --> /mod.ts:11:5
   | 
11 |     fn = (a: string): void => {};
   |     ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
  --> /mod.ts:31:5
   | 
31 |     override s() {}
   |     ^

# output.txt
Defined in file:///mod.ts:2:1

class Foobar extends Fizz implements Buzz, Aldrin
  Class doc

  constructor(name: string, private private2: number, protected protected2: number)
    Constructor js doc
  protected protected1: number
  public1: boolean
  public2: number
  override public3: string
  m: Map<string, string>
  s: string
  a: (number | string)[]
  fn: (a: string) => void
  [prop: string]: number
  async foo(): Promise<void>
    Async foo method
  bar?(): void
    Sync bar method
  override s(): void


# output.json
[
  {
    "name": "Foobar",
    "isDefault": false,
    "location": {
      "filename": "file:///mod.ts",
      "line": 2,
      "col": 0,
      "byteIndex": 17
    },
    "declarationKind": "export",
    "jsDoc": {
      "doc": "Class doc"
    },
    "kind": "class",
    "classDef": {
      "isAbstract": false,
      "constructors": [
        {
          "jsDoc": {
            "doc": "Constructor js doc"
          },
          "accessibility": null,
          "hasBody": true,
          "name": "constructor",
          "params": [
            {
              "kind": "identifier",
              "name": "name",
              "optional": false,
              "tsType": {
                "repr": "string",
                "kind": "keyword",
                "keyword": "string"
              }
            },
            {
              "accessibility": "private",
              "kind": "identifier",
              "name": "private2",
              "optional": false,
              "tsType": {
                "repr": "number",
                "kind": "keyword",
                "keyword": "number"
              }
            },
            {
              "accessibility": "protected",
              "kind": "identifier",
              "name": "protected2",
              "optional": false,
              "tsType": {
                "repr": "number",
                "kind": "keyword",
                "keyword": "number"
              }
            }
          ],
          "location": {
            "filename": "file:///mod.ts",
            "line": 19,
            "col": 4,
            "byteIndex": 453
          }
        }
      ],
      "properties": [
        {
          "tsType": {
            "repr": "boolean",
            "kind": "keyword",
            "keyword": "boolean"
          },
          "readonly": false,
          "accessibility": "private",
          "optional": true,
          "isAbstract": false,
          "isStatic": false,
          "name": "private1",
          "location": {
            "filename": "file:///mod.ts",
            "line": 3,
            "col": 4,
            "byteIndex": 80
          }
        },
        {
          "tsType": {
            "repr": "number",
            "kind": "keyword",
            "keyword": "number"
          },
          "readonly": false,
          "accessibility": "protected",
          "optional": false,
          "isAbstract": false,
          "isStatic": false,
          "name": "protected1",
          "location": {
            "filename": "file:///mod.ts",
            "line": 4,
            "col": 4,
            "byteIndex": 112
          }
        },
        {
          "tsType": {
            "repr": "boolean",
            "kind": "keyword",
            "keyword": "boolean"
          },
          "readonly": false,
          "accessibility": "public",
          "optional": false,
          "isAbstract": false,
          "isStatic": false,
          "name": "public1",
          "location": {
            "filename": "file:///mod.ts",
            "line": 5,
            "col": 4,
            "byteIndex": 146
          }
        },
        {
          "tsType": {
            "repr": "number",
            "kind": "keyword",
            "keyword": "number"
          },
          "readonly": false,
          "accessibility": null,
          "optional": false,
          "isAbstract": false,
          "isStatic": false,
          "name": "public2",
          "location": {
            "filename": "file:///mod.ts",
            "line": 6,
            "col": 4,
            "byteIndex": 175
          }
        },
        {
          "tsType": {
            "repr": "string",
            "kind": "keyword",
            "keyword": "string"
          },
          "readonly": false,
          "accessibility": null,
          "optional": false,
          "isAbstract": false,
          "isStatic": false,
          "isOverride": true,
          "name": "public3",
          "location": {
            "filename": "file:///mod.ts",
            "line": 7,
            "col": 4,
            "byteIndex": 196
          }
        },
        {
          "tsType": {
            "repr": "Map",
            "kind": "typeRef",
            "typeRef": {
              "typeParams": [
                {
                  "repr": "string",
                  "kind": "keyword",
                  "keyword": "string"
                },
                {
                  "repr": "string",
                  "kind": "keyword",
                  "keyword": "string"
                }
              ],
              "typeName": "Map"
            }
          },
          "readonly": false,
          "accessibility": null,
          "optional": false,
          "isAbstract": false,
          "isStatic": false,
          "name": "m",
          "location": {
            "filename": "file:///mod.ts",
            "line": 8,
            "col": 4,
            "byteIndex": 226
          }
        },
        {
          "tsType": {
            "repr": "string",
            "kind": "keyword",
            "keyword": "string"
          },
          "readonly": false,
          "accessibility": null,
          "optional": false,
          "isAbstract": false,
          "isStatic": false,
          "name": "s",
          "location": {
            "filename": "file:///mod.ts",
            "line": 9,
            "col": 4,
            "byteIndex": 261
          }
        },
        {
          "tsType": {
            "repr": "",
            "kind": "array",
            "array": {
              "repr": "",
              "kind": "union",
              "union": [
                {
                  "repr": "number",
                  "kind": "keyword",
                  "keyword": "number"
                },
                {
                  "repr": "string",
                  "kind": "keyword",
                  "keyword": "string"
                }
              ]
            }
          },
          "readonly": false,
          "accessibility": null,
          "optional": false,
          "isAbstract": false,
          "isStatic": false,
          "name": "a",
          "location": {
            "filename": "file:///mod.ts",
            "line": 10,
            "col": 4,
            "byteIndex": 276
          }
        },
        {
          "tsType": {
            "repr": "",
            "kind": "fnOrConstructor",
            "fnOrConstructor": {
              "constructor": false,
              "tsType": {
                "repr": "void",
                "kind": "keyword",
                "keyword": "void"
              },
              "params": [
                {
                  "kind": "identifier",
                  "name": "a",
                  "optional": false,
                  "tsType": {
                    "repr": "string",
                    "kind": "keyword",
                    "keyword": "string"
                  }
                }
              ],
              "typeParams": []
            }
          },
          "readonly": false,
          "accessibility": null,
          "optional": false,
          "isAbstract": false,
          "isStatic": false,
          "name": "fn",
          "location": {
            "filename": "file:///mod.ts",
            "line": 11,
            "col": 4,
            "byteIndex": 296
          }
        }
      ],
      "indexSignatures": [
        {
          "jsDoc": {
            "doc": "Test"
          },
          "readonly": false,
          "params": [
            {
              "kind": "identifier",
              "name": "prop",
              "optional": false,
              "tsType": {
                "repr": "string",
                "kind": "keyword",
                "keyword": "string"
              }
            }
          ],
          "tsType": {
            "repr": "number",
            "kind": "keyword",
            "keyword": "number"
          },
          "location": {
            "filename": "file:///mod.ts",
            "line": 14,
            "col": 4,
            "byteIndex": 347
          }
        }
      ],
      "methods": [
        {
          "jsDoc": {
            "doc": "Async foo method"
          },
          "accessibility": null,
          "optional": false,
          "isAbstract": false,
          "isStatic": false,
          "name": "foo",
          "kind": "method",
          "functionDef": {
            "params": [],
            "returnType": {
              "repr": "Promise",
              "kind": "typeRef",
              "typeRef": {
                "typeParams": [
                  {
                    "repr": "void",
                    "kind": "keyword",
                    "keyword": "void"
                  }
                ],
                "typeName": "Promise"
              }
            },
            "hasBody": true,
            "isAsync": true,
            "isGenerator": false,
            "typeParams": []
          },
          "location": {
            "filename": "file:///mod.ts",
            "line": 22,
            "col": 4,
            "byteIndex": 571
          }
        },
        {
          "jsDoc": {
            "doc": "Sync bar method"
          },
          "accessibility": null,
          "optional": true,
          "isAbstract": false,
          "isStatic": false,
          "name": "bar",
          "kind": "method",
          "functionDef": {
            "params": [],
            "returnType": {
              "repr": "void",
              "kind": "keyword",
              "keyword": "void"
            },
            "hasBody": true,
            "isAsync": false,
            "isGenerator": false,
            "typeParams": []
          },
          "location": {
            "filename": "file:///mod.ts",
            "line": 27,
            "col": 4,
            "byteIndex": 649
          }
        },
        {
          "accessibility": null,
          "optional": false,
          "isAbstract": false,
          "isStatic": false,
          "isOverride": true,
          "name": "s",
          "kind": "method",
          "functionDef": {
            "params": [],
            "returnType": {
              "repr": "void",
              "kind": "keyword",
              "keyword": "void"
            },
            "hasBody": true,
            "isAsync": false,
            "isGenerator": false,
            "typeParams": []
          },
          "location": {
            "filename": "file:///mod.ts",
            "line": 31,
            "col": 4,
            "byteIndex": 686
          }
        }
      ],
      "extends": "Fizz",
      "implements": [
        {
          "repr": "Buzz",
          "kind": "typeRef",
          "typeRef": {
            "typeParams": null,
            "typeName": "Buzz"
          }
        },
        {
          "repr": "Aldrin",
          "kind": "typeRef",
          "typeRef": {
            "typeParams": null,
            "typeName": "Aldrin"
          }
        }
      ],
      "typeParams": [],
      "superTypeParams": []
    }
  }
]
