# mod.ts
const hello = "world";
function say(words: string): void { }
function foo(): void { }
export { hello, say, foo as bar };

# diagnostics
error[missing-jsdoc]: exported symbol is missing JSDoc documentation
 --> /mod.ts:1:7
  | 
1 | const hello = "world";
  |       ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
 --> /mod.ts:2:1
  | 
2 | function say(words: string): void { }
  | ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
 --> /mod.ts:3:1
  | 
3 | function foo(): void { }
  | ^

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

function bar(): void

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

function say(words: string): void

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

const hello: "world"


# output.json
[
  {
    "name": "hello",
    "isDefault": false,
    "location": {
      "filename": "file:///mod.ts",
      "line": 1,
      "col": 6,
      "byteIndex": 6
    },
    "declarationKind": "export",
    "kind": "variable",
    "variableDef": {
      "tsType": {
        "repr": "world",
        "kind": "literal",
        "literal": {
          "kind": "string",
          "string": "world"
        }
      },
      "kind": "const"
    }
  },
  {
    "name": "say",
    "isDefault": false,
    "location": {
      "filename": "file:///mod.ts",
      "line": 2,
      "col": 0,
      "byteIndex": 23
    },
    "declarationKind": "export",
    "kind": "function",
    "functionDef": {
      "params": [
        {
          "kind": "identifier",
          "name": "words",
          "optional": false,
          "tsType": {
            "repr": "string",
            "kind": "keyword",
            "keyword": "string"
          }
        }
      ],
      "returnType": {
        "repr": "void",
        "kind": "keyword",
        "keyword": "void"
      },
      "hasBody": true,
      "isAsync": false,
      "isGenerator": false,
      "typeParams": []
    }
  },
  {
    "name": "bar",
    "isDefault": false,
    "location": {
      "filename": "file:///mod.ts",
      "line": 3,
      "col": 0,
      "byteIndex": 61
    },
    "declarationKind": "export",
    "kind": "function",
    "functionDef": {
      "params": [],
      "returnType": {
        "repr": "void",
        "kind": "keyword",
        "keyword": "void"
      },
      "hasBody": true,
      "isAsync": false,
      "isGenerator": false,
      "typeParams": []
    }
  }
]
