rpc-typescript
Version:
An RCP library for TypeScript
35 lines (28 loc) • 836 B
text/typescript
import {
ContractReference,
StubContractConfig,
StubMethodConfig
} from "../types";
import { ContextDomain } from "./ContextDomain";
import { IEndpointContext } from "./IEndpointContext";
export class StubContextImpl implements IEndpointContext {
createChannel<T>(
contract: ContractReference<T>
): T {
throw new Error("Method not implemented.");
}
public defineMember(
props: StubMethodConfig,
target: Object,
propertyKey: string | symbol,
descriptor: TypedPropertyDescriptor<any>
): void {
}
public defineContract(
props: StubContractConfig,
constructor: Function
): void
{
}
}
export const StubContext = new ContextDomain<StubContextImpl>(() => new StubContextImpl());