# mod.ts
interface Foo {
}
interface Bar {
}
/**
 * Interface js doc
 */
export interface Reader extends Foo, Bar {
    /** Read n bytes */
    read?(buf: Uint8Array, something: unknown): Promise<number>
    /** Test */
    [key: string]: number;
}

# diagnostics
error[private-type-ref]: public type 'Reader' references private type 'Foo'
 --> /mod.ts:8:1
  | 
8 | export interface Reader extends Foo, Bar {
  | ^
  = hint: make the referenced type public or remove the reference
  | 
1 | interface Foo {
  | - this is the referenced type
  | 

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


error[private-type-ref]: public type 'Reader' references private type 'Bar'
 --> /mod.ts:8:1
  | 
8 | export interface Reader extends Foo, Bar {
  | ^
  = hint: make the referenced type public or remove the reference
  | 
3 | interface Bar {
  | - this is the referenced type
  | 

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

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

private interface Bar


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

private interface Foo


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

interface Reader extends Foo, Bar
  Interface js doc

  read?(buf: Uint8Array, something: unknown): Promise<number>
    Read n bytes
  [key: string]: number


# output.json
[
  {
    "name": "Reader",
    "isDefault": false,
    "location": {
      "filename": "file:///mod.ts",
      "line": 8,
      "col": 0,
      "byteIndex": 64
    },
    "declarationKind": "export",
    "jsDoc": {
      "doc": "Interface js doc"
    },
    "kind": "interface",
    "interfaceDef": {
      "extends": [
        {
          "repr": "Foo",
          "kind": "typeRef",
          "typeRef": {
            "typeParams": null,
            "typeName": "Foo"
          }
        },
        {
          "repr": "Bar",
          "kind": "typeRef",
          "typeRef": {
            "typeParams": null,
            "typeName": "Bar"
          }
        }
      ],
      "constructors": [],
      "methods": [
        {
          "name": "read",
          "jsDoc": {
            "doc": "Read n bytes"
          },
          "kind": "method",
          "location": {
            "filename": "file:///mod.ts",
            "line": 10,
            "col": 4,
            "byteIndex": 135
          },
          "params": [
            {
              "kind": "identifier",
              "name": "buf",
              "optional": false,
              "tsType": {
                "repr": "Uint8Array",
                "kind": "typeRef",
                "typeRef": {
                  "typeParams": null,
                  "typeName": "Uint8Array"
                }
              }
            },
            {
              "kind": "identifier",
              "name": "something",
              "optional": false,
              "tsType": {
                "repr": "unknown",
                "kind": "keyword",
                "keyword": "unknown"
              }
            }
          ],
          "optional": true,
          "returnType": {
            "repr": "Promise",
            "kind": "typeRef",
            "typeRef": {
              "typeParams": [
                {
                  "repr": "number",
                  "kind": "keyword",
                  "keyword": "number"
                }
              ],
              "typeName": "Promise"
            }
          },
          "typeParams": []
        }
      ],
      "properties": [],
      "callSignatures": [],
      "indexSignatures": [
        {
          "jsDoc": {
            "doc": "Test"
          },
          "readonly": false,
          "params": [
            {
              "kind": "identifier",
              "name": "key",
              "optional": false,
              "tsType": {
                "repr": "string",
                "kind": "keyword",
                "keyword": "string"
              }
            }
          ],
          "tsType": {
            "repr": "number",
            "kind": "keyword",
            "keyword": "number"
          },
          "location": {
            "filename": "file:///mod.ts",
            "line": 12,
            "col": 4,
            "byteIndex": 215
          }
        }
      ],
      "typeParams": []
    }
  },
  {
    "name": "Foo",
    "isDefault": false,
    "location": {
      "filename": "file:///mod.ts",
      "line": 1,
      "col": 0,
      "byteIndex": 0
    },
    "declarationKind": "private",
    "kind": "interface",
    "interfaceDef": {
      "extends": [],
      "constructors": [],
      "methods": [],
      "properties": [],
      "callSignatures": [],
      "indexSignatures": [],
      "typeParams": []
    }
  },
  {
    "name": "Bar",
    "isDefault": false,
    "location": {
      "filename": "file:///mod.ts",
      "line": 3,
      "col": 0,
      "byteIndex": 18
    },
    "declarationKind": "private",
    "kind": "interface",
    "interfaceDef": {
      "extends": [],
      "constructors": [],
      "methods": [],
      "properties": [],
      "callSignatures": [],
      "indexSignatures": [],
      "typeParams": []
    }
  }
]
