import {Mixin} from "../../../types/mixin.js" import {Constructor} from "../../../types/constructor.js" export interface WithShare { get share(): xShare } export function mixinShare(providedShare: xShare) { return function( Base: C ): Mixin> { return class extends Base { get share() { return providedShare } } } } export function mixinRequireShare(name?: string) { return function( Base: C ): Mixin> { return class extends Base { get share(): xShare { throw new Error(`share required by component${name ? " " + name : ""}`) } } } }