Mixins
suggest changeVersions
[{“Name”:“1.1.0.1”,“GroupName”:null},{“Name”:“1.3”,“GroupName”:null},{“Name”:“1.4”,“GroupName”:null},{“Name”:“1.5.4”,“GroupName”:null},{“Name”:“1.5”,“GroupName”:null},{“Name”:“1.6”,“GroupName”:null},{“Name”:“1.7”,“GroupName”:null},{“Name”:“1.7.5”,“GroupName”:null},{“Name”:“1.8.2”,“GroupName”:null},{“Name”:“1.8.5”,“GroupName”:null},{“Name”:“1.8.9”,“GroupName”:null},{“Name”:“1.8.10”,“GroupName”:null},{“Name”:“2.0 Beta”,“GroupName”:null}]
Syntax
- class BeetleGuy implements Climbs, Bulletproof { }
- applyMixins (BeetleGuy, [Climbs, Bulletproof]);
Parameters
Parameter | Description | —— | —— | derivedCtor | The class that you want to use as the composition class | baseCtors | An array of classes to be added to the composition class |
Remarks
There are three rules to bear in mind with mixins:
- You use the
implements
keyword, not theextends
keyword when you write your composition class - You need to have a matching signature to keep the compiler quiet (but it doesn’t need any real implementation – it will get that from the mixin).
- You need to call
applyMixins
with the correct arguments.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents