You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before upgrading typescript to 3.7 and updating to the corresponding version of @jasmine/types, I was able to do the following:
class MyClass {
constructor(x: Function) {}
}
function myFunction(y: MyClass) {}
...
// Do test stuff
...
expect(myFunction).toHaveBeenCalledWith(new MyClass(jasmine.any(Function)));
I can't do this anymore, I receive this error:
Argument of type 'AsymmetricMatcher<any>' is not assignable to parameter of type 'Function'. Type 'AsymmetricMatcher<any>' is missing the following properties from type 'Function': apply, call, bind, prototype, and 6 more.
The text was updated successfully, but these errors were encountered:
class MyClass {
constructor(x: Function) {}
}
function myFunction(y: MyClass) {}
...
// Do test stuff
...
expect(myFunction).toHaveBeenCalledWith(new MyClass(jasmine.any(Function) as any));
Hi thread, we're moving DefinitelyTyped to use GitHub Discussions for conversations the @types modules in DefinitelyTyped.
To help with the transition, we're closing all issues which haven't had activity in the last 6 months, which includes this issue. If you think closing this issue is a mistake, please pop into the TypeScript Community Discord and mention the issue in the definitely-typed channel.
@types/xxxx
package and had problems.Definitions by:
inindex.d.ts
) so they can respond.Before upgrading typescript to 3.7 and updating to the corresponding version of @jasmine/types, I was able to do the following:
I can't do this anymore, I receive this error:
Argument of type 'AsymmetricMatcher<any>' is not assignable to parameter of type 'Function'. Type 'AsymmetricMatcher<any>' is missing the following properties from type 'Function': apply, call, bind, prototype, and 6 more.
The text was updated successfully, but these errors were encountered: