From 2e4fe798dcd34e8fcb61897647b761e16f2f09be Mon Sep 17 00:00:00 2001 From: gstribling <59985244+gstribling@users.noreply.github.com> Date: Fri, 17 Jan 2020 09:59:05 -0800 Subject: [PATCH] throwError should be able to take string or Error (#41666) https://jasmine.github.io/api/3.5/SpyStrategy.html https://yaqs.corp.google.com/eng/q/5985225959145472?search_query_record_key=ahFzfmdvb2dsZS5jb206eWFxc3IeCxIRU2VhcmNoUXVlcnlSZWNvcmQYgIDI2cbi1goMogEDZW5n --- types/jasmine/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/jasmine/index.d.ts b/types/jasmine/index.d.ts index ce699c183a..976eab3fba 100644 --- a/types/jasmine/index.d.ts +++ b/types/jasmine/index.d.ts @@ -875,7 +875,7 @@ declare namespace jasmine { /** By chaining the spy with and.callFake, all calls to the spy will delegate to the supplied function. */ callFake(fn: Function): Spy; /** By chaining the spy with and.throwError, all calls to the spy will throw the specified value. */ - throwError(msg: string): Spy; + throwError(msg: string|Error): Spy; /** When a calling strategy is used for a spy, the original stubbing behavior can be returned at any time with and.stub. */ stub(): Spy; }