# mod.ts
export function foo(bar: A | B): asserts bar is B {}

# diagnostics
error[missing-jsdoc]: exported symbol is missing JSDoc documentation
 --> /mod.ts:1:1
  | 
1 | export function foo(bar: A | B): asserts bar is B {}
  | ^

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

function foo(bar: A | B): asserts bar is B


# output.json
{
  "symbols": [
    {
      "name": "foo",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 0,
            "col": 0,
            "byteIndex": 0
          },
          "declarationKind": "export",
          "kind": "function",
          "def": {
            "params": [
              {
                "kind": "identifier",
                "name": "bar",
                "optional": false,
                "tsType": {
                  "kind": "union",
                  "value": [
                    {
                      "repr": "A",
                      "kind": "typeRef",
                      "value": {
                        "typeName": "A"
                      }
                    },
                    {
                      "repr": "B",
                      "kind": "typeRef",
                      "value": {
                        "typeName": "B"
                      }
                    }
                  ]
                }
              }
            ],
            "returnType": {
              "repr": "asserts bar is B",
              "kind": "typePredicate",
              "value": {
                "asserts": true,
                "param": {
                  "type": "identifier",
                  "name": "bar"
                },
                "type": {
                  "repr": "B",
                  "kind": "typeRef",
                  "value": {
                    "typeName": "B"
                  }
                }
              }
            },
            "hasBody": true
          }
        }
      ]
    }
  ]
}
