@types/jasminewd2
Advanced tools
+57
-54
@@ -19,64 +19,67 @@ // Type definitions for jasminewd2 2.0 | ||
| declare namespace jasmine { | ||
| interface Matchers<T> { | ||
| toBe(expected: any, expectationFailOutput?: any): Promise<void>; | ||
| toEqual(expected: any, expectationFailOutput?: any): Promise<void>; | ||
| toMatch(expected: string | RegExp | Promise<string | RegExp>, expectationFailOutput?: any): Promise<void>; | ||
| toBeDefined(expectationFailOutput?: any): Promise<void>; | ||
| toBeUndefined(expectationFailOutput?: any): Promise<void>; | ||
| toBeNull(expectationFailOutput?: any): Promise<void>; | ||
| toBeNaN(): Promise<void>; | ||
| toBeTruthy(expectationFailOutput?: any): Promise<void>; | ||
| toBeFalsy(expectationFailOutput?: any): Promise<void>; | ||
| toHaveBeenCalled(): Promise<void>; | ||
| toHaveBeenCalledWith(...params: any[]): Promise<void>; | ||
| toHaveBeenCalledTimes(expected: number | Promise<number>): Promise<void>; | ||
| toContain(expected: any, expectationFailOutput?: any): Promise<void>; | ||
| toBeLessThan(expected: number | Promise<number>, expectationFailOutput?: any): Promise<void>; | ||
| toBeLessThanOrEqual(expected: number | Promise<number>, expectationFailOutput?: any): Promise<void>; | ||
| toBeGreaterThan(expected: number | Promise<number>, expectationFailOutput?: any): Promise<void>; | ||
| toBeGreaterThanOrEqual(expected: number | Promise<number>, expectationFailOutput?: any): Promise<void>; | ||
| toBeCloseTo(expected: number | Promise<number>, precision?: any, expectationFailOutput?: any): Promise<void>; | ||
| toThrow(expected?: any): Promise<void>; | ||
| toThrowError(message?: string | RegExp | Promise<string | RegExp>): Promise<void>; | ||
| toThrowError(expected?: new (...args: any[]) => Error | Promise<new (...args: any[]) => Error>, message?: string | RegExp | Promise<string | RegExp>): Promise<void>; | ||
| } | ||
| interface Matchers<T> { | ||
| toBe(expected: any, expectationFailOutput?: any): Promise<void>; | ||
| toEqual(expected: any, expectationFailOutput?: any): Promise<void>; | ||
| toMatch(expected: string | RegExp | Promise<string | RegExp>, expectationFailOutput?: any): Promise<void>; | ||
| toBeDefined(expectationFailOutput?: any): Promise<void>; | ||
| toBeUndefined(expectationFailOutput?: any): Promise<void>; | ||
| toBeNull(expectationFailOutput?: any): Promise<void>; | ||
| toBeNaN(): Promise<void>; | ||
| toBeTruthy(expectationFailOutput?: any): Promise<void>; | ||
| toBeFalsy(expectationFailOutput?: any): Promise<void>; | ||
| toHaveBeenCalled(): Promise<void>; | ||
| toHaveBeenCalledWith(...params: any[]): Promise<void>; | ||
| toHaveBeenCalledTimes(expected: number | Promise<number>): Promise<void>; | ||
| toContain(expected: any, expectationFailOutput?: any): Promise<void>; | ||
| toBeLessThan(expected: number | Promise<number>, expectationFailOutput?: any): Promise<void>; | ||
| toBeLessThanOrEqual(expected: number | Promise<number>, expectationFailOutput?: any): Promise<void>; | ||
| toBeGreaterThan(expected: number | Promise<number>, expectationFailOutput?: any): Promise<void>; | ||
| toBeGreaterThanOrEqual(expected: number | Promise<number>, expectationFailOutput?: any): Promise<void>; | ||
| toBeCloseTo(expected: number | Promise<number>, precision?: any, expectationFailOutput?: any): Promise<void>; | ||
| toThrow(expected?: any): Promise<void>; | ||
| toThrowError(message?: string | RegExp | Promise<string | RegExp>): Promise<void>; | ||
| toThrowError( | ||
| expected?: new(...args: any[]) => Error | Promise<new(...args: any[]) => Error>, | ||
| message?: string | RegExp | Promise<string | RegExp>, | ||
| ): Promise<void>; | ||
| } | ||
| interface ArrayLikeMatchers<T> extends Matchers<ArrayLike<T>> { | ||
| toBe(expected: Expected<ArrayLike<T>>, expectationFailOutput?: any): Promise<void>; | ||
| toEqual(expected: Expected<ArrayLike<T>>, expectationFailOutput?: any): Promise<void>; | ||
| toContain(expected: T, expectationFailOutput?: any): Promise<void>; | ||
| not: ArrayLikeMatchers<T>; | ||
| } | ||
| interface ArrayLikeMatchers<T> extends Matchers<ArrayLike<T>> { | ||
| toBe(expected: Expected<ArrayLike<T>>, expectationFailOutput?: any): Promise<void>; | ||
| toEqual(expected: Expected<ArrayLike<T>>, expectationFailOutput?: any): Promise<void>; | ||
| toContain(expected: T, expectationFailOutput?: any): Promise<void>; | ||
| not: ArrayLikeMatchers<T>; | ||
| } | ||
| // Add definition to be compatible with latest jasmine v3 types. | ||
| // Even though library is not compatible with jasmine v3, there is no suitable way to configure that now here. | ||
| // See for more detail: https://github.com/microsoft/dtslint/issues/253 | ||
| interface FunctionMatchers<Fn extends (...args: any[]) => any> extends Matchers<any> { | ||
| toHaveBeenCalledWith(...params: any[]): boolean; | ||
| toHaveBeenCalledWith(...params: any[]): Promise<void>; | ||
| } | ||
| // Add definition to be compatible with latest jasmine v3 types. | ||
| // Even though library is not compatible with jasmine v3, there is no suitable way to configure that now here. | ||
| // See for more detail: https://github.com/microsoft/dtslint/issues/253 | ||
| interface FunctionMatchers<Fn extends (...args: any[]) => any> extends Matchers<any> { | ||
| toHaveBeenCalledWith(...params: any[]): boolean; | ||
| toHaveBeenCalledWith(...params: any[]): Promise<void>; | ||
| } | ||
| function addMatchers(matchers: AsyncCustomMatcherFactories): void; | ||
| function addMatchers(matchers: AsyncCustomMatcherFactories): void; | ||
| interface Spec { | ||
| addMatchers(matchers: AsyncCustomMatcherFactories): void; | ||
| } | ||
| interface Spec { | ||
| addMatchers(matchers: AsyncCustomMatcherFactories): void; | ||
| } | ||
| interface AsyncCustomMatcherFactories { | ||
| [index: string]: AsyncCustomMatcherFactory; | ||
| } | ||
| interface AsyncCustomMatcherFactories { | ||
| [index: string]: AsyncCustomMatcherFactory; | ||
| } | ||
| interface AsyncCustomMatcherFactory { | ||
| (util: MatchersUtil, customEqualityTesters: CustomEqualityTester[]): AsyncCustomMatcher; | ||
| } | ||
| interface AsyncCustomMatcherFactory { | ||
| (util: MatchersUtil, customEqualityTesters: CustomEqualityTester[]): AsyncCustomMatcher; | ||
| } | ||
| interface AsyncCustomMatcher { | ||
| compare<T>(actual: T, expected: T): AsyncCustomMatcherResult; | ||
| compare(actual: any, expected: any): AsyncCustomMatcherResult; | ||
| } | ||
| interface AsyncCustomMatcher { | ||
| compare<T>(actual: T, expected: T): AsyncCustomMatcherResult; | ||
| compare(actual: any, expected: any): AsyncCustomMatcherResult; | ||
| } | ||
| interface AsyncCustomMatcherResult { | ||
| pass: boolean | Promise<boolean>; | ||
| message?: string | undefined; | ||
| } | ||
| interface AsyncCustomMatcherResult { | ||
| pass: boolean | Promise<boolean>; | ||
| message?: string | undefined; | ||
| } | ||
| } |
| { | ||
| "name": "@types/jasminewd2", | ||
| "version": "2.0.10", | ||
| "version": "2.0.11", | ||
| "description": "TypeScript definitions for jasminewd2", | ||
@@ -30,4 +30,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jasminewd2", | ||
| }, | ||
| "typesPublisherContentHash": "33139e66d6a81736b699eea0013345c6458867fa5de2114e0e84238b02666384", | ||
| "typeScriptVersion": "3.6" | ||
| "typesPublisherContentHash": "37bbfed796f4d17ba23ce2cb182a95fefd7151a095b50ce86928a955b09158b1", | ||
| "typeScriptVersion": "4.5" | ||
| } |
@@ -11,3 +11,3 @@ # Installation | ||
| ### Additional Details | ||
| * Last updated: Tue, 06 Jul 2021 21:33:43 GMT | ||
| * Last updated: Fri, 15 Sep 2023 20:36:37 GMT | ||
| * Dependencies: [@types/jasmine](https://npmjs.com/package/@types/jasmine) | ||
@@ -14,0 +14,0 @@ * Global values: `afterAll`, `afterEach`, `beforeAll`, `beforeEach`, `fit`, `it`, `jasmine`, `xit` |
7265
2.96%73
4.29%