tsconfig: started on setting noImplicitThis to true

This commit is contained in:
Torkel Ödegaard
2018-08-30 08:53:13 +02:00
parent ceadced6f0
commit 80d6ef535d
9 changed files with 37 additions and 51 deletions

View File

@@ -922,7 +922,7 @@ for (var i = 0; i < 128; i++) {
const identifierPartTable = identifierStartTable;
export function Lexer(expression) {
export function Lexer(this: any, expression) {
this.input = expression;
this.char = 1;
this.from = 1;
@@ -1037,7 +1037,7 @@ Lexer.prototype = {
return /^[0-9a-fA-F]$/.test(str);
}
const readUnicodeEscapeSequence = _.bind(function() {
const readUnicodeEscapeSequence = _.bind(function(this: any) {
/*jshint validthis:true */
index += 1;
@@ -1065,7 +1065,7 @@ Lexer.prototype = {
return null;
}, this);
const getIdentifierStart = _.bind(function() {
const getIdentifierStart = _.bind(function(this: any) {
/*jshint validthis:true */
const chr = this.peek(index);
const code = chr.charCodeAt(0);
@@ -1096,7 +1096,7 @@ Lexer.prototype = {
return null;
}, this);
const getIdentifierPart = _.bind(function() {
const getIdentifierPart = _.bind(function(this: any) {
/*jshint validthis:true */
const chr = this.peek(index);
const code = chr.charCodeAt(0);

View File

@@ -1,6 +1,6 @@
import { Lexer } from './lexer';
export function Parser(expression) {
export function Parser(this: any, expression) {
this.expression = expression;
this.lexer = new Lexer(expression);
this.tokens = this.lexer.tokenize();