import { wrap } from "https://deno.land/x/mixwithts@1.1.2/mod.ts";
Sets up the function mixin
to be wrapped by the function wrapper
, while
allowing properties on mixin
to be available via wrapper
, and allowing
wrapper
to be unwrapped to get to the original function.
wrap
does two things:
- Sets the prototype of
mixin
towrapper
so that properties set onmixin
inherited bywrapper
. - Sets a special property on
mixin
that points back tomixin
so that it can be retreived fromwrapper
type
<C extends Constructable, T>(mixin: mixin<C, T>, wrapper: mixin<C, T>) => mixin<C, T>