# mod.ts
export * from "./other.ts";

// there was a bug where it was missing some diagnostics
// here because of clashing 
class Internal1 {}
class Internal2 {}

/** Test */
export class MyClass {
  /** Test */
  internal: Internal1;
  /** Test */
  internal2: Internal2;
}

# other.ts
/** Test */
export const Test1 = 1;
/** Test */
export const Test2 = 1;
/** Test */
export const Test3 = 1;
/** Test */
export const Test4 = 1;
/** Test */
export const Test5 = 1;
/** Test */
export const Test6 = 1;
/** Test */
export const Test7 = 1;
/** Test */
export const Test8 = 1;
/** Test */
export const Test9 = 1;
/** Test */
export const Test10 = 1;

# diagnostics
error[private-type-ref]: public type 'MyClass.prototype.internal' references private type 'Internal1'
  --> /mod.ts:11:3
   | 
11 |   internal: Internal1;
   |   ^
   = hint: make the referenced type public or remove the reference
   | 
 5 | class Internal1 {}
   | - 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 'MyClass.prototype.internal2' references private type 'Internal2'
  --> /mod.ts:13:3
   | 
13 |   internal2: Internal2;
   |   ^
   = hint: make the referenced type public or remove the reference
   | 
 6 | class Internal2 {}
   | - 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:///other.ts:2:14

const Test1: 1
  Test

Defined in file:///other.ts:20:14

const Test10: 1
  Test

Defined in file:///other.ts:4:14

const Test2: 1
  Test

Defined in file:///other.ts:6:14

const Test3: 1
  Test

Defined in file:///other.ts:8:14

const Test4: 1
  Test

Defined in file:///other.ts:10:14

const Test5: 1
  Test

Defined in file:///other.ts:12:14

const Test6: 1
  Test

Defined in file:///other.ts:14:14

const Test7: 1
  Test

Defined in file:///other.ts:16:14

const Test8: 1
  Test

Defined in file:///other.ts:18:14

const Test9: 1
  Test

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

private class Internal1


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

private class Internal2


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

class MyClass
  Test

  internal: Internal1
    Test
  internal2: Internal2
    Test


# output.json
[
  {
    "name": "MyClass",
    "isDefault": false,
    "location": {
      "filename": "file:///mod.ts",
      "line": 9,
      "col": 0,
      "byteIndex": 166
    },
    "declarationKind": "export",
    "jsDoc": {
      "doc": "Test"
    },
    "kind": "class",
    "classDef": {
      "isAbstract": false,
      "constructors": [],
      "properties": [
        {
          "jsDoc": {
            "doc": "Test"
          },
          "tsType": {
            "repr": "Internal1",
            "kind": "typeRef",
            "typeRef": {
              "typeParams": null,
              "typeName": "Internal1"
            }
          },
          "readonly": false,
          "accessibility": null,
          "optional": false,
          "isAbstract": false,
          "isStatic": false,
          "name": "internal",
          "location": {
            "filename": "file:///mod.ts",
            "line": 11,
            "col": 2,
            "byteIndex": 205
          }
        },
        {
          "jsDoc": {
            "doc": "Test"
          },
          "tsType": {
            "repr": "Internal2",
            "kind": "typeRef",
            "typeRef": {
              "typeParams": null,
              "typeName": "Internal2"
            }
          },
          "readonly": false,
          "accessibility": null,
          "optional": false,
          "isAbstract": false,
          "isStatic": false,
          "name": "internal2",
          "location": {
            "filename": "file:///mod.ts",
            "line": 13,
            "col": 2,
            "byteIndex": 242
          }
        }
      ],
      "indexSignatures": [],
      "methods": [],
      "extends": null,
      "implements": [],
      "typeParams": [],
      "superTypeParams": []
    }
  },
  {
    "name": "Test1",
    "isDefault": false,
    "location": {
      "filename": "file:///other.ts",
      "line": 2,
      "col": 13,
      "byteIndex": 25
    },
    "declarationKind": "export",
    "jsDoc": {
      "doc": "Test"
    },
    "kind": "variable",
    "variableDef": {
      "tsType": {
        "repr": "1",
        "kind": "literal",
        "literal": {
          "kind": "number",
          "number": 1.0
        }
      },
      "kind": "const"
    }
  },
  {
    "name": "Test2",
    "isDefault": false,
    "location": {
      "filename": "file:///other.ts",
      "line": 4,
      "col": 13,
      "byteIndex": 61
    },
    "declarationKind": "export",
    "jsDoc": {
      "doc": "Test"
    },
    "kind": "variable",
    "variableDef": {
      "tsType": {
        "repr": "1",
        "kind": "literal",
        "literal": {
          "kind": "number",
          "number": 1.0
        }
      },
      "kind": "const"
    }
  },
  {
    "name": "Test3",
    "isDefault": false,
    "location": {
      "filename": "file:///other.ts",
      "line": 6,
      "col": 13,
      "byteIndex": 97
    },
    "declarationKind": "export",
    "jsDoc": {
      "doc": "Test"
    },
    "kind": "variable",
    "variableDef": {
      "tsType": {
        "repr": "1",
        "kind": "literal",
        "literal": {
          "kind": "number",
          "number": 1.0
        }
      },
      "kind": "const"
    }
  },
  {
    "name": "Test4",
    "isDefault": false,
    "location": {
      "filename": "file:///other.ts",
      "line": 8,
      "col": 13,
      "byteIndex": 133
    },
    "declarationKind": "export",
    "jsDoc": {
      "doc": "Test"
    },
    "kind": "variable",
    "variableDef": {
      "tsType": {
        "repr": "1",
        "kind": "literal",
        "literal": {
          "kind": "number",
          "number": 1.0
        }
      },
      "kind": "const"
    }
  },
  {
    "name": "Test5",
    "isDefault": false,
    "location": {
      "filename": "file:///other.ts",
      "line": 10,
      "col": 13,
      "byteIndex": 169
    },
    "declarationKind": "export",
    "jsDoc": {
      "doc": "Test"
    },
    "kind": "variable",
    "variableDef": {
      "tsType": {
        "repr": "1",
        "kind": "literal",
        "literal": {
          "kind": "number",
          "number": 1.0
        }
      },
      "kind": "const"
    }
  },
  {
    "name": "Test6",
    "isDefault": false,
    "location": {
      "filename": "file:///other.ts",
      "line": 12,
      "col": 13,
      "byteIndex": 205
    },
    "declarationKind": "export",
    "jsDoc": {
      "doc": "Test"
    },
    "kind": "variable",
    "variableDef": {
      "tsType": {
        "repr": "1",
        "kind": "literal",
        "literal": {
          "kind": "number",
          "number": 1.0
        }
      },
      "kind": "const"
    }
  },
  {
    "name": "Test7",
    "isDefault": false,
    "location": {
      "filename": "file:///other.ts",
      "line": 14,
      "col": 13,
      "byteIndex": 241
    },
    "declarationKind": "export",
    "jsDoc": {
      "doc": "Test"
    },
    "kind": "variable",
    "variableDef": {
      "tsType": {
        "repr": "1",
        "kind": "literal",
        "literal": {
          "kind": "number",
          "number": 1.0
        }
      },
      "kind": "const"
    }
  },
  {
    "name": "Test8",
    "isDefault": false,
    "location": {
      "filename": "file:///other.ts",
      "line": 16,
      "col": 13,
      "byteIndex": 277
    },
    "declarationKind": "export",
    "jsDoc": {
      "doc": "Test"
    },
    "kind": "variable",
    "variableDef": {
      "tsType": {
        "repr": "1",
        "kind": "literal",
        "literal": {
          "kind": "number",
          "number": 1.0
        }
      },
      "kind": "const"
    }
  },
  {
    "name": "Test9",
    "isDefault": false,
    "location": {
      "filename": "file:///other.ts",
      "line": 18,
      "col": 13,
      "byteIndex": 313
    },
    "declarationKind": "export",
    "jsDoc": {
      "doc": "Test"
    },
    "kind": "variable",
    "variableDef": {
      "tsType": {
        "repr": "1",
        "kind": "literal",
        "literal": {
          "kind": "number",
          "number": 1.0
        }
      },
      "kind": "const"
    }
  },
  {
    "name": "Test10",
    "isDefault": false,
    "location": {
      "filename": "file:///other.ts",
      "line": 20,
      "col": 13,
      "byteIndex": 349
    },
    "declarationKind": "export",
    "jsDoc": {
      "doc": "Test"
    },
    "kind": "variable",
    "variableDef": {
      "tsType": {
        "repr": "1",
        "kind": "literal",
        "literal": {
          "kind": "number",
          "number": 1.0
        }
      },
      "kind": "const"
    }
  },
  {
    "name": "Internal1",
    "isDefault": false,
    "location": {
      "filename": "file:///mod.ts",
      "line": 5,
      "col": 0,
      "byteIndex": 115
    },
    "declarationKind": "private",
    "kind": "class",
    "classDef": {
      "isAbstract": false,
      "constructors": [],
      "properties": [],
      "indexSignatures": [],
      "methods": [],
      "extends": null,
      "implements": [],
      "typeParams": [],
      "superTypeParams": []
    }
  },
  {
    "name": "Internal2",
    "isDefault": false,
    "location": {
      "filename": "file:///mod.ts",
      "line": 6,
      "col": 0,
      "byteIndex": 134
    },
    "declarationKind": "private",
    "kind": "class",
    "classDef": {
      "isAbstract": false,
      "constructors": [],
      "properties": [],
      "indexSignatures": [],
      "methods": [],
      "extends": null,
      "implements": [],
      "typeParams": [],
      "superTypeParams": []
    }
  }
]
