# mod.ts
/** A simple class expression */
export const Foo = class {
  /** A method */
  bar(): void {}
};

/** A class expression extending another */
export const Bar = class extends Foo {
  /** A constructor */
  constructor(public name: string) {
    super();
  }
};

/** A named class expression */
export const Baz = class MyClass {
  /** A property */
  prop: string = "";
};

# output.txt
Defined in file:///mod.ts:7:14

class Bar extends Foo
  A class expression extending another

  constructor(public name: string)
    A constructor

Defined in file:///mod.ts:15:14

class Baz
  A named class expression

  prop: string
    A property

Defined in file:///mod.ts:1:14

class Foo
  A simple class expression

  bar(): void
    A method


# output.json
{
  "symbols": [
    {
      "name": "Foo",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 1,
            "col": 13,
            "byteIndex": 46
          },
          "declarationKind": "export",
          "jsDoc": {
            "doc": "A simple class expression"
          },
          "kind": "class",
          "def": {
            "methods": [
              {
                "jsDoc": {
                  "doc": "A method"
                },
                "name": "bar",
                "kind": "method",
                "functionDef": {
                  "params": [],
                  "returnType": {
                    "repr": "void",
                    "kind": "keyword",
                    "value": "void"
                  },
                  "hasBody": true
                },
                "location": {
                  "filename": "file:///mod.ts",
                  "line": 3,
                  "col": 2,
                  "byteIndex": 80
                }
              }
            ]
          }
        }
      ]
    },
    {
      "name": "Bar",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 7,
            "col": 13,
            "byteIndex": 156
          },
          "declarationKind": "export",
          "jsDoc": {
            "doc": "A class expression extending another"
          },
          "kind": "class",
          "def": {
            "constructors": [
              {
                "jsDoc": {
                  "doc": "A constructor"
                },
                "hasBody": true,
                "name": "constructor",
                "params": [
                  {
                    "accessibility": "public",
                    "kind": "identifier",
                    "name": "name",
                    "optional": false,
                    "tsType": {
                      "repr": "string",
                      "kind": "keyword",
                      "value": "string"
                    }
                  }
                ],
                "location": {
                  "filename": "file:///mod.ts",
                  "line": 9,
                  "col": 2,
                  "byteIndex": 207
                }
              }
            ],
            "extends": "Foo"
          }
        }
      ]
    },
    {
      "name": "Baz",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 15,
            "col": 13,
            "byteIndex": 308
          },
          "declarationKind": "export",
          "jsDoc": {
            "doc": "A named class expression"
          },
          "kind": "class",
          "def": {
            "defName": "MyClass",
            "properties": [
              {
                "jsDoc": {
                  "doc": "A property"
                },
                "tsType": {
                  "repr": "string",
                  "kind": "keyword",
                  "value": "string"
                },
                "name": "prop",
                "location": {
                  "filename": "file:///mod.ts",
                  "line": 17,
                  "col": 2,
                  "byteIndex": 352
                }
              }
            ]
          }
        }
      ]
    }
  ]
}
