Fix karma-coverage definition

This commit is contained in:
Tanguy Krotoff
2015-11-21 15:33:37 +01:00
parent 02dd2f323e
commit 507d8b07b4
2 changed files with 19 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
/// <reference path="karma-coverage.d.ts" />
import karma = require('karma');
import * as karma from 'karma-coverage';
// See https://github.com/karma-runner/karma-coverage/blob/v0.5.3/README.md#basic

View File

@@ -4,10 +4,20 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../karma/karma.d.ts" />
/// <reference path="../istanbul/istanbul.d.ts" />
declare module 'karma' {
namespace karma {
interface ConfigOptions {
declare module 'karma-coverage' {
import * as karma from 'karma';
import * as istanbul from 'istanbul';
namespace karmaCoverage {
interface Karma extends karma.Karma {}
interface Config extends karma.Config {
set: (config: ConfigOptions) => void;
}
interface ConfigOptions extends karma.ConfigOptions {
/**
* See https://github.com/karma-runner/karma-coverage/blob/master/docs/configuration.md
*/
@@ -21,8 +31,12 @@ declare module 'karma' {
check?: any;
watermarks?: any;
includeAllSources?: boolean;
sourceStore?: any; // Should be istanbul.Store
sourceStore?: istanbul.Store;
instrumenter?: any;
}
}
var karmaCoverage: karmaCoverage.Karma;
export = karmaCoverage;
}