nl_tokens: this function will run after checking the source file so CaptureThis is correct for all nodes
pl_tokens: function checkIfThisIsCapturedInEnclosingScope ( node ) { var current = node ; while ( current ) { if ( getNodeCheckFlags ( current ) & 4 /* CaptureThis */ ) { var isDeclaration_1 = node . kind !== 69 /* Identifier */ ; if ( isDeclaration_1 ) { <mask> ( node . name , ts . Diagnostics . Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference ) ; } else { error ( node , ts . Diagnostics . Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference ) ; } return ; } current = current . parent ; } }