forked from Ivasoft/mattermost-mobile
* MM_30482: Imported database and types /database folder * MM_30482: Imported database and types /database folder * MM_30482 : All tests are passing * MM_30482 : Updating patch package for watermelon db * MM_30482 : Fixing CI issue * MM_30482 : Updating TS complaint * Update index.ts * MM_30482 : Code clean up Co-authored-by: Avinash Lingaloo <>
18 lines
428 B
TypeScript
18 lines
428 B
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
class MixinBuilder {
|
|
superclass: any;
|
|
constructor(superclass: any) {
|
|
this.superclass = superclass;
|
|
}
|
|
|
|
with(...mixins: any[]) {
|
|
return mixins.reduce((c, mixin) => mixin(c), this.superclass);
|
|
}
|
|
}
|
|
|
|
const mix = (superclass: any) => new MixinBuilder(superclass);
|
|
|
|
export default mix;
|