@reffuse/extension-query 0.1.5 #16

Merged
Thilawyn merged 347 commits from next into master 2025-06-01 05:28:47 +02:00
Showing only changes of commit 28424b63cb - Show all commits

View File

@@ -24,7 +24,8 @@ const make = <Ext extends object>(extension: Ext) =>
StaticType<BaseClass> StaticType<BaseClass>
) => { ) => {
const class_ = class extends self {} const class_ = class extends self {}
return class_ class_.prototype = { ...class_.prototype, ...extension } as any
return class_ as any
} }
export const withContexts = <R2 extends Array<unknown>>( export const withContexts = <R2 extends Array<unknown>>(
@@ -55,10 +56,14 @@ const withMyContext = withContexts(MyContext)
const clsWithMyContext = withMyContext(Reffuse) const clsWithMyContext = withMyContext(Reffuse)
class ReffuseWithMyContext extends clsWithMyContext {} class ReffuseWithMyContext extends clsWithMyContext {}
const t = new ReffuseWithMyContext()
const cls1 = make({ const withProut = make({
prout<R>(this: ReffuseHelpers.ReffuseHelpers<R>) {} prout<R>(this: ReffuseHelpers.ReffuseHelpers<R>) {}
})(Reffuse) })
class Cls1 extends cls1 {} class MyReffuse extends Reffuse.pipe(
withProut,
withContexts(MyContext),
) {}
new MyReffuse().useFork()