import {supplier, supplierFn} from "../Interface"; /** * @Supplier */ export abstract class Supplier implements supplier{ /**@override*/ get: supplierFn = ()=> void 0; /*** * @adapt * @params supplierA * @returns Supplier */ public static adapt(supplierA:Supplier|Function):Supplier{ if(supplierA instanceof Supplier )return supplierA; return new class extends Supplier { get:supplierFn = ():T=> typeof supplierA === "function" ? supplierA() : null; }; } } Object.package(this);