-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error TS4020: 'extends' clause of exported class 'SampleNewClass' has or is using private name 'SampleMixin' #15870
Comments
This looks like the same underling issue as #9944. the rule is if the compiler tries to write the type, and it needs an import from another module, and it was not already available, then error.. if you were to write the type manually for this class, you would have needed something like: import SampleMixin, { SampleMixin as SampleMixinType, Constructor } from './b';
class SampleSuperClass { }
const base: Constructor<SampleMixinType> & typeof SampleSuperClass = SampleMixin(SampleSuperClass);
export default class SampleNewClass extends base { } since both #9944 tracks adding imports automatically in such cases. |
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed. |
TypeScript Version: 2.3.2
Code
File
SampleMixin.ts
with mixin class:The file
index.ts
where this mixin is used:Expected behavior:
Compilation complete. Watching for file changes.
Actual behavior:
The text was updated successfully, but these errors were encountered: