# mod.ts
export type Flatten<T> = T extends Array<infer U> ? U : T;

# diagnostics
error[missing-jsdoc]: exported symbol is missing JSDoc documentation
 --> /mod.ts:1:1
  | 
1 | export type Flatten<T> = T extends Array<infer U> ? U : T;
  | ^

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

type Flatten<T> = T extends Array<infer U> ? U : T


# output.json
[
  {
    "name": "Flatten",
    "isDefault": false,
    "location": {
      "filename": "file:///mod.ts",
      "line": 1,
      "col": 0,
      "byteIndex": 0
    },
    "declarationKind": "export",
    "kind": "typeAlias",
    "typeAliasDef": {
      "tsType": {
        "repr": "",
        "kind": "conditional",
        "conditionalType": {
          "checkType": {
            "repr": "T",
            "kind": "typeRef",
            "typeRef": {
              "typeParams": null,
              "typeName": "T"
            }
          },
          "extendsType": {
            "repr": "Array",
            "kind": "typeRef",
            "typeRef": {
              "typeParams": [
                {
                  "repr": "",
                  "kind": "infer",
                  "infer": {
                    "typeParam": {
                      "name": "U"
                    }
                  }
                }
              ],
              "typeName": "Array"
            }
          },
          "trueType": {
            "repr": "U",
            "kind": "typeRef",
            "typeRef": {
              "typeParams": null,
              "typeName": "U"
            }
          },
          "falseType": {
            "repr": "T",
            "kind": "typeRef",
            "typeRef": {
              "typeParams": null,
              "typeName": "T"
            }
          }
        }
      },
      "typeParams": [
        {
          "name": "T"
        }
      ]
    }
  }
]
