Skip to content

mixin properties not checked #26286

Description

TypeScript Version: master (as of #26283)

Code

/** * @template {new (...args: any[]) => any} T * @param {T} SuperClass */functionmyMixin(SuperClass){returnclassextendsSuperClass{method(){return0;}}};classBase{}constMixed=myMixin(Base);constinstance=newMixed();instance.method();// Correctly typed in signature helpinstance.meshod();// But not checked

Run with allowJs, checkJs, and strict.

Expected behavior:

Error at meshod.

Actual behavior:

No error.

Metadata

Metadata

Labels

BugA bug in TypeScriptWorking as IntendedThe behavior described is the intended behavior; this is not a bug

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions