# 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:1:1

class MyClass
  Comment

  protected secondMethod(): YesDiagnostic

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

private interface YesDiagnostic



# output.json
{
  "symbols": [
    {
      "name": "MyClass",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 1,
            "col": 0,
            "byteIndex": 15
          },
          "declarationKind": "export",
          "jsDoc": {
            "doc": "Comment"
          },
          "kind": "class",
          "def": {
            "methods": [
              {
                "accessibility": "protected",
                "name": "secondMethod",
                "kind": "method",
                "functionDef": {
                  "params": [],
                  "returnType": {
                    "repr": "YesDiagnostic",
                    "kind": "typeRef",
                    "value": {
                      "typeName": "YesDiagnostic",
                      "resolution": {
                        "kind": "local"
                      }
                    }
                  },
                  "hasBody": true
                },
                "location": {
                  "filename": "file:///mod.ts",
                  "line": 2,
                  "col": 2,
                  "byteIndex": 40
                }
              },
              {
                "accessibility": "private",
                "name": "myMethod",
                "kind": "method",
                "functionDef": {
                  "params": [],
                  "returnType": {
                    "repr": "NoDiagnostic",
                    "kind": "typeRef",
                    "value": {
                      "typeName": "NoDiagnostic",
                      "resolution": {
                        "kind": "local"
                      }
                    }
                  },
                  "hasBody": true
                },
                "location": {
                  "filename": "file:///mod.ts",
                  "line": 5,
                  "col": 2,
                  "byteIndex": 89
                }
              }
            ]
          }
        }
      ]
    },
    {
      "name": "YesDiagnostic",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 9,
            "col": 0,
            "byteIndex": 131
          },
          "declarationKind": "private",
          "kind": "interface",
          "def": {}
        }
      ]
    }
  ]
}
