Extension fix
All checks were successful
Lint / lint (push) Successful in 10s

This commit is contained in:
Julien Valverdé
2025-02-24 21:09:44 +01:00
parent da0f6168f0
commit ce3989ab77

View File

@@ -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
} }