mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-10 06:41:59 -06:00
Added 'flags' to RegExp.prototype.
This commit is contained in:
parent
d3dd48f07b
commit
f75c9a6624
2
src/lib/core.d.ts
vendored
2
src/lib/core.d.ts
vendored
@ -823,7 +823,7 @@ interface RegExp {
|
||||
*/
|
||||
test(string: string): boolean;
|
||||
|
||||
/** Returns a copy of the text of the regular expression pattern. Read-only. The rgExp argument is a Regular expression object. It can be a variable name or a literal. */
|
||||
/** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */
|
||||
source: string;
|
||||
|
||||
/** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */
|
||||
|
||||
14
src/lib/es6.d.ts
vendored
14
src/lib/es6.d.ts
vendored
@ -624,6 +624,20 @@ interface RegExp {
|
||||
*/
|
||||
split(string: string, limit?: number): string[];
|
||||
|
||||
/**
|
||||
* Returns a string indicating the flags of the regular expression in question. This field is read-only.
|
||||
* The characters in this string are sequenced and concatenated in the following order:
|
||||
*
|
||||
* - "g" for global
|
||||
* - "i" for ignoreCase
|
||||
* - "m" for multiline
|
||||
* - "u" for unicode
|
||||
* - "y" for sticky
|
||||
*
|
||||
* If no flags are set, the value is the empty string.
|
||||
*/
|
||||
flags: string;
|
||||
|
||||
/**
|
||||
* Returns a Boolean value indicating the state of the sticky flag (y) used with a regular
|
||||
* expression. Default is false. Read-only.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user