mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 21:10:23 +00:00
Jasmine: Parameter accessType should be optional and have specific possible values in spyOnProperty() (#22849)
* Update parameter to be option for Jasmine spyOnProperty * Constrain possible values of accessType to 'get' and 'set'
This commit is contained in:
committed by
Ryan Cavanaugh
parent
cae161a583
commit
5ee253b57e
Vendored
+2
-2
@@ -122,7 +122,7 @@ declare function spyOn<T>(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<T>(object: T, property: keyof T, accessType: string): jasmine.Spy;
|
||||
declare function spyOnProperty<T>(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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user