# mod.ts
interface AssignOpts {
  a: string;
}

export function foo([e,,f, ...g]: number[], { c, d: asdf, i = "asdf", ...rest}, ops: AssignOpts = {}): void {
    console.log("Hello world");
}

# diagnostics
error[private-type-ref]: public type 'foo' references private type 'AssignOpts'
 --> /mod.ts:5:1
  | 
5 | export function foo([e,,f, ...g]: number[], { c, d: asdf, i = "asdf", ...rest}, ops: AssignOpts = {}): void {
  | ^
  = hint: make the referenced type public or remove the reference
  | 
1 | interface AssignOpts {
  | - this is the referenced type
  | 

  info: to ensure documentation is complete all types that are exposed in the public API must be public


error[missing-jsdoc]: exported symbol is missing JSDoc documentation
 --> /mod.ts:5:1
  | 
5 | export function foo([e,,f, ...g]: number[], { c, d: asdf, i = "asdf", ...rest}, ops: AssignOpts = {}): void {
  | ^

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

function foo([e, , f, ...g]: number[], {c, d, i, ...rest}, ops: AssignOpts): void

Defined in file:///mod.ts:0:1

private interface AssignOpts

  a: string


# output.json
{
  "symbols": [
    {
      "name": "foo",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 4,
            "col": 0,
            "byteIndex": 39
          },
          "declarationKind": "export",
          "kind": "function",
          "def": {
            "params": [
              {
                "kind": "array",
                "elements": [
                  {
                    "kind": "identifier",
                    "name": "e",
                    "optional": false
                  },
                  null,
                  {
                    "kind": "identifier",
                    "name": "f",
                    "optional": false
                  },
                  {
                    "kind": "rest",
                    "arg": {
                      "kind": "identifier",
                      "name": "g",
                      "optional": false
                    }
                  }
                ],
                "optional": false,
                "tsType": {
                  "kind": "array",
                  "value": {
                    "repr": "number",
                    "kind": "keyword",
                    "value": "number"
                  }
                }
              },
              {
                "kind": "object",
                "props": [
                  {
                    "kind": "assign",
                    "key": "c",
                    "value": null
                  },
                  {
                    "kind": "keyValue",
                    "key": "d",
                    "value": {
                      "kind": "identifier",
                      "name": "asdf",
                      "optional": false
                    }
                  },
                  {
                    "kind": "assign",
                    "key": "i",
                    "value": "[UNSUPPORTED]"
                  },
                  {
                    "kind": "rest",
                    "arg": {
                      "kind": "identifier",
                      "name": "rest",
                      "optional": false
                    }
                  }
                ],
                "optional": false
              },
              {
                "kind": "assign",
                "left": {
                  "kind": "identifier",
                  "name": "ops",
                  "optional": false,
                  "tsType": {
                    "repr": "AssignOpts",
                    "kind": "typeRef",
                    "value": {
                      "typeName": "AssignOpts",
                      "resolution": {
                        "kind": "local"
                      }
                    }
                  }
                },
                "right": "[UNSUPPORTED]"
              }
            ],
            "returnType": {
              "repr": "void",
              "kind": "keyword",
              "value": "void"
            },
            "hasBody": true
          }
        }
      ]
    },
    {
      "name": "AssignOpts",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 0,
            "col": 0,
            "byteIndex": 0
          },
          "declarationKind": "private",
          "kind": "interface",
          "def": {
            "properties": [
              {
                "name": "a",
                "location": {
                  "filename": "file:///mod.ts",
                  "line": 1,
                  "col": 2,
                  "byteIndex": 25
                },
                "tsType": {
                  "repr": "string",
                  "kind": "keyword",
                  "value": "string"
                }
              }
            ]
          }
        }
      ]
    }
  ]
}
