# mod.ts
/** Comment */
export class MyClass {
  protected secondMethod(): YesDiagnostic {
  }
  
  private myMethod(): NoDiagnostic {
  }
}

interface YesDiagnostic {}
// should not have any diagnostics because this is only referenced in a private member
interface NoDiagnostic {}

# diagnostics
error[private-type-ref]: public type 'MyClass.prototype.secondMethod' references private type 'YesDiagnostic'
  --> /mod.ts:3:3
   | 
 3 |   protected secondMethod(): YesDiagnostic {
   |   ^
   = hint: make the referenced type public or remove the reference
   | 
10 | interface YesDiagnostic {}
   | - this is the referenced type
   | 

  info: to ensure documentation is complete all types that are exposed in the public API must be public


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
 --> /mod.ts:3:3
  | 
3 |   protected secondMethod(): YesDiagnostic {
  |   ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
 --> /mod.ts:6:3
  | 
6 |   private myMethod(): NoDiagnostic {
  |   ^

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

class MyClass
  Comment

  protected secondMethod(): YesDiagnostic

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

private interface YesDiagnostic



# output.json
[
  {
    "name": "MyClass",
    "isDefault": false,
    "location": {
      "filename": "file:///mod.ts",
      "line": 2,
      "col": 0,
      "byteIndex": 15
    },
    "declarationKind": "export",
    "jsDoc": {
      "doc": "Comment"
    },
    "kind": "class",
    "classDef": {
      "isAbstract": false,
      "constructors": [],
      "properties": [],
      "indexSignatures": [],
      "methods": [
        {
          "accessibility": "protected",
          "optional": false,
          "isAbstract": false,
          "isStatic": false,
          "name": "secondMethod",
          "kind": "method",
          "functionDef": {
            "params": [],
            "returnType": {
              "repr": "YesDiagnostic",
              "kind": "typeRef",
              "typeRef": {
                "typeParams": null,
                "typeName": "YesDiagnostic"
              }
            },
            "hasBody": true,
            "isAsync": false,
            "isGenerator": false,
            "typeParams": []
          },
          "location": {
            "filename": "file:///mod.ts",
            "line": 3,
            "col": 2,
            "byteIndex": 40
          }
        },
        {
          "accessibility": "private",
          "optional": false,
          "isAbstract": false,
          "isStatic": false,
          "name": "myMethod",
          "kind": "method",
          "functionDef": {
            "params": [],
            "returnType": {
              "repr": "NoDiagnostic",
              "kind": "typeRef",
              "typeRef": {
                "typeParams": null,
                "typeName": "NoDiagnostic"
              }
            },
            "hasBody": true,
            "isAsync": false,
            "isGenerator": false,
            "typeParams": []
          },
          "location": {
            "filename": "file:///mod.ts",
            "line": 6,
            "col": 2,
            "byteIndex": 91
          }
        }
      ],
      "extends": null,
      "implements": [],
      "typeParams": [],
      "superTypeParams": []
    }
  },
  {
    "name": "YesDiagnostic",
    "isDefault": false,
    "location": {
      "filename": "file:///mod.ts",
      "line": 10,
      "col": 0,
      "byteIndex": 133
    },
    "declarationKind": "private",
    "kind": "interface",
    "interfaceDef": {
      "extends": [],
      "constructors": [],
      "methods": [],
      "properties": [],
      "callSignatures": [],
      "indexSignatures": [],
      "typeParams": []
    }
  }
]
