# 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:1: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
{
  "symbols": [
    {
      "name": "Foobar",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 1,
            "col": 0,
            "byteIndex": 17
          },
          "declarationKind": "export",
          "jsDoc": {
            "doc": "Class doc"
          },
          "kind": "class",
          "def": {
            "constructors": [
              {
                "jsDoc": {
                  "doc": "Constructor js doc"
                },
                "hasBody": true,
                "name": "constructor",
                "params": [
                  {
                    "kind": "identifier",
                    "name": "name",
                    "optional": false,
                    "tsType": {
                      "repr": "string",
                      "kind": "keyword",
                      "value": "string"
                    }
                  },
                  {
                    "accessibility": "private",
                    "kind": "identifier",
                    "name": "private2",
                    "optional": false,
                    "tsType": {
                      "repr": "number",
                      "kind": "keyword",
                      "value": "number"
                    }
                  },
                  {
                    "accessibility": "protected",
                    "kind": "identifier",
                    "name": "protected2",
                    "optional": false,
                    "tsType": {
                      "repr": "number",
                      "kind": "keyword",
                      "value": "number"
                    }
                  }
                ],
                "location": {
                  "filename": "file:///mod.ts",
                  "line": 18,
                  "col": 4,
                  "byteIndex": 453
                }
              }
            ],
            "properties": [
              {
                "tsType": {
                  "repr": "boolean",
                  "kind": "keyword",
                  "value": "boolean"
                },
                "accessibility": "private",
                "optional": true,
                "name": "private1",
                "location": {
                  "filename": "file:///mod.ts",
                  "line": 2,
                  "col": 4,
                  "byteIndex": 80
                }
              },
              {
                "tsType": {
                  "repr": "number",
                  "kind": "keyword",
                  "value": "number"
                },
                "accessibility": "protected",
                "name": "protected1",
                "location": {
                  "filename": "file:///mod.ts",
                  "line": 3,
                  "col": 4,
                  "byteIndex": 112
                }
              },
              {
                "tsType": {
                  "repr": "boolean",
                  "kind": "keyword",
                  "value": "boolean"
                },
                "accessibility": "public",
                "name": "public1",
                "location": {
                  "filename": "file:///mod.ts",
                  "line": 4,
                  "col": 4,
                  "byteIndex": 146
                }
              },
              {
                "tsType": {
                  "repr": "number",
                  "kind": "keyword",
                  "value": "number"
                },
                "name": "public2",
                "location": {
                  "filename": "file:///mod.ts",
                  "line": 5,
                  "col": 4,
                  "byteIndex": 175
                }
              },
              {
                "tsType": {
                  "repr": "string",
                  "kind": "keyword",
                  "value": "string"
                },
                "isOverride": true,
                "name": "public3",
                "location": {
                  "filename": "file:///mod.ts",
                  "line": 6,
                  "col": 4,
                  "byteIndex": 196
                }
              },
              {
                "tsType": {
                  "repr": "Map",
                  "kind": "typeRef",
                  "value": {
                    "typeParams": [
                      {
                        "repr": "string",
                        "kind": "keyword",
                        "value": "string"
                      },
                      {
                        "repr": "string",
                        "kind": "keyword",
                        "value": "string"
                      }
                    ],
                    "typeName": "Map"
                  }
                },
                "name": "m",
                "location": {
                  "filename": "file:///mod.ts",
                  "line": 7,
                  "col": 4,
                  "byteIndex": 226
                }
              },
              {
                "tsType": {
                  "repr": "string",
                  "kind": "keyword",
                  "value": "string"
                },
                "name": "s",
                "location": {
                  "filename": "file:///mod.ts",
                  "line": 8,
                  "col": 4,
                  "byteIndex": 261
                }
              },
              {
                "tsType": {
                  "kind": "array",
                  "value": {
                    "kind": "union",
                    "value": [
                      {
                        "repr": "number",
                        "kind": "keyword",
                        "value": "number"
                      },
                      {
                        "repr": "string",
                        "kind": "keyword",
                        "value": "string"
                      }
                    ]
                  }
                },
                "name": "a",
                "location": {
                  "filename": "file:///mod.ts",
                  "line": 9,
                  "col": 4,
                  "byteIndex": 276
                }
              },
              {
                "tsType": {
                  "kind": "fnOrConstructor",
                  "value": {
                    "constructor": false,
                    "tsType": {
                      "repr": "void",
                      "kind": "keyword",
                      "value": "void"
                    },
                    "params": [
                      {
                        "kind": "identifier",
                        "name": "a",
                        "optional": false,
                        "tsType": {
                          "repr": "string",
                          "kind": "keyword",
                          "value": "string"
                        }
                      }
                    ]
                  }
                },
                "name": "fn",
                "location": {
                  "filename": "file:///mod.ts",
                  "line": 10,
                  "col": 4,
                  "byteIndex": 296
                }
              }
            ],
            "indexSignatures": [
              {
                "jsDoc": {
                  "doc": "Test"
                },
                "params": [
                  {
                    "kind": "identifier",
                    "name": "prop",
                    "optional": false,
                    "tsType": {
                      "repr": "string",
                      "kind": "keyword",
                      "value": "string"
                    }
                  }
                ],
                "tsType": {
                  "repr": "number",
                  "kind": "keyword",
                  "value": "number"
                },
                "location": {
                  "filename": "file:///mod.ts",
                  "line": 13,
                  "col": 4,
                  "byteIndex": 347
                }
              }
            ],
            "methods": [
              {
                "jsDoc": {
                  "doc": "Async foo method"
                },
                "name": "foo",
                "kind": "method",
                "functionDef": {
                  "params": [],
                  "returnType": {
                    "repr": "Promise",
                    "kind": "typeRef",
                    "value": {
                      "typeParams": [
                        {
                          "repr": "void",
                          "kind": "keyword",
                          "value": "void"
                        }
                      ],
                      "typeName": "Promise"
                    }
                  },
                  "hasBody": true,
                  "isAsync": true
                },
                "location": {
                  "filename": "file:///mod.ts",
                  "line": 21,
                  "col": 4,
                  "byteIndex": 571
                }
              },
              {
                "jsDoc": {
                  "doc": "Sync bar method"
                },
                "optional": true,
                "name": "bar",
                "kind": "method",
                "functionDef": {
                  "params": [],
                  "returnType": {
                    "repr": "void",
                    "kind": "keyword",
                    "value": "void"
                  },
                  "hasBody": true
                },
                "location": {
                  "filename": "file:///mod.ts",
                  "line": 26,
                  "col": 4,
                  "byteIndex": 649
                }
              },
              {
                "isOverride": true,
                "name": "s",
                "kind": "method",
                "functionDef": {
                  "params": [],
                  "returnType": {
                    "repr": "void",
                    "kind": "keyword",
                    "value": "void"
                  },
                  "hasBody": true
                },
                "location": {
                  "filename": "file:///mod.ts",
                  "line": 30,
                  "col": 4,
                  "byteIndex": 686
                }
              }
            ],
            "extends": "Fizz",
            "implements": [
              {
                "repr": "Buzz",
                "kind": "typeRef",
                "value": {
                  "typeName": "Buzz"
                }
              },
              {
                "repr": "Aldrin",
                "kind": "typeRef",
                "value": {
                  "typeName": "Aldrin"
                }
              }
            ]
          }
        }
      ]
    }
  ]
}
