67
public stub<T, V>(service: ServiceIdentifier<T>, property: string, value: V): V extends Function ? sinon.SinonSpy : sinon.SinonStub;
68
public stub<T>(serviceIdentifier: ServiceIdentifier<T>, arg2: any, arg3?: string, arg4?: any): sinon.SinonStub | sinon.SinonSpy {
70
>
const serviceMock: IServiceMock<any> = { id: serviceIdentifier, service: service };
71
>
const property = typeof arg2 === 'string' ? arg2 : arg3;
72
>
const value = typeof arg2 === 'string' ? arg3 : arg4;
73
>
74
>
const stubObject = this._create(serviceMock, { stub: true }, service && !property);
75
>
if (property) {
76
if (stubObject[property]) {
77
if (stubObject[property].hasOwnProperty('restore')) {