# mod.ts
export let str = "hello";
export let num = 100;
export let bool = false;
export let dateStr = Date();
export let regex = RegExp("foobar");
export let sym = Symbol("baz");
export let tpl = `foobarbaz`;
# diagnostics
error[missing-jsdoc]: exported symbol is missing JSDoc documentation
--> /mod.ts:1:12
|
1 | export let str = "hello";
| ^
error[missing-jsdoc]: exported symbol is missing JSDoc documentation
--> /mod.ts:2:12
|
2 | export let num = 100;
| ^
error[missing-jsdoc]: exported symbol is missing JSDoc documentation
--> /mod.ts:3:12
|
3 | export let bool = false;
| ^
error[missing-jsdoc]: exported symbol is missing JSDoc documentation
--> /mod.ts:4:12
|
4 | export let dateStr = Date();
| ^
error[missing-jsdoc]: exported symbol is missing JSDoc documentation
--> /mod.ts:5:12
|
5 | export let regex = RegExp("foobar");
| ^
error[missing-jsdoc]: exported symbol is missing JSDoc documentation
--> /mod.ts:6:12
|
6 | export let sym = Symbol("baz");
| ^
error[missing-jsdoc]: exported symbol is missing JSDoc documentation
--> /mod.ts:7:12
|
7 | export let tpl = `foobarbaz`;
| ^
# output.txt
Defined in file:///mod.ts:2:12
let bool: boolean
Defined in file:///mod.ts:3:12
let dateStr: string
Defined in file:///mod.ts:1:12
let num: number
Defined in file:///mod.ts:4:12
let regex: RegExp
Defined in file:///mod.ts:0:12
let str: string
Defined in file:///mod.ts:5:12
let sym: symbol
Defined in file:///mod.ts:6:12
let tpl: `foobarbaz`
# output.json
{
"symbols": [
{
"name": "str",
"declarations": [
{
"location": {
"filename": "file:///mod.ts",
"line": 0,
"col": 11,
"byteIndex": 11
},
"declarationKind": "export",
"kind": "variable",
"def": {
"tsType": {
"repr": "string",
"kind": "keyword",
"value": "string"
},
"kind": "let"
}
}
]
},
{
"name": "num",
"declarations": [
{
"location": {
"filename": "file:///mod.ts",
"line": 1,
"col": 11,
"byteIndex": 37
},
"declarationKind": "export",
"kind": "variable",
"def": {
"tsType": {
"repr": "number",
"kind": "keyword",
"value": "number"
},
"kind": "let"
}
}
]
},
{
"name": "bool",
"declarations": [
{
"location": {
"filename": "file:///mod.ts",
"line": 2,
"col": 11,
"byteIndex": 59
},
"declarationKind": "export",
"kind": "variable",
"def": {
"tsType": {
"repr": "boolean",
"kind": "keyword",
"value": "boolean"
},
"kind": "let"
}
}
]
},
{
"name": "dateStr",
"declarations": [
{
"location": {
"filename": "file:///mod.ts",
"line": 3,
"col": 11,
"byteIndex": 84
},
"declarationKind": "export",
"kind": "variable",
"def": {
"tsType": {
"repr": "Date",
"kind": "keyword",
"value": "string"
},
"kind": "let"
}
}
]
},
{
"name": "regex",
"declarations": [
{
"location": {
"filename": "file:///mod.ts",
"line": 4,
"col": 11,
"byteIndex": 113
},
"declarationKind": "export",
"kind": "variable",
"def": {
"tsType": {
"repr": "RegExp",
"kind": "typeRef",
"value": {
"typeName": "RegExp"
}
},
"kind": "let"
}
}
]
},
{
"name": "sym",
"declarations": [
{
"location": {
"filename": "file:///mod.ts",
"line": 5,
"col": 11,
"byteIndex": 150
},
"declarationKind": "export",
"kind": "variable",
"def": {
"tsType": {
"repr": "Symbol",
"kind": "keyword",
"value": "symbol"
},
"kind": "let"
}
}
]
},
{
"name": "tpl",
"declarations": [
{
"location": {
"filename": "file:///mod.ts",
"line": 6,
"col": 11,
"byteIndex": 182
},
"declarationKind": "export",
"kind": "variable",
"def": {
"tsType": {
"repr": "foobarbaz",
"kind": "literal",
"value": {
"kind": "template",
"tsTypes": [
{
"repr": "foobarbaz",
"kind": "literal",
"value": {
"kind": "string",
"string": "foobarbaz"
}
}
]
}
},
"kind": "let"
}
}
]
}
]
}