From 6568ce0b6faf5da2ff60c33643e1d33cc1513b62 Mon Sep 17 00:00:00 2001 From: Eyal Solnik Date: Fri, 23 Oct 2015 19:36:40 +0300 Subject: [PATCH] Fix issue #6065 * Update the Runner.run function. * Update the Server.new function. * Add new Config interface. * Add new ConfigFile interface. * Rename ClientConfig to ClientOptions. --- karma/karma.d.ts | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/karma/karma.d.ts b/karma/karma.d.ts index cad9eb6ba6..f12d5df20c 100644 --- a/karma/karma.d.ts +++ b/karma/karma.d.ts @@ -53,11 +53,11 @@ declare module 'karma' { } interface Runner { - run(options?: Config, callback?: ServerCallback): void; + run(options?: ConfigOptions|ConfigFile, callback?: ServerCallback): void; } interface Server extends NodeJS.EventEmitter { - new(options?: Config, callback?: ServerCallback): Server; + new(options?: ConfigOptions|ConfigFile, callback?: ServerCallback): Server; /** * Start the server */ @@ -82,8 +82,21 @@ declare module 'karma' { interface ServerCallback { (exitCode: number): void; } + + interface Config { + set: (config: ConfigOptions) => void; + LOG_DISABLE: string; + LOG_ERROR: string; + LOG_WARN: string; + LOG_INFO: string; + LOG_DEBUG: string; + } + + interface ConfigFile { + configFile: string; + } - interface Config { + interface ConfigOptions { /** * @description Enable or disable watching files and executing the tests whenever one of these files changes. * @default true @@ -163,7 +176,7 @@ declare module 'karma' { *

*/ captureTimeout?: number; - client?: ClientConfig; + client?: ClientOptions; /** * @default true * @description Enable or disable colors in the output (reporters and logs). @@ -308,7 +321,7 @@ declare module 'karma' { urlRoot?: string; } - interface ClientConfig { + interface ClientOptions { /** * @default undefined * @description When karma run is passed additional arguments on the command-line, they