Open
Description
Suggestion
It would be nice to get parameter hints while overriding methods or implementing abstract methods.
π Search Terms
- parameter hints
- overriding methods
- abstract parameters
β Viability Checklist
My suggestion meets these guidelines:
- This wouldn't be a breaking change in existing TypeScript/JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
- This feature would agree with the rest of TypeScript's Design Goals.
β Suggestion
When implementing an abstract class or overriding an existing class's methods, it would be great to be able to see the parameter hints for that method in the editor.
π Motivating Example
abstract class A {
abstract foo(param1: string, param2: number, param3: boolean): void;
}
class B extends A {
foo(/*trigger parameter hints here, see nothing*/)
}
type AA = {
foo(param1: string, param2: number, param3: boolean): void;
}
const BB: AA = {
foo(/*trigger parameter hints here, see lovely results*/)
}
Playground. (use Ctrl/Cmd+Shift+Space to trigger parameter hints)
π» Use Cases
I'd use this when implementing abstract classes to remember the parameters I get to use.