# mod.ts
/** Something about fizzBuzz */
export const fizzBuzz = "fizzBuzz";

export const env: {
  /** get doc */
  get(key: string): string | undefined;

  /** set doc */
  set(key: string, value: string): void;
}

export const num = 100;
export const bool = false;
export const bigint = 123n;
export const regex = /hello/;
export const date = new Date();
export const tpl1 = `foo`;
export const tpl2 = `Value: ${num}`;
/** @ignore */
export const tpl3 = `Value: ${num}`;

# diagnostics
error[missing-jsdoc]: exported symbol is missing JSDoc documentation
 --> /mod.ts:4:14
  | 
4 | export const env: {
  |              ^


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


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


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


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


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


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


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
  --> /mod.ts:18:14
   | 
18 | export const tpl2 = `Value: ${num}`;
   |              ^

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

const bigint: 123

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

const bool: false

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

const date: Date

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

const env: { get(key: string): string | undefined; set(key: string, value: string): void; }

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

const fizzBuzz: "fizzBuzz"
  Something about fizzBuzz

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

const num: 100

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

const regex: RegExp

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

const tpl1: `foo`

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

const tpl2: string


# output.json
[
  {
    "name": "fizzBuzz",
    "isDefault": false,
    "location": {
      "filename": "file:///mod.ts",
      "line": 2,
      "col": 13,
      "byteIndex": 45
    },
    "declarationKind": "export",
    "jsDoc": {
      "doc": "Something about fizzBuzz"
    },
    "kind": "variable",
    "variableDef": {
      "tsType": {
        "repr": "fizzBuzz",
        "kind": "literal",
        "literal": {
          "kind": "string",
          "string": "fizzBuzz"
        }
      },
      "kind": "const"
    }
  },
  {
    "name": "env",
    "isDefault": false,
    "location": {
      "filename": "file:///mod.ts",
      "line": 4,
      "col": 13,
      "byteIndex": 82
    },
    "declarationKind": "export",
    "kind": "variable",
    "variableDef": {
      "tsType": {
        "repr": "",
        "kind": "typeLiteral",
        "typeLiteral": {
          "constructors": [],
          "methods": [
            {
              "name": "get",
              "jsDoc": {
                "doc": "get doc"
              },
              "kind": "method",
              "location": {
                "filename": "file:///mod.ts",
                "line": 6,
                "col": 2,
                "byteIndex": 108
              },
              "params": [
                {
                  "kind": "identifier",
                  "name": "key",
                  "optional": false,
                  "tsType": {
                    "repr": "string",
                    "kind": "keyword",
                    "keyword": "string"
                  }
                }
              ],
              "optional": false,
              "returnType": {
                "repr": "",
                "kind": "union",
                "union": [
                  {
                    "repr": "string",
                    "kind": "keyword",
                    "keyword": "string"
                  },
                  {
                    "repr": "undefined",
                    "kind": "keyword",
                    "keyword": "undefined"
                  }
                ]
              },
              "typeParams": []
            },
            {
              "name": "set",
              "jsDoc": {
                "doc": "set doc"
              },
              "kind": "method",
              "location": {
                "filename": "file:///mod.ts",
                "line": 9,
                "col": 2,
                "byteIndex": 166
              },
              "params": [
                {
                  "kind": "identifier",
                  "name": "key",
                  "optional": false,
                  "tsType": {
                    "repr": "string",
                    "kind": "keyword",
                    "keyword": "string"
                  }
                },
                {
                  "kind": "identifier",
                  "name": "value",
                  "optional": false,
                  "tsType": {
                    "repr": "string",
                    "kind": "keyword",
                    "keyword": "string"
                  }
                }
              ],
              "optional": false,
              "returnType": {
                "repr": "void",
                "kind": "keyword",
                "keyword": "void"
              },
              "typeParams": []
            }
          ],
          "properties": [],
          "callSignatures": [],
          "indexSignatures": []
        }
      },
      "kind": "const"
    }
  },
  {
    "name": "num",
    "isDefault": false,
    "location": {
      "filename": "file:///mod.ts",
      "line": 12,
      "col": 13,
      "byteIndex": 221
    },
    "declarationKind": "export",
    "kind": "variable",
    "variableDef": {
      "tsType": {
        "repr": "100",
        "kind": "literal",
        "literal": {
          "kind": "number",
          "number": 100.0
        }
      },
      "kind": "const"
    }
  },
  {
    "name": "bool",
    "isDefault": false,
    "location": {
      "filename": "file:///mod.ts",
      "line": 13,
      "col": 13,
      "byteIndex": 245
    },
    "declarationKind": "export",
    "kind": "variable",
    "variableDef": {
      "tsType": {
        "repr": "false",
        "kind": "literal",
        "literal": {
          "kind": "boolean",
          "boolean": false
        }
      },
      "kind": "const"
    }
  },
  {
    "name": "bigint",
    "isDefault": false,
    "location": {
      "filename": "file:///mod.ts",
      "line": 14,
      "col": 13,
      "byteIndex": 272
    },
    "declarationKind": "export",
    "kind": "variable",
    "variableDef": {
      "tsType": {
        "repr": "123",
        "kind": "literal",
        "literal": {
          "kind": "bigInt",
          "string": "123"
        }
      },
      "kind": "const"
    }
  },
  {
    "name": "regex",
    "isDefault": false,
    "location": {
      "filename": "file:///mod.ts",
      "line": 15,
      "col": 13,
      "byteIndex": 300
    },
    "declarationKind": "export",
    "kind": "variable",
    "variableDef": {
      "tsType": {
        "repr": "hello",
        "kind": "typeRef",
        "typeRef": {
          "typeParams": null,
          "typeName": "RegExp"
        }
      },
      "kind": "const"
    }
  },
  {
    "name": "date",
    "isDefault": false,
    "location": {
      "filename": "file:///mod.ts",
      "line": 16,
      "col": 13,
      "byteIndex": 330
    },
    "declarationKind": "export",
    "kind": "variable",
    "variableDef": {
      "tsType": {
        "repr": "Date",
        "kind": "typeRef",
        "typeRef": {
          "typeParams": null,
          "typeName": "Date"
        }
      },
      "kind": "const"
    }
  },
  {
    "name": "tpl1",
    "isDefault": false,
    "location": {
      "filename": "file:///mod.ts",
      "line": 17,
      "col": 13,
      "byteIndex": 362
    },
    "declarationKind": "export",
    "kind": "variable",
    "variableDef": {
      "tsType": {
        "repr": "foo",
        "kind": "literal",
        "literal": {
          "kind": "template",
          "tsTypes": [
            {
              "repr": "foo",
              "kind": "literal",
              "literal": {
                "kind": "string",
                "string": "foo"
              }
            }
          ]
        }
      },
      "kind": "const"
    }
  },
  {
    "name": "tpl2",
    "isDefault": false,
    "location": {
      "filename": "file:///mod.ts",
      "line": 18,
      "col": 13,
      "byteIndex": 389
    },
    "declarationKind": "export",
    "kind": "variable",
    "variableDef": {
      "tsType": {
        "repr": "string",
        "kind": "keyword",
        "keyword": "string"
      },
      "kind": "const"
    }
  }
]
