# mod.ts
/** Namespace JSdoc */
export namespace RootNs {
    export const a = "a";

    /** Nested namespace JSDoc */
    export namespace NestedNs {
      export enum Foo {
        a = 1,
        b = 2,
        c = 3,
      }
    }
}

export namespace RootNs.OtherNs {
  export class Other {}
}

# diagnostics
error[missing-jsdoc]: exported symbol is missing JSDoc documentation
 --> /mod.ts:3:18
  | 
3 |     export const a = "a";
  |                  ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
 --> /mod.ts:7:7
  | 
7 |       export enum Foo {
  |       ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
  --> /mod.ts:15:8
   | 
15 | export namespace RootNs.OtherNs {
   |        ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
  --> /mod.ts:16:3
   | 
16 |   export class Other {}
   |   ^

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

namespace RootNs
  Namespace JSdoc

  const a: "a"
  namespace NestedNs
    Nested namespace JSDoc
  namespace OtherNs


# output.json
{
  "symbols": [
    {
      "name": "RootNs",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 1,
            "col": 0,
            "byteIndex": 23
          },
          "declarationKind": "export",
          "jsDoc": {
            "doc": "Namespace JSdoc"
          },
          "kind": "namespace",
          "def": {
            "elements": [
              {
                "name": "a",
                "declarations": [
                  {
                    "location": {
                      "filename": "file:///mod.ts",
                      "line": 2,
                      "col": 17,
                      "byteIndex": 66
                    },
                    "declarationKind": "export",
                    "kind": "variable",
                    "def": {
                      "tsType": {
                        "repr": "a",
                        "kind": "literal",
                        "value": {
                          "kind": "string",
                          "string": "a"
                        }
                      },
                      "kind": "const"
                    }
                  }
                ]
              },
              {
                "name": "NestedNs",
                "declarations": [
                  {
                    "location": {
                      "filename": "file:///mod.ts",
                      "line": 5,
                      "col": 4,
                      "byteIndex": 114
                    },
                    "declarationKind": "export",
                    "jsDoc": {
                      "doc": "Nested namespace JSDoc"
                    },
                    "kind": "namespace",
                    "def": {
                      "elements": [
                        {
                          "name": "Foo",
                          "declarations": [
                            {
                              "location": {
                                "filename": "file:///mod.ts",
                                "line": 6,
                                "col": 6,
                                "byteIndex": 148
                              },
                              "declarationKind": "export",
                              "kind": "enum",
                              "def": {
                                "members": [
                                  {
                                    "name": "a",
                                    "init": {
                                      "repr": "1",
                                      "kind": "literal",
                                      "value": {
                                        "kind": "number",
                                        "number": 1.0
                                      }
                                    },
                                    "location": {
                                      "filename": "file:///mod.ts",
                                      "line": 7,
                                      "col": 8,
                                      "byteIndex": 174
                                    }
                                  },
                                  {
                                    "name": "b",
                                    "init": {
                                      "repr": "2",
                                      "kind": "literal",
                                      "value": {
                                        "kind": "number",
                                        "number": 2.0
                                      }
                                    },
                                    "location": {
                                      "filename": "file:///mod.ts",
                                      "line": 8,
                                      "col": 8,
                                      "byteIndex": 189
                                    }
                                  },
                                  {
                                    "name": "c",
                                    "init": {
                                      "repr": "3",
                                      "kind": "literal",
                                      "value": {
                                        "kind": "number",
                                        "number": 3.0
                                      }
                                    },
                                    "location": {
                                      "filename": "file:///mod.ts",
                                      "line": 9,
                                      "col": 8,
                                      "byteIndex": 204
                                    }
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      ]
                    }
                  }
                ]
              },
              {
                "name": "OtherNs",
                "declarations": [
                  {
                    "location": {
                      "filename": "file:///mod.ts",
                      "line": 14,
                      "col": 7,
                      "byteIndex": 235
                    },
                    "declarationKind": "export",
                    "kind": "namespace",
                    "def": {
                      "elements": [
                        {
                          "name": "Other",
                          "declarations": [
                            {
                              "location": {
                                "filename": "file:///mod.ts",
                                "line": 15,
                                "col": 2,
                                "byteIndex": 264
                              },
                              "declarationKind": "export",
                              "kind": "class",
                              "def": {}
                            }
                          ]
                        }
                      ]
                    }
                  }
                ]
              }
            ]
          }
        }
      ]
    }
  ]
}
