Fixed types of debug.names and debug.skips arrays. (#18560)

This commit is contained in:
zamb3zi
2017-08-02 12:59:41 -07:00
committed by Sheetal Nandi
parent 6e8ad8b332
commit 9ce2bb99d0
2 changed files with 6 additions and 3 deletions
+1
View File
@@ -12,6 +12,7 @@ log("Formatted test (%d arg)", 1);
log("Formatted %s (%d args)", "test", 2);
log("Enabled?: %s", debug.enabled("DefinitelyTyped:log"));
log("Name Enabled: %s", debug.names.some(name => name.test("DefinitelyTyped:log")));
log("Namespace: %s", log.namespace);
var error:debug.IDebugger = debug("DefinitelyTyped:error");
+5 -3
View File
@@ -1,6 +1,8 @@
// Type definitions for debug
// Project: https://github.com/visionmedia/debug
// Definitions by: Seon-Wook Park <https://github.com/swook>, Gal Talmor <https://github.com/galtalmor>
// Definitions by: Seon-Wook Park <https://github.com/swook>
// Gal Talmor <https://github.com/galtalmor>
// John McLaughlin <https://github.com/zamb3zi>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare var debug: debug.IDebug;
@@ -16,8 +18,8 @@ declare namespace debug {
enable: (namespaces: string) => void,
enabled: (namespaces: string) => boolean,
names: string[],
skips: string[],
names: RegExp[],
skips: RegExp[],
formatters: IFormatters
}