79525512

Date: 2025-03-21 13:01:08
Score: 1
Natty:
Report link

If you go through this method, you might see these kind of hints:

Zed editor showcasing @implements behavior in a JavaScript class The image if a capture of my zed code editor

The code snippets to reproduce the behavior are the same of my previous answer, JavaScript "implements" example:

// specific-parser.js
/**
 * @class
 * @implements {GenericParserPrototype}
 */
export class SpecificParser {
    getFoo(name) {
    //     ^ (parameter) name: any
    }

    foo = 20
}
// jsconfig.json
{
  "compilerOptions": {
    "allowJs": true,
    "checkJs": true,
    "types": ["./index"]
  }
}
// index.d.ts
declare interface GenericParserPrototype {
  foo: string;
  getFoo(param: string): string[];
}
Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Simón Villafañe