refactor(core): ts’ify tests

This commit is contained in:
Tobias Bosch
2015-05-26 09:45:15 -07:00
parent 23d59df81a
commit 79f564be46
27 changed files with 2558 additions and 2856 deletions

View File

@ -114,5 +114,5 @@ export class DomAdapter {
getHistory() { throw _abstract(); }
getLocation() { throw _abstract(); }
getBaseHref() { throw _abstract(); }
getUserAgent() { throw _abstract(); }
getUserAgent(): string { throw _abstract(); }
}

View File

@ -45,6 +45,6 @@ export function el(html: string) {
var _RE_SPECIAL_CHARS = ['-', '[', ']', '/', '{', '}', '\\', '(', ')', '*', '+', '?', '.', '^', '$', '|'];
var _ESCAPE_RE = RegExpWrapper.create(`[\\${_RE_SPECIAL_CHARS.join('\\')}]`);
export function containsRegexp(input: string): RegExp {
return RegExpWrapper.create(StringWrapper.replaceAllMapped(input, _ESCAPE_RE, (match) => `\\${match[0]}`));
return RegExpWrapper.create(
StringWrapper.replaceAllMapped(input, _ESCAPE_RE, (match) => `\\${match[0]}`));
}