# mod.ts
export function add<T>(a: T, b: T) { return a + b; }

# diagnostics
error[missing-jsdoc]: exported symbol is missing JSDoc documentation
 --> /mod.ts:1:1
  | 
1 | export function add<T>(a: T, b: T) { return a + b; }
  | ^


error[missing-return-type]: exported function is missing an explicit return type annotation
 --> /mod.ts:1:1
  | 
1 | export function add<T>(a: T, b: T) { return a + b; }
  | ^

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

function add<T>(a: T, b: T)


# output.json
[
  {
    "name": "add",
    "isDefault": false,
    "location": {
      "filename": "file:///mod.ts",
      "line": 1,
      "col": 0,
      "byteIndex": 0
    },
    "declarationKind": "export",
    "kind": "function",
    "functionDef": {
      "params": [
        {
          "kind": "identifier",
          "name": "a",
          "optional": false,
          "tsType": {
            "repr": "T",
            "kind": "typeRef",
            "typeRef": {
              "typeParams": null,
              "typeName": "T"
            }
          }
        },
        {
          "kind": "identifier",
          "name": "b",
          "optional": false,
          "tsType": {
            "repr": "T",
            "kind": "typeRef",
            "typeRef": {
              "typeParams": null,
              "typeName": "T"
            }
          }
        }
      ],
      "returnType": null,
      "hasBody": true,
      "isAsync": false,
      "isGenerator": false,
      "typeParams": [
        {
          "name": "T"
        }
      ]
    }
  }
]
