# mod.ts
import type { MessageEntity } from "./a.ts";
export type UrlMessageEntity = MessageEntity.TextLinkMessageEntity;

# a.ts
export * from "./b.ts";

# b.ts
export * from "./c.ts";

# c.ts
export declare namespace MessageEntity {
  export interface TextLinkMessageEntity {
    type: "text_link";
  }
}

# diagnostics
error[private-type-ref]: public type 'UrlMessageEntity' references private type 'MessageEntity'
 --> /mod.ts:2:1
  | 
2 | export type UrlMessageEntity = MessageEntity.TextLinkMessageEntity;
  | ^
  = hint: make the referenced type public or remove the reference
  | 
1 | export declare namespace MessageEntity {
  | - 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 'UrlMessageEntity' references private type 'MessageEntity.TextLinkMessageEntity'
 --> /mod.ts:2:1
  | 
2 | export type UrlMessageEntity = MessageEntity.TextLinkMessageEntity;
  | ^
  = hint: make the referenced type public or remove the reference
  | 
2 |   export interface TextLinkMessageEntity {
  |   - 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:2:1
  | 
2 | export type UrlMessageEntity = MessageEntity.TextLinkMessageEntity;
  | ^

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

type UrlMessageEntity = MessageEntity.TextLinkMessageEntity


# output.json
{
  "imports": [
    {
      "importedName": "MessageEntity",
      "originalName": "MessageEntity",
      "src": "file:///a.ts"
    }
  ],
  "symbols": [
    {
      "name": "UrlMessageEntity",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 1,
            "col": 0,
            "byteIndex": 45
          },
          "declarationKind": "export",
          "kind": "typeAlias",
          "def": {
            "tsType": {
              "repr": "MessageEntity.TextLinkMessageEntity",
              "kind": "typeRef",
              "value": {
                "typeName": "MessageEntity.TextLinkMessageEntity",
                "resolution": {
                  "kind": "import",
                  "specifier": "./a.ts",
                  "name": "MessageEntity"
                }
              }
            }
          }
        }
      ]
    }
  ]
}
