import { createDecoratorFactory , ClassDescriptor , isClass } from '@esfx/decorators-stage1-core' ; export const mixin = createDecoratorFactory ( < T extends Function > ( descriptor , ... templates ) => { if ( ! isClass ( descriptor ) ) throw new TypeError ( `'@mixin' is only supported on classes.` ) ; Object . assign ( descriptor . target . prototype , ... templates ) ; return descriptor . target ; } ) ;