Microsoft/TypeScript
View on GitHubFunction implementation name must be ... (2389) when abstract method is declared again later
Open
#61,783 opened on May 29, 2025
Domain: Error MessagesHelp WantedPossible Improvement
Description
๐ Search Terms
duplicate abstract function declaration, abstract method, missing implementation, abstract method overload
๐ Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about abstract class
โฏ Playground Link
๐ป Code
abstract class Foo {
abstract func1(): void;
func2(): string {
// ^? Function implementation name must be 'func1'.(2389)
return 'hi'
}
abstract func1(): void;
}
๐ Actual behavior
TS error reported for func2, which is valid.
๐ Expected behavior
TS error reported for func1, which has duplicated abstract declaration.
Additional information about the issue
No response