/** * 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 const demonstrate_typo = (value: number): number => value * 2;
{ "path": "has-issues.ts", "declarations": [ { "name": "demonstrate_typo", "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." }