mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
35704c2f49
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: jakebailey <[email protected]>
27 lines
838 B
Plaintext
27 lines
838 B
Plaintext
test.js(7,3): error TS4121: This member cannot have a JSDoc comment with an '@override' tag because its containing class 'NoBase' does not extend another class.
|
|
|
|
|
|
==== test.js (1 errors) ====
|
|
// Unlike object literal members, class members are real class-like members, so
|
|
// JSDoc modifiers are still semantically validated under checkJs: @override
|
|
// without a base class errors. With checkJs off, nothing is validated.
|
|
|
|
class NoBase {
|
|
/** @override */
|
|
foo() {
|
|
~~~
|
|
!!! error TS4121: This member cannot have a JSDoc comment with an '@override' tag because its containing class 'NoBase' does not extend another class.
|
|
}
|
|
}
|
|
|
|
class Base {
|
|
foo() {
|
|
}
|
|
}
|
|
|
|
class Derived extends Base {
|
|
/** @override */
|
|
foo() {
|
|
}
|
|
}
|
|
|