# mod.ts
export const s = "hello";
export const n = 123;
export const b = false;
export const bi = 100n;
export const re = /hello/;
export const tpl = `foobar`;
export const d = new Date();
export const s2 = String("foo");
export const n2 = Number(100);
export const bi2 = BigInt(123);
export const sym = Symbol("hello");
export const m = new Map<string, string>();
export const fn1 = (a: string): void => {};
export const fn2 = function (a:string): void {};
export const s3 = "VGhpcyBpcyBhIHJlYWxseSBsb25nIHN0cmluZyB0byB0cnkgdG8gZmluZCBvdXQgaWYgd2UgY2FuIHNraXAgaW5mZXJyaW5nIGEgcmVhbGx5IGxhcmdlIHZhbHVlIGZvciBhIGNvbnN0IHN0cmluZyB2YXJpYWJsZSB3aXRob3V0IGEgdHlwZSBhbm5vdGF0aW9uLg==";

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


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
 --> /mod.ts:2:14
  | 
2 | export const n = 123;
  |              ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
 --> /mod.ts:3:14
  | 
3 | export const b = false;
  |              ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
 --> /mod.ts:4:14
  | 
4 | export const bi = 100n;
  |              ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
 --> /mod.ts:5:14
  | 
5 | export const re = /hello/;
  |              ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
 --> /mod.ts:6:14
  | 
6 | export const tpl = `foobar`;
  |              ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
 --> /mod.ts:7:14
  | 
7 | export const d = new Date();
  |              ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
 --> /mod.ts:8:14
  | 
8 | export const s2 = String("foo");
  |              ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
 --> /mod.ts:9:14
  | 
9 | export const n2 = Number(100);
  |              ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
  --> /mod.ts:10:14
   | 
10 | export const bi2 = BigInt(123);
   |              ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
  --> /mod.ts:11:14
   | 
11 | export const sym = Symbol("hello");
   |              ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
  --> /mod.ts:12:14
   | 
12 | export const m = new Map<string, string>();
   |              ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
  --> /mod.ts:13:14
   | 
13 | export const fn1 = (a: string): void => {};
   |              ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
  --> /mod.ts:14:14
   | 
14 | export const fn2 = function (a:string): void {};
   |              ^


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
  --> /mod.ts:15:14
   | 
15 | export const s3 = "VGhpcyBpcyBhIHJlYWxseSBsb25nIHN0cmluZyB0byB0cnkgdG8gZmluZCBvdXQgaWYgd2UgY2FuIHNraXAgaW5mZXJyaW5nIGEgcmVhbGx5IGxhcmdlIHZhbHVlIGZvciBhIGNvbnN0IHN0cmluZyB2YXJpYWJsZSB3aXRob3V0IGEgdHlwZSBhbm5vdGF0aW9uLg==";
   |              ^

# output.txt
Defined in file:///mod.ts:12:14

function fn1(a: string): void

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

function fn2(a: string): void

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

const b: false

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

const bi: 100n

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

const bi2: bigint

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

const d: Date

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

const m: Map<string, string>

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

const n: 123

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

const n2: number

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

const re: RegExp

Defined in file:///mod.ts:0:14

const s: "hello"

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

const s2: string

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

const s3: string

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

const sym: symbol

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

const tpl: `foobar`


# output.json
{
  "symbols": [
    {
      "name": "s",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 0,
            "col": 13,
            "byteIndex": 13
          },
          "declarationKind": "export",
          "kind": "variable",
          "def": {
            "tsType": {
              "repr": "hello",
              "kind": "literal",
              "value": {
                "kind": "string",
                "string": "hello"
              }
            },
            "kind": "const"
          }
        }
      ]
    },
    {
      "name": "n",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 1,
            "col": 13,
            "byteIndex": 39
          },
          "declarationKind": "export",
          "kind": "variable",
          "def": {
            "tsType": {
              "repr": "123",
              "kind": "literal",
              "value": {
                "kind": "number",
                "number": 123.0
              }
            },
            "kind": "const"
          }
        }
      ]
    },
    {
      "name": "b",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 2,
            "col": 13,
            "byteIndex": 61
          },
          "declarationKind": "export",
          "kind": "variable",
          "def": {
            "tsType": {
              "repr": "false",
              "kind": "literal",
              "value": {
                "kind": "boolean",
                "boolean": false
              }
            },
            "kind": "const"
          }
        }
      ]
    },
    {
      "name": "bi",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 3,
            "col": 13,
            "byteIndex": 85
          },
          "declarationKind": "export",
          "kind": "variable",
          "def": {
            "tsType": {
              "repr": "100",
              "kind": "literal",
              "value": {
                "kind": "bigInt",
                "string": "100"
              }
            },
            "kind": "const"
          }
        }
      ]
    },
    {
      "name": "re",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 4,
            "col": 13,
            "byteIndex": 109
          },
          "declarationKind": "export",
          "kind": "variable",
          "def": {
            "tsType": {
              "repr": "hello",
              "kind": "typeRef",
              "value": {
                "typeName": "RegExp"
              }
            },
            "kind": "const"
          }
        }
      ]
    },
    {
      "name": "tpl",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 5,
            "col": 13,
            "byteIndex": 136
          },
          "declarationKind": "export",
          "kind": "variable",
          "def": {
            "tsType": {
              "repr": "foobar",
              "kind": "literal",
              "value": {
                "kind": "template",
                "tsTypes": [
                  {
                    "repr": "foobar",
                    "kind": "literal",
                    "value": {
                      "kind": "string",
                      "string": "foobar"
                    }
                  }
                ]
              }
            },
            "kind": "const"
          }
        }
      ]
    },
    {
      "name": "d",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 6,
            "col": 13,
            "byteIndex": 165
          },
          "declarationKind": "export",
          "kind": "variable",
          "def": {
            "tsType": {
              "repr": "Date",
              "kind": "typeRef",
              "value": {
                "typeName": "Date"
              }
            },
            "kind": "const"
          }
        }
      ]
    },
    {
      "name": "s2",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 7,
            "col": 13,
            "byteIndex": 194
          },
          "declarationKind": "export",
          "kind": "variable",
          "def": {
            "tsType": {
              "repr": "String",
              "kind": "keyword",
              "value": "string"
            },
            "kind": "const"
          }
        }
      ]
    },
    {
      "name": "n2",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 8,
            "col": 13,
            "byteIndex": 227
          },
          "declarationKind": "export",
          "kind": "variable",
          "def": {
            "tsType": {
              "repr": "Number",
              "kind": "keyword",
              "value": "number"
            },
            "kind": "const"
          }
        }
      ]
    },
    {
      "name": "bi2",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 9,
            "col": 13,
            "byteIndex": 258
          },
          "declarationKind": "export",
          "kind": "variable",
          "def": {
            "tsType": {
              "repr": "BigInt",
              "kind": "keyword",
              "value": "bigint"
            },
            "kind": "const"
          }
        }
      ]
    },
    {
      "name": "sym",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 10,
            "col": 13,
            "byteIndex": 290
          },
          "declarationKind": "export",
          "kind": "variable",
          "def": {
            "tsType": {
              "repr": "Symbol",
              "kind": "keyword",
              "value": "symbol"
            },
            "kind": "const"
          }
        }
      ]
    },
    {
      "name": "m",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 11,
            "col": 13,
            "byteIndex": 326
          },
          "declarationKind": "export",
          "kind": "variable",
          "def": {
            "tsType": {
              "repr": "Map",
              "kind": "typeRef",
              "value": {
                "typeParams": [
                  {
                    "repr": "string",
                    "kind": "keyword",
                    "value": "string"
                  },
                  {
                    "repr": "string",
                    "kind": "keyword",
                    "value": "string"
                  }
                ],
                "typeName": "Map"
              }
            },
            "kind": "const"
          }
        }
      ]
    },
    {
      "name": "fn1",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 12,
            "col": 13,
            "byteIndex": 370
          },
          "declarationKind": "export",
          "kind": "function",
          "def": {
            "params": [
              {
                "kind": "identifier",
                "name": "a",
                "optional": false,
                "tsType": {
                  "repr": "string",
                  "kind": "keyword",
                  "value": "string"
                }
              }
            ],
            "returnType": {
              "repr": "void",
              "kind": "keyword",
              "value": "void"
            },
            "hasBody": true
          }
        }
      ]
    },
    {
      "name": "fn2",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 13,
            "col": 13,
            "byteIndex": 414
          },
          "declarationKind": "export",
          "kind": "function",
          "def": {
            "params": [
              {
                "kind": "identifier",
                "name": "a",
                "optional": false,
                "tsType": {
                  "repr": "string",
                  "kind": "keyword",
                  "value": "string"
                }
              }
            ],
            "returnType": {
              "repr": "void",
              "kind": "keyword",
              "value": "void"
            },
            "hasBody": true
          }
        }
      ]
    },
    {
      "name": "s3",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 14,
            "col": 13,
            "byteIndex": 463
          },
          "declarationKind": "export",
          "kind": "variable",
          "def": {
            "tsType": {
              "repr": "string",
              "kind": "keyword",
              "value": "string"
            },
            "kind": "const"
          }
        }
      ]
    }
  ]
}
