/** * This file exists to exercise the `analyze-diagnostics.js` example — * the `@param` below intentionally names a parameter that doesn't exist, * so the analyzer emits an `unknown_param` warning. Real code shouldn't * have this issue, but documentation slips happen, and the `diagnostics` * field lets consumers surface them without halting analysis. * @module */ /** * Demonstrates a documentation mistake the analyzer catches. * @param missing - this name doesn't match any real parameter * @returns the input doubled */ export function demonstrateTypo(value: number): number { return value * 2; }
  • warning unknown_param line 15: @param "missing" on "demonstrateTypo" doesn't match any parameter (typo or stale doc?)
{ "path": "has-issues.ts", "declarations": [ { "name": "demonstrateTypo", "kind": "function", "docComment": "Demonstrates a documentation mistake the analyzer catches.", "typeSignature": "(value: number): number", "sourceLine": 15, "parameters": [ { "name": "value", "type": "number" } ], "returnType": "number", "returnDescription": "the input doubled" } ], "moduleComment": "This file exists to exercise the `analyze-diagnostics.js` example —\nthe `@param` below intentionally names a parameter that doesn't exist,\nso the analyzer emits an `unknown_param` warning. Real code shouldn't\nhave this issue, but documentation slips happen, and the `diagnostics`\nfield lets consumers surface them without halting analysis." }