fix: build and test fixes for TS 2.1 (#13294)

This commit is contained in:
Alex Eagle
2017-01-24 09:05:34 -08:00
committed by Miško Hevery
parent 5c431cee02
commit ef32e6b0d0
21 changed files with 66 additions and 39 deletions

View File

@ -294,6 +294,8 @@ class _Scanner {
buffer += input.substring(marker, this.index);
this.advance();
let unescapedCode: number;
// Workaround for TS2.1-introduced type strictness
this.peek = this.peek;
if (this.peek == chars.$u) {
// 4 character hex code for unicode character.
const hex: string = input.substring(this.index + 1, this.index + 5);