rpc-typescript
Version:
An RCP library for TypeScript
37 lines (29 loc) • 883 B
text/typescript
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());