@types/jasmine
Advanced tools
Comparing version 2.8.19 to 2.8.20
@@ -134,3 +134,3 @@ // Type definitions for Jasmine 2.8 | ||
*/ | ||
declare function spyOnProperty<T>(object: T, property: keyof T, accessType?: 'get' | 'set'): jasmine.Spy; | ||
declare function spyOnProperty<T>(object: T, property: keyof T, accessType?: "get" | "set"): jasmine.Spy; | ||
@@ -143,3 +143,5 @@ declare function runs(asyncMethod: Function): void; | ||
type Expected<T> = T | ObjectContaining<T> | Any | Spy; | ||
type SpyObjMethodNames<T = undefined> = T extends undefined ? (ReadonlyArray<string> | {[methodName: string]: any}) : (ReadonlyArray<keyof T> | {[P in keyof T]?: ReturnType<T[P] extends (...args: any[]) => any ? T[P] : any>}); | ||
type SpyObjMethodNames<T = undefined> = T extends undefined | ||
? (ReadonlyArray<string> | { [methodName: string]: any }) | ||
: (ReadonlyArray<keyof T> | { [P in keyof T]?: ReturnType<T[P] extends (...args: any[]) => any ? T[P] : any> }); | ||
@@ -179,4 +181,4 @@ var clock: () => Clock; | ||
interface Any { | ||
(...params: any[]):any; // jasmine.Any can also be a function | ||
new (expectedClass: any): any; | ||
(...params: any[]): any; // jasmine.Any can also be a function | ||
new(expectedClass: any): any; | ||
@@ -194,3 +196,3 @@ jasmineMatches(other: any): boolean; | ||
interface ArrayContaining<T> { | ||
new (sample: ArrayLike<T>): ArrayLike<T>; | ||
new(sample: ArrayLike<T>): ArrayLike<T>; | ||
@@ -202,3 +204,3 @@ asymmetricMatch(other: any): boolean; | ||
interface ObjectContaining<T> { | ||
new (sample: Partial<T>): Partial<T>; | ||
new(sample: Partial<T>): Partial<T>; | ||
@@ -210,5 +212,4 @@ jasmineMatches(other: any, mismatchKeys: any[], mismatchValues: any[]): boolean; | ||
interface Block { | ||
new(env: Env, func: SpecFunction, spec: Spec): any; | ||
new (env: Env, func: SpecFunction, spec: Spec): any; | ||
execute(onComplete: () => void): void; | ||
@@ -218,7 +219,7 @@ } | ||
interface WaitsBlock extends Block { | ||
new (env: Env, timeout: number, spec: Spec): any; | ||
new(env: Env, timeout: number, spec: Spec): any; | ||
} | ||
interface WaitsForBlock extends Block { | ||
new (env: Env, timeout: number, latchFunction: SpecFunction, message: string, spec: Spec): any; | ||
new(env: Env, timeout: number, latchFunction: SpecFunction, message: string, spec: Spec): any; | ||
} | ||
@@ -307,5 +308,4 @@ | ||
interface FakeTimer { | ||
new(): any; | ||
new (): any; | ||
reset(): void; | ||
@@ -318,7 +318,7 @@ tick(millis: number): void; | ||
interface HtmlReporter { | ||
new (): any; | ||
new(): any; | ||
} | ||
interface HtmlSpecFilter { | ||
new (): any; | ||
new(): any; | ||
} | ||
@@ -361,3 +361,3 @@ | ||
interface Order { | ||
new (options: { random: boolean, seed: string }): any; | ||
new(options: { random: boolean; seed: string }): any; | ||
random: boolean; | ||
@@ -377,3 +377,3 @@ seed: string; | ||
interface TreeProcessor { | ||
new (attrs: any): any; | ||
new(attrs: any): any; | ||
execute: (done: Function) => void; | ||
@@ -390,5 +390,4 @@ processTree(): any; | ||
interface PrettyPrinter { | ||
new(): any; | ||
new (): any; | ||
format(value: any): void; | ||
@@ -407,5 +406,4 @@ iterateObject(obj: any, fn: (property: string, isGetter: boolean) => void): void; | ||
interface Queue { | ||
new(env: any): any; | ||
new (env: any): any; | ||
env: Env; | ||
@@ -429,5 +427,4 @@ ensured: boolean[]; | ||
interface Matchers<T> { | ||
new(env: Env, actual: T, spec: Env, isNot?: boolean): any; | ||
new (env: Env, actual: T, spec: Env, isNot?: boolean): any; | ||
env: Env; | ||
@@ -440,3 +437,2 @@ actual: T; | ||
/** | ||
* | ||
* @param expected the actual value to be === to the expected value. | ||
@@ -449,3 +445,2 @@ * @param expectationFailOutput | ||
/** | ||
* | ||
* @param expected the actual value to be equal to the expected, using deep equality comparison. | ||
@@ -475,3 +470,3 @@ * @param expectationFailOutput | ||
toThrowError(message?: string | RegExp): boolean; | ||
toThrowError(expected?: new (...args: any[]) => Error, message?: string | RegExp): boolean; | ||
toThrowError(expected?: new(...args: any[]) => Error, message?: string | RegExp): boolean; | ||
@@ -524,3 +519,2 @@ not: Matchers<T>; | ||
interface PassedExpectation extends CustomReportExpectation { | ||
} | ||
@@ -553,5 +547,4 @@ | ||
interface Runner { | ||
new(env: Env): any; | ||
new (env: Env): any; | ||
execute(): void; | ||
@@ -581,5 +574,4 @@ beforeEach(beforeEachFunction: SpecFunction): void; | ||
interface Spec extends SuiteOrSpec { | ||
new(env: Env, suite: Suite, description: string): any; | ||
new (env: Env, suite: Suite, description: string): any; | ||
suite: Suite; | ||
@@ -613,3 +605,3 @@ | ||
spyOn(obj: any, methodName: string, ignoreMethodDoesntExist: boolean): Spy; | ||
spyOnProperty(object: any, property: string, accessType?: 'get' | 'set'): Spy; | ||
spyOnProperty(object: any, property: string, accessType?: "get" | "set"): Spy; | ||
removeAllSpies(): void; | ||
@@ -625,5 +617,4 @@ throwOnExpectationFailure: boolean; | ||
interface Suite extends SuiteOrSpec { | ||
new(env: Env, description: string, specDefinitions: () => void, parentSuite: Suite): any; | ||
new (env: Env, description: string, specDefinitions: () => void, parentSuite: Suite): any; | ||
parentSuite: Suite; | ||
@@ -656,5 +647,7 @@ | ||
type SpyObj<T> = T & { | ||
[k in keyof T]: T[k] extends Function ? T[k] & Spy : T[k]; | ||
} | ||
type SpyObj<T> = | ||
& T | ||
& { | ||
[k in keyof T]: T[k] extends Function ? T[k] & Spy : T[k]; | ||
}; | ||
@@ -717,3 +710,2 @@ interface SpyAnd { | ||
interface JsApiReporter extends Reporter { | ||
started: boolean; | ||
@@ -725,3 +717,3 @@ finished: boolean; | ||
new (): any; | ||
new(): any; | ||
@@ -728,0 +720,0 @@ suites(): Suite[]; |
{ | ||
"name": "@types/jasmine", | ||
"version": "2.8.19", | ||
"version": "2.8.20", | ||
"description": "TypeScript definitions for Jasmine", | ||
@@ -63,4 +63,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jasmine", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "c991a2a88e584723e22958ffbf8f13d6a420ed5aea9830bff5cf7f4425a6b728", | ||
"typeScriptVersion": "3.8" | ||
"typesPublisherContentHash": "d17938a4fa6fbc26f0ee6478f04bc51ce42679e98b4b015b5f6edbb01ed2771d", | ||
"typeScriptVersion": "4.5" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Thu, 27 Jan 2022 20:01:27 GMT | ||
* Last updated: Fri, 15 Sep 2023 20:36:37 GMT | ||
* Dependencies: none | ||
@@ -14,0 +14,0 @@ * Global values: `afterAll`, `afterEach`, `beforeAll`, `beforeEach`, `describe`, `expect`, `fail`, `fdescribe`, `fit`, `it`, `jasmine`, `pending`, `runs`, `spyOn`, `spyOnProperty`, `waits`, `waitsFor`, `xdescribe`, `xit` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
628
31404