# mod.ts
@sealed
export class A {
  #x = "x";

  @format("Hello, %s")
  greeting: string;

  @configurable(false)
  get x() {
    return this.#x;
  }

  @enumerable(false)
  greet() {
    return "hello";
  }

  method(@readonly param: string) {}
}

# diagnostics
error[missing-jsdoc]: exported symbol is missing JSDoc documentation
 --> /mod.ts:2:1
  | 
2 | export class A {
  | ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
 --> /mod.ts:5:3
  | 
5 |   @format("Hello, %s")
  |   ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
 --> /mod.ts:8:3
  | 
8 |   @configurable(false)
  |   ^


error[missing-return-type]: exported function is missing an explicit return type annotation
 --> /mod.ts:8:3
  | 
8 |   @configurable(false)
  |   ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
  --> /mod.ts:13:3
   | 
13 |   @enumerable(false)
   |   ^


error[missing-return-type]: exported function is missing an explicit return type annotation
  --> /mod.ts:13:3
   | 
13 |   @enumerable(false)
   |   ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
  --> /mod.ts:18:3
   | 
18 |   method(@readonly param: string) {}
   |   ^

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

@sealed
class A

  @format("Hello, %s")
  greeting: string
  @configurable(false)
  get x()
  @enumerable(false)
  greet()
  method(@readonly param: string): void


# output.json
{
  "symbols": [
    {
      "name": "A",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 1,
            "col": 0,
            "byteIndex": 8
          },
          "declarationKind": "export",
          "kind": "class",
          "def": {
            "properties": [
              {
                "tsType": {
                  "repr": "string",
                  "kind": "keyword",
                  "value": "string"
                },
                "decorators": [
                  {
                    "name": "format",
                    "args": [
                      "\"Hello, %s\""
                    ],
                    "location": {
                      "filename": "file:///mod.ts",
                      "line": 4,
                      "col": 3,
                      "byteIndex": 41
                    }
                  }
                ],
                "name": "greeting",
                "location": {
                  "filename": "file:///mod.ts",
                  "line": 4,
                  "col": 2,
                  "byteIndex": 40
                }
              }
            ],
            "methods": [
              {
                "name": "x",
                "kind": "getter",
                "functionDef": {
                  "params": [],
                  "hasBody": true,
                  "decorators": [
                    {
                      "name": "configurable",
                      "args": [
                        "false"
                      ],
                      "location": {
                        "filename": "file:///mod.ts",
                        "line": 7,
                        "col": 3,
                        "byteIndex": 85
                      }
                    }
                  ]
                },
                "location": {
                  "filename": "file:///mod.ts",
                  "line": 7,
                  "col": 2,
                  "byteIndex": 84
                }
              },
              {
                "name": "greet",
                "kind": "method",
                "functionDef": {
                  "params": [],
                  "hasBody": true,
                  "decorators": [
                    {
                      "name": "enumerable",
                      "args": [
                        "false"
                      ],
                      "location": {
                        "filename": "file:///mod.ts",
                        "line": 12,
                        "col": 3,
                        "byteIndex": 145
                      }
                    }
                  ]
                },
                "location": {
                  "filename": "file:///mod.ts",
                  "line": 12,
                  "col": 2,
                  "byteIndex": 144
                }
              },
              {
                "name": "method",
                "kind": "method",
                "functionDef": {
                  "params": [
                    {
                      "kind": "identifier",
                      "name": "param",
                      "optional": false,
                      "decorators": [
                        {
                          "name": "readonly",
                          "location": {
                            "filename": "file:///mod.ts",
                            "line": 17,
                            "col": 10,
                            "byteIndex": 210
                          }
                        }
                      ],
                      "tsType": {
                        "repr": "string",
                        "kind": "keyword",
                        "value": "string"
                      }
                    }
                  ],
                  "returnType": {
                    "repr": "void",
                    "kind": "keyword",
                    "value": "void"
                  },
                  "hasBody": true
                },
                "location": {
                  "filename": "file:///mod.ts",
                  "line": 17,
                  "col": 2,
                  "byteIndex": 202
                }
              }
            ],
            "decorators": [
              {
                "name": "sealed",
                "location": {
                  "filename": "file:///mod.ts",
                  "line": 0,
                  "col": 1,
                  "byteIndex": 1
                }
              }
            ]
          }
        }
      ]
    }
  ]
}
