mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 13:00:19 +00:00
Add types for XRegExp union function to accept either string[] and RegExp[]
This commit is contained in:
Vendored
+3
-2
@@ -2,6 +2,7 @@
|
||||
// Project: http://xregexp.com
|
||||
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>,
|
||||
// Johannes Fahrenkrug <https://github.com/jfahrenkrug>
|
||||
// Mateusz Jagiełło <https://github.com/sigo>
|
||||
// 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
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
// -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
|
||||
Reference in New Issue
Block a user