Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,9 @@ export interface ClassMethod extends FunctionLike {
* argument, so consumers of this interface should assume that the return type
* is the single argument subclassed by this declaration.
*
* A mixin should only have a superclass if it composes another mixin, and the
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im not sure I understand.

Given:

export const MixinA = base => class extends MixinB(base){}

Here the MixinB would be "superclass"?

What in the case of:

export const MixinA = base => class extends MixinC(MixinB(base)){}

?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was updated to say "a mixins should not have a superclass". In your examples the other mixins would be included in the mixins field of MixinA.

* superclass should reference that mixin.
*
* @example
*
* This JavaScript mixin declaration:
Expand Down