You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The --noImplicitOverride check doesn't catch the case where an overridden member is defined in multiple interfaces.
We found this in code using Polymer. Compiling the following example with tsc file.ts --target esnext --moduleResolution node --noImplicitOverride gives the inlined error. But I would have expected the error as well for connectedCallback.
classXCustomextendsPolymerElement{connectedCallback(){super.connectedCallback();}disconnectedCallback(){super.disconnectedCallback();}// ~~~~~~~~~~~~~~~~~~~~ This member must have an 'override' modifier because it overrides a member in the base class 'PolymerElement'.}
I boiled it down to the minimal example below.
🔎 Search Terms
noImplicitOverride, override, interface, multiple
🕗 Version & Regression Information
This is the behavior in every version I tried: 4.3.5, 4.4.0-beta
Bug Report
The
--noImplicitOverride
check doesn't catch the case where an overridden member is defined in multiple interfaces.We found this in code using Polymer. Compiling the following example with
tsc file.ts --target esnext --moduleResolution node --noImplicitOverride
gives the inlined error. But I would have expected the error as well forconnectedCallback
.I boiled it down to the minimal example below.
🔎 Search Terms
noImplicitOverride, override, interface, multiple
🕗 Version & Regression Information
This is the behavior in every version I tried: 4.3.5, 4.4.0-beta
⏯ Playground Link
Playground link with relevant code
💻 Code
🙁 Actual behavior
Compiled with
--noImplicitOverride
, this only requiresoverride
fordisconnectedCallback
but not forconnectedCallback
.As soon as I remove
connectedCallback
from either theElementMixin
orPropertiesMixin
interface, TypeScript requiresoverride
for it as well.The behavior is the same for property members.
🙂 Expected behavior
I would expect TypeScript to require
override
for bothdisconnectedCallback
andconnectedCallback
.The text was updated successfully, but these errors were encountered: