tannerntannern / ts-mixer

A small TypeScript library that provides tolerable Mixin functionality.
MIT License
379 stars 27 forks source link

Only 10 classes are allowed for mixins. #33

Closed painor closed 3 years ago

painor commented 3 years ago

Hey, I'm using your library for a project that needs 12/13 mixin classes (I know weird) but apparently this library only handles 10? I read bit of the code and saw that the function is declared manually. Is there a possibility to add as much as I need in terms of classes or is that a limit ?

tannerntannern commented 3 years ago

Hi @painor, ten is just an arbitrary limit currently. I'll accept a PR if you wish to extend that limit further. Otherwise you may find it easier to simply mix a subset of your classes into one class, then feed that into another Mixin() call. ts-mixer allows this and you'll still get the same typing benefits.

painor commented 3 years ago

ah I didn't think of using Mixins with smaller classes. that might actually be a better idea than to keep extending the limit each time. thanks.