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

const Test1: 1
  Test

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

const Test10: 1
  Test

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

const Test2: 1
  Test

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

const Test3: 1
  Test

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

const Test4: 1
  Test

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

const Test5: 1
  Test

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

const Test6: 1
  Test

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

const Test7: 1
  Test

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

const Test8: 1
  Test

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

const Test9: 1
  Test

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

private class Internal1


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

private class Internal2


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

class MyClass
  Test

  internal: Internal1
    Test
  internal2: Internal2
    Test


# output.json
{
  "symbols": [
    {
      "name": "MyClass",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 8,
            "col": 0,
            "byteIndex": 165
          },
          "declarationKind": "export",
          "jsDoc": {
            "doc": "Test"
          },
          "kind": "class",
          "def": {
            "properties": [
              {
                "jsDoc": {
                  "doc": "Test"
                },
                "tsType": {
                  "repr": "Internal1",
                  "kind": "typeRef",
                  "value": {
                    "typeName": "Internal1",
                    "resolution": {
                      "kind": "local"
                    }
                  }
                },
                "name": "internal",
                "location": {
                  "filename": "file:///mod.ts",
                  "line": 10,
                  "col": 2,
                  "byteIndex": 204
                }
              },
              {
                "jsDoc": {
                  "doc": "Test"
                },
                "tsType": {
                  "repr": "Internal2",
                  "kind": "typeRef",
                  "value": {
                    "typeName": "Internal2",
                    "resolution": {
                      "kind": "local"
                    }
                  }
                },
                "name": "internal2",
                "location": {
                  "filename": "file:///mod.ts",
                  "line": 12,
                  "col": 2,
                  "byteIndex": 241
                }
              }
            ]
          }
        }
      ]
    },
    {
      "name": "Test1",
      "declarations": [
        {
          "location": {
            "filename": "file:///other.ts",
            "line": 1,
            "col": 13,
            "byteIndex": 25
          },
          "declarationKind": "export",
          "jsDoc": {
            "doc": "Test"
          },
          "kind": "variable",
          "def": {
            "tsType": {
              "repr": "1",
              "kind": "literal",
              "value": {
                "kind": "number",
                "number": 1.0
              }
            },
            "kind": "const"
          }
        }
      ]
    },
    {
      "name": "Test2",
      "declarations": [
        {
          "location": {
            "filename": "file:///other.ts",
            "line": 3,
            "col": 13,
            "byteIndex": 61
          },
          "declarationKind": "export",
          "jsDoc": {
            "doc": "Test"
          },
          "kind": "variable",
          "def": {
            "tsType": {
              "repr": "1",
              "kind": "literal",
              "value": {
                "kind": "number",
                "number": 1.0
              }
            },
            "kind": "const"
          }
        }
      ]
    },
    {
      "name": "Test3",
      "declarations": [
        {
          "location": {
            "filename": "file:///other.ts",
            "line": 5,
            "col": 13,
            "byteIndex": 97
          },
          "declarationKind": "export",
          "jsDoc": {
            "doc": "Test"
          },
          "kind": "variable",
          "def": {
            "tsType": {
              "repr": "1",
              "kind": "literal",
              "value": {
                "kind": "number",
                "number": 1.0
              }
            },
            "kind": "const"
          }
        }
      ]
    },
    {
      "name": "Test4",
      "declarations": [
        {
          "location": {
            "filename": "file:///other.ts",
            "line": 7,
            "col": 13,
            "byteIndex": 133
          },
          "declarationKind": "export",
          "jsDoc": {
            "doc": "Test"
          },
          "kind": "variable",
          "def": {
            "tsType": {
              "repr": "1",
              "kind": "literal",
              "value": {
                "kind": "number",
                "number": 1.0
              }
            },
            "kind": "const"
          }
        }
      ]
    },
    {
      "name": "Test5",
      "declarations": [
        {
          "location": {
            "filename": "file:///other.ts",
            "line": 9,
            "col": 13,
            "byteIndex": 169
          },
          "declarationKind": "export",
          "jsDoc": {
            "doc": "Test"
          },
          "kind": "variable",
          "def": {
            "tsType": {
              "repr": "1",
              "kind": "literal",
              "value": {
                "kind": "number",
                "number": 1.0
              }
            },
            "kind": "const"
          }
        }
      ]
    },
    {
      "name": "Test6",
      "declarations": [
        {
          "location": {
            "filename": "file:///other.ts",
            "line": 11,
            "col": 13,
            "byteIndex": 205
          },
          "declarationKind": "export",
          "jsDoc": {
            "doc": "Test"
          },
          "kind": "variable",
          "def": {
            "tsType": {
              "repr": "1",
              "kind": "literal",
              "value": {
                "kind": "number",
                "number": 1.0
              }
            },
            "kind": "const"
          }
        }
      ]
    },
    {
      "name": "Test7",
      "declarations": [
        {
          "location": {
            "filename": "file:///other.ts",
            "line": 13,
            "col": 13,
            "byteIndex": 241
          },
          "declarationKind": "export",
          "jsDoc": {
            "doc": "Test"
          },
          "kind": "variable",
          "def": {
            "tsType": {
              "repr": "1",
              "kind": "literal",
              "value": {
                "kind": "number",
                "number": 1.0
              }
            },
            "kind": "const"
          }
        }
      ]
    },
    {
      "name": "Test8",
      "declarations": [
        {
          "location": {
            "filename": "file:///other.ts",
            "line": 15,
            "col": 13,
            "byteIndex": 277
          },
          "declarationKind": "export",
          "jsDoc": {
            "doc": "Test"
          },
          "kind": "variable",
          "def": {
            "tsType": {
              "repr": "1",
              "kind": "literal",
              "value": {
                "kind": "number",
                "number": 1.0
              }
            },
            "kind": "const"
          }
        }
      ]
    },
    {
      "name": "Test9",
      "declarations": [
        {
          "location": {
            "filename": "file:///other.ts",
            "line": 17,
            "col": 13,
            "byteIndex": 313
          },
          "declarationKind": "export",
          "jsDoc": {
            "doc": "Test"
          },
          "kind": "variable",
          "def": {
            "tsType": {
              "repr": "1",
              "kind": "literal",
              "value": {
                "kind": "number",
                "number": 1.0
              }
            },
            "kind": "const"
          }
        }
      ]
    },
    {
      "name": "Test10",
      "declarations": [
        {
          "location": {
            "filename": "file:///other.ts",
            "line": 19,
            "col": 13,
            "byteIndex": 349
          },
          "declarationKind": "export",
          "jsDoc": {
            "doc": "Test"
          },
          "kind": "variable",
          "def": {
            "tsType": {
              "repr": "1",
              "kind": "literal",
              "value": {
                "kind": "number",
                "number": 1.0
              }
            },
            "kind": "const"
          }
        }
      ]
    },
    {
      "name": "Internal1",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 4,
            "col": 0,
            "byteIndex": 114
          },
          "declarationKind": "private",
          "kind": "class",
          "def": {}
        }
      ]
    },
    {
      "name": "Internal2",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 5,
            "col": 0,
            "byteIndex": 133
          },
          "declarationKind": "private",
          "kind": "class",
          "def": {}
        }
      ]
    }
  ]
}
