0.1.13 #18
@@ -2,7 +2,7 @@ import * as ReffuseHelpers from "./ReffuseHelpers.js"
|
|||||||
import type { Merge, StaticType } from "./types.js"
|
import type { Merge, StaticType } from "./types.js"
|
||||||
|
|
||||||
|
|
||||||
export const make = <Ext extends object>(extension: Ext) =>
|
export const make = <Ext extends object>(extension: () => Ext) =>
|
||||||
<
|
<
|
||||||
BaseClass extends ReffuseHelpers.ReffuseHelpersClass<R>,
|
BaseClass extends ReffuseHelpers.ReffuseHelpersClass<R>,
|
||||||
R
|
R
|
||||||
@@ -13,6 +13,6 @@ export const make = <Ext extends object>(extension: Ext) =>
|
|||||||
StaticType<BaseClass>
|
StaticType<BaseClass>
|
||||||
) => {
|
) => {
|
||||||
const class_ = class extends self {}
|
const class_ = class extends self {}
|
||||||
class_.prototype = { ...class_.prototype, ...extension } as any
|
Object.assign(class_.prototype, extension())
|
||||||
return class_ as any
|
return class_ as any
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user