diff --git a/types/xregexp/index.d.ts b/types/xregexp/index.d.ts index 918c13e0b6..3974682fa0 100644 --- a/types/xregexp/index.d.ts +++ b/types/xregexp/index.d.ts @@ -2,6 +2,7 @@ // Project: http://xregexp.com // Definitions by: Bart van der Schoor , // Johannes Fahrenkrug +// Mateusz Jagiełło // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -83,7 +84,7 @@ declare namespace OuterXRegExp { function uninstall(options: Object): void; function uninstall(options: string): void; - function union(patterns: string[], flags?: string): RegExp; + function union(patterns: string[] | RegExp[], flags?: string): RegExp; var version: string; // end API definitions @@ -126,7 +127,7 @@ declare namespace OuterXRegExp { function uninstall(options: Object): void; function uninstall(options: string): void; - function union(patterns: string[], flags?: string): RegExp; + function union(patterns: string[] | RegExp[], flags?: string): RegExp; var version: string; // end API definitions } diff --git a/types/xregexp/xregexp-tests.ts b/types/xregexp/xregexp-tests.ts index b7328e5d12..543ceb7227 100644 --- a/types/xregexp/xregexp-tests.ts +++ b/types/xregexp/xregexp-tests.ts @@ -145,5 +145,7 @@ XRegExp.uninstall(str); regex = XRegExp.union(strArr, flags); regex = XRegExp.union(strArr); +regex = XRegExp.union(expArr, flags); +regex = XRegExp.union(expArr); // -- -- -- -- -- -- -- -- -- -- -- -- --