TypeScript/tests/baselines/reference/regExpWithSlashInCharClass.types

29 lines
3.2 KiB
Plaintext
Raw Normal View History

2014-08-28 01:58:31 +02:00
=== tests/cases/compiler/regExpWithSlashInCharClass.ts ===
var foo1 = "a/".replace(/.[/]/, "");
2015-04-13 23:01:57 +02:00
>foo1 : string, Symbol(foo1, Decl(regExpWithSlashInCharClass.ts, 0, 3))
2014-08-28 01:58:31 +02:00
>"a/".replace(/.[/]/, "") : string
2015-04-13 23:01:57 +02:00
>"a/".replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replaceValue: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replaceValue: (substring: string, ...args: any[]) => string): string; }, Symbol(String.replace, Decl(lib.d.ts, 329, 44), Decl(lib.d.ts, 336, 63), Decl(lib.d.ts, 343, 102), Decl(lib.d.ts, 350, 63))
2015-04-13 21:36:11 +02:00
>"a/" : string
2015-04-13 23:01:57 +02:00
>replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replaceValue: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replaceValue: (substring: string, ...args: any[]) => string): string; }, Symbol(String.replace, Decl(lib.d.ts, 329, 44), Decl(lib.d.ts, 336, 63), Decl(lib.d.ts, 343, 102), Decl(lib.d.ts, 350, 63))
2015-04-13 21:36:11 +02:00
>/.[/]/ : RegExp
>"" : string
2014-08-28 01:58:31 +02:00
var foo2 = "a//".replace(/.[//]/g, "");
2015-04-13 23:01:57 +02:00
>foo2 : string, Symbol(foo2, Decl(regExpWithSlashInCharClass.ts, 1, 3))
2014-08-28 01:58:31 +02:00
>"a//".replace(/.[//]/g, "") : string
2015-04-13 23:01:57 +02:00
>"a//".replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replaceValue: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replaceValue: (substring: string, ...args: any[]) => string): string; }, Symbol(String.replace, Decl(lib.d.ts, 329, 44), Decl(lib.d.ts, 336, 63), Decl(lib.d.ts, 343, 102), Decl(lib.d.ts, 350, 63))
2015-04-13 21:36:11 +02:00
>"a//" : string
2015-04-13 23:01:57 +02:00
>replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replaceValue: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replaceValue: (substring: string, ...args: any[]) => string): string; }, Symbol(String.replace, Decl(lib.d.ts, 329, 44), Decl(lib.d.ts, 336, 63), Decl(lib.d.ts, 343, 102), Decl(lib.d.ts, 350, 63))
2015-04-13 21:36:11 +02:00
>/.[//]/g : RegExp
>"" : string
2014-08-28 01:58:31 +02:00
var foo3 = "a/".replace(/.[/no sleep /till/]/, "bugfix");
2015-04-13 23:01:57 +02:00
>foo3 : string, Symbol(foo3, Decl(regExpWithSlashInCharClass.ts, 2, 3))
2014-08-28 01:58:31 +02:00
>"a/".replace(/.[/no sleep /till/]/, "bugfix") : string
2015-04-13 23:01:57 +02:00
>"a/".replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replaceValue: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replaceValue: (substring: string, ...args: any[]) => string): string; }, Symbol(String.replace, Decl(lib.d.ts, 329, 44), Decl(lib.d.ts, 336, 63), Decl(lib.d.ts, 343, 102), Decl(lib.d.ts, 350, 63))
2015-04-13 21:36:11 +02:00
>"a/" : string
2015-04-13 23:01:57 +02:00
>replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replaceValue: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replaceValue: (substring: string, ...args: any[]) => string): string; }, Symbol(String.replace, Decl(lib.d.ts, 329, 44), Decl(lib.d.ts, 336, 63), Decl(lib.d.ts, 343, 102), Decl(lib.d.ts, 350, 63))
2015-04-13 21:36:11 +02:00
>/.[/no sleep /till/]/ : RegExp
>"bugfix" : string
2014-08-28 01:58:31 +02:00