diff --git a/types/jasmine/index.d.ts b/types/jasmine/index.d.ts index cc28931542..ed068f4775 100644 --- a/types/jasmine/index.d.ts +++ b/types/jasmine/index.d.ts @@ -122,7 +122,7 @@ declare function spyOn(object: T, method: keyof T): jasmine.Spy; * @param property The name of the property to replace with a Spy * @param accessType The access type (get|set) of the property to Spy on. */ -declare function spyOnProperty(object: T, property: keyof T, accessType: string): jasmine.Spy; +declare function spyOnProperty(object: T, property: keyof T, accessType?: 'get' | 'set'): jasmine.Spy; declare function runs(asyncMethod: Function): void; declare function waitsFor(latchMethod: () => boolean, failureMessage?: string, timeout?: number): void; @@ -579,7 +579,7 @@ declare namespace jasmine { addBeforesAndAftersToQueue(): void; explodes(): void; spyOn(obj: any, methodName: string, ignoreMethodDoesntExist: boolean): Spy; - spyOnProperty(object: any, property: string, accessType: string): Spy; + spyOnProperty(object: any, property: string, accessType?: 'get' | 'set'): Spy; removeAllSpies(): void; throwOnExpectationFailure: boolean; }