DefinitelyTyped/types/jasmine-node/index.d.ts
Jonathan Yee 3309325bf7 (jasmine) Type safe method names list on a generic for CreateSpyObj (#29325)
⬆ upgrade to TS 2.3 for all dependency. 👽 Use keyof feature only available on 2.3. These changes
allow the array of method names used to be type safe to the properties of the generic class
specified <T>. Although keyof provides non-methods, which isn't allowed by CreateSpyObj, atleast
this provides better typing for users when autocompleting list of class methods (especially if there
are heaps!)
2018-10-01 21:03:28 -07:00

44 lines
1.2 KiB
TypeScript

// Type definitions for jasmine-node v1.14.5
// Project: https://github.com/mhevery/jasmine-node
// Definitions by: Sven Reglitzki <https://github.com/svi3c>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
///<reference types="jasmine"/>
declare function it(expectation: string, assertion: (done: (err?: any) => void) => void, timeout?: number): void;
declare namespace jasmine {
interface Env {
defaultTimeoutInterval: number;
}
interface ExecuteSpecsOptions {
specFolders: string[],
onComplete?: (runner: jasmine.Runner) => void,
isVerbose?: boolean,
showColors?: boolean,
teamcity?: string | boolean,
useRequireJs?: boolean,
regExpSpec: RegExp,
junitreport?: {
report: boolean,
savePath: string,
useDotNotation: boolean,
consolidate: boolean
},
includeStackTrace?: boolean,
growl?: boolean
}
interface JasmineNode {
executeSpecsInFolder(options: ExecuteSpecsOptions): void;
loadHelpersInFolder(path: string, pattern: RegExp): void;
}
}
declare module "jasmine-node" {
const jasmine: jasmine.JasmineNode;
export = jasmine;
}