import {
    ContractReference,
    ProxyContractConfig,
    ProxyMethodConfig
} from "../types";
import { ContextDomain } from "./ContextDomain";
import { IEndpointContext } from "./IEndpointContext";

class ProxyContextImpl implements IEndpointContext {

    createChannel<T>(
        contract: ContractReference<T>
    ): T {
        throw new Error("Method not implemented.");
    }

    public defineMember(
        props: ProxyMethodConfig,
        target: Object,
        propertyKey: string | symbol,
        descriptor: TypedPropertyDescriptor<any>
    ): TypedPropertyDescriptor<any> {
        return {};
    }

    public defineContract(
        props: ProxyContractConfig,
        constructor: Function
    ): void
    {
        
    }

}


export const ProxyContext = new ContextDomain<ProxyContextImpl>(() => new ProxyContextImpl());