tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(4,1): error TS6053: File 'tests/cases/conformance/parser/ecmascript5/typescript.ts' not found.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(24,22): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(38,23): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(48,26): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(68,28): error TS2305: Module 'TypeScript' has no exported member 'NodeType'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(70,35): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(75,21): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(79,21): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(86,36): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(94,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(95,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(96,20): error TS2305: Module 'TypeScript' has no exported member 'InterfaceDeclaration'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(103,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(104,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(105,20): error TS2305: Module 'TypeScript' has no exported member 'InterfaceDeclaration'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(112,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(113,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(114,20): error TS2305: Module 'TypeScript' has no exported member 'ArgDecl'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(121,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(122,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(123,20): error TS2305: Module 'TypeScript' has no exported member 'VarDecl'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(130,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(131,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(132,20): error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(139,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(140,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(141,20): error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(148,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(149,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(156,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(157,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(164,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(165,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(172,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(173,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(174,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(175,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(176,20): error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(177,20): error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(178,20): error TS2305: Module 'TypeScript' has no exported member 'ClassDeclaration'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(185,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(186,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(191,61): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(192,28): error TS2339: Property 'hasFlag' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(192,38): error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(192,109): error TS2339: Property 'ModuleFlags' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(197,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(198,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(199,20): error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(200,28): error TS2339: Property 'hasFlag' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(200,38): error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(200,113): error TS2339: Property 'ModuleFlags' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(205,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(206,20): error TS2305: Module 'TypeScript' has no exported member 'Script'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(211,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(212,20): error TS2305: Module 'TypeScript' has no exported member 'SwitchStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(217,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(218,20): error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(223,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(224,20): error TS2305: Module 'TypeScript' has no exported member 'ClassDeclaration'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(229,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(230,20): error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(235,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(236,20): error TS2305: Module 'TypeScript' has no exported member 'InterfaceDeclaration'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(241,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(242,19): error TS2305: Module 'TypeScript' has no exported member 'Block'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(247,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(248,19): error TS2305: Module 'TypeScript' has no exported member 'ForStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(253,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(254,19): error TS2305: Module 'TypeScript' has no exported member 'CaseStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(259,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(260,19): error TS2305: Module 'TypeScript' has no exported member 'Try'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(265,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(266,19): error TS2305: Module 'TypeScript' has no exported member 'Catch'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(271,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(272,19): error TS2305: Module 'TypeScript' has no exported member 'DoWhileStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(277,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(278,19): error TS2305: Module 'TypeScript' has no exported member 'WhileStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(283,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(284,19): error TS2305: Module 'TypeScript' has no exported member 'ForInStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(289,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(290,19): error TS2305: Module 'TypeScript' has no exported member 'WithStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(295,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(296,19): error TS2305: Module 'TypeScript' has no exported member 'Finally'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(301,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(302,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(303,19): error TS2305: Module 'TypeScript' has no exported member 'SwitchStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(308,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(309,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(310,19): error TS2305: Module 'TypeScript' has no exported member 'SwitchStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(311,19): error TS2305: Module 'TypeScript' has no exported member 'SwitchStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(316,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(317,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(318,19): error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(327,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(328,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(329,19): error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(330,19): error TS2305: Module 'TypeScript' has no exported member 'ASTList'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(335,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(336,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(337,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(338,19): error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(343,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(344,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(345,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(346,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(347,19): error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(352,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(353,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(354,19): error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(359,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(360,19): error TS2305: Module 'TypeScript' has no exported member 'BinaryExpression'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(365,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(366,19): error TS2305: Module 'TypeScript' has no exported member 'BinaryExpression'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(371,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(377,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(378,19): error TS2305: Module 'TypeScript' has no exported member 'IfStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(383,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(384,19): error TS2305: Module 'TypeScript' has no exported member 'IfStatement'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(393,61): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(394,19): error TS2305: Module 'TypeScript' has no exported member 'ASTList'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(399,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(400,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(401,19): error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(406,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(407,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(408,19): error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(413,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(414,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(415,19): error TS2305: Module 'TypeScript' has no exported member 'CallExpression'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(420,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(421,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(422,19): error TS2305: Module 'TypeScript' has no exported member 'CallExpression'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(427,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(428,19): error TS2305: Module 'TypeScript' has no exported member 'Block'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(432,41): error TS2305: Module 'TypeScript' has no exported member 'ASTSpan'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(462,50): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(463,41): error TS2305: Module 'TypeScript' has no exported member 'Comment'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(478,34): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(478,58): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(478,82): error TS2304: Cannot find name 'IAstWalker'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(489,21): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(490,49): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(516,22): error TS2304: Cannot find name 'hasFlag'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(525,20): error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(533,51): error TS2305: Module 'TypeScript' has no exported member 'Script'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(535,25): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(535,49): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(535,73): error TS2305: Module 'TypeScript' has no exported member 'IAstWalker'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(535,97): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(551,20): error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(558,34): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(558,84): error TS2305: Module 'TypeScript' has no exported member 'IAstWalker'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(559,34): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(559,58): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(559,82): error TS2305: Module 'TypeScript' has no exported member 'IAstWalker'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(565,35): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(565,59): error TS2305: Module 'TypeScript' has no exported member 'AST'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(565,83): error TS2305: Module 'TypeScript' has no exported member 'IAstWalker'.
tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts(572,20): error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'.
==== tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts (160 errors) ====
// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0.
// See LICENSE.txt in the project root for complete license information.
///
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS6053: File 'typescript.ts' not found.
module TypeScript {
export function lastOf(items: any[]): any {
return (items === null || items.length === 0) ? null : items[items.length - 1];
}
export function max(a: number, b: number): number {
return a >= b ? a : b;
}
export function min(a: number, b: number): number {
return a <= b ? a : b;
}
//
// Helper class representing a path from a root ast node to a (grand)child ast node.
// This is helpful as our tree don't have parents.
//
export class AstPath {
public asts: TypeScript.AST[] = [];
~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
public top: number = -1;
static reverseIndexOf(items: any[], index: number): any {
return (items === null || items.length <= index) ? null : items[items.length - index - 1];
}
public clone(): AstPath {
var clone = new AstPath();
clone.asts = this.asts.map((value) => { return value; });
clone.top = this.top;
return clone;
}
public pop(): TypeScript.AST {
~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
var head = this.ast();
this.up();
while (this.asts.length > this.count()) {
this.asts.pop();
}
return head;
}
public push(ast: TypeScript.AST) {
~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
while (this.asts.length > this.count()) {
this.asts.pop();
}
this.top = this.asts.length;
this.asts.push(ast);
}
public up() {
if (this.top <= -1)
throw new Error("Invalid call to 'up'");
this.top--;
}
public down() {
if (this.top == this.ast.length - 1)
throw new Error("Invalid call to 'down'");
this.top++;
}
public nodeType(): TypeScript.NodeType {
~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'NodeType'.
if (this.ast() == null)
return TypeScript.NodeType.None;
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
return this.ast().nodeType;
}
public ast() {
return AstPath.reverseIndexOf(this.asts, this.asts.length - (this.top + 1));
~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
}
public parent() {
return AstPath.reverseIndexOf(this.asts, this.asts.length - this.top);
~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
}
public count() {
return this.top + 1;
}
public get(index: number): TypeScript.AST {
~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
return this.asts[index];
}
public isNameOfClass(): boolean {
if (this.ast() === null || this.parent() === null)
return false;
return (this.ast().nodeType === TypeScript.NodeType.Name) &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.parent().nodeType === TypeScript.NodeType.ClassDeclaration) &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
((this.parent()).name === this.ast());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'InterfaceDeclaration'.
}
public isNameOfInterface(): boolean {
if (this.ast() === null || this.parent() === null)
return false;
return (this.ast().nodeType === TypeScript.NodeType.Name) &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.parent().nodeType === TypeScript.NodeType.InterfaceDeclaration) &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
((this.parent()).name === this.ast());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'InterfaceDeclaration'.
}
public isNameOfArgument(): boolean {
if (this.ast() === null || this.parent() === null)
return false;
return (this.ast().nodeType === TypeScript.NodeType.Name) &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.parent().nodeType === TypeScript.NodeType.ArgDecl) &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
((this.parent()).id === this.ast());
~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'ArgDecl'.
}
public isNameOfVariable(): boolean {
if (this.ast() === null || this.parent() === null)
return false;
return (this.ast().nodeType === TypeScript.NodeType.Name) &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.parent().nodeType === TypeScript.NodeType.VarDecl) &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
((this.parent()).id === this.ast());
~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'VarDecl'.
}
public isNameOfModule(): boolean {
if (this.ast() === null || this.parent() === null)
return false;
return (this.ast().nodeType === TypeScript.NodeType.Name) &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.parent().nodeType === TypeScript.NodeType.ModuleDeclaration) &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
((this.parent()).name === this.ast());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'.
}
public isNameOfFunction(): boolean {
if (this.ast() === null || this.parent() === null)
return false;
return (this.ast().nodeType === TypeScript.NodeType.Name) &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.parent().nodeType === TypeScript.NodeType.FuncDecl) &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
((this.parent()).name === this.ast());
~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'.
}
public isChildOfScript(): boolean {
var ast = lastOf(this.asts);
return this.count() >= 3 &&
this.asts[this.top] === ast &&
this.asts[this.top - 1].nodeType === TypeScript.NodeType.List &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
this.asts[this.top - 2].nodeType === TypeScript.NodeType.Script;
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
}
public isChildOfModule(): boolean {
var ast = lastOf(this.asts);
return this.count() >= 3 &&
this.asts[this.top] === ast &&
this.asts[this.top - 1].nodeType === TypeScript.NodeType.List &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
this.asts[this.top - 2].nodeType === TypeScript.NodeType.ModuleDeclaration;
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
}
public isChildOfClass(): boolean {
var ast = lastOf(this.asts);
return this.count() >= 3 &&
this.asts[this.top] === ast &&
this.asts[this.top - 1].nodeType === TypeScript.NodeType.List &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
this.asts[this.top - 2].nodeType === TypeScript.NodeType.ClassDeclaration;
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
}
public isArgumentOfClassConstructor(): boolean {
var ast = lastOf(this.asts);
return this.count() >= 5 &&
this.asts[this.top] === ast &&
this.asts[this.top - 1].nodeType === TypeScript.NodeType.List &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
this.asts[this.top - 3].nodeType === TypeScript.NodeType.List &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
this.asts[this.top - 4].nodeType === TypeScript.NodeType.ClassDeclaration &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
((this.asts[this.top - 2]).isConstructor) &&
~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'.
((this.asts[this.top - 2]).arguments === this.asts[this.top - 1]) &&
~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'.
((this.asts[this.top - 4]).constructorDecl === this.asts[this.top - 2]);
~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'ClassDeclaration'.
}
public isChildOfInterface(): boolean {
var ast = lastOf(this.asts);
return this.count() >= 3 &&
this.asts[this.top] === ast &&
this.asts[this.top - 1].nodeType === TypeScript.NodeType.List &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
this.asts[this.top - 2].nodeType === TypeScript.NodeType.InterfaceDeclaration;
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
}
public isTopLevelImplicitModule() {
return this.count() >= 1 &&
this.asts[this.top].nodeType === TypeScript.NodeType.ModuleDeclaration &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
TypeScript.hasFlag((this.asts[this.top]).modFlags, TypeScript.ModuleFlags.IsWholeFile);
~~~~~~~
!!! error TS2339: Property 'hasFlag' does not exist on type 'typeof TypeScript'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'.
~~~~~~~~~~~
!!! error TS2339: Property 'ModuleFlags' does not exist on type 'typeof TypeScript'.
}
public isBodyOfTopLevelImplicitModule() {
return this.count() >= 2 &&
this.asts[this.top - 0].nodeType === TypeScript.NodeType.List &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 1]).members == this.asts[this.top - 0] &&
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'.
TypeScript.hasFlag((this.asts[this.top - 1]).modFlags, TypeScript.ModuleFlags.IsWholeFile);
~~~~~~~
!!! error TS2339: Property 'hasFlag' does not exist on type 'typeof TypeScript'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'.
~~~~~~~~~~~
!!! error TS2339: Property 'ModuleFlags' does not exist on type 'typeof TypeScript'.
}
public isBodyOfScript(): boolean {
return this.count() >= 2 &&
this.asts[this.top - 1].nodeType === TypeScript.NodeType.Script &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 1]).bod == this.asts[this.top - 0];
~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'Script'.
}
public isBodyOfSwitch(): boolean {
return this.count() >= 2 &&
this.asts[this.top - 1].nodeType === TypeScript.NodeType.Switch &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 1]).caseList == this.asts[this.top - 0];
~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'SwitchStatement'.
}
public isBodyOfModule(): boolean {
return this.count() >= 2 &&
this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 1]).members == this.asts[this.top - 0];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'ModuleDeclaration'.
}
public isBodyOfClass(): boolean {
return this.count() >= 2 &&
this.asts[this.top - 1].nodeType === TypeScript.NodeType.ClassDeclaration &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 1]).members == this.asts[this.top - 0];
~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'ClassDeclaration'.
}
public isBodyOfFunction(): boolean {
return this.count() >= 2 &&
this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 1]).bod == this.asts[this.top - 0];
~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'.
}
public isBodyOfInterface(): boolean {
return this.count() >= 2 &&
this.asts[this.top - 1].nodeType === TypeScript.NodeType.InterfaceDeclaration &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 1]).members == this.asts[this.top - 0];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'InterfaceDeclaration'.
}
public isBodyOfBlock(): boolean {
return this.count() >= 2 &&
this.asts[this.top - 1].nodeType === TypeScript.NodeType.Block &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 1]).statements == this.asts[this.top - 0];
~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'Block'.
}
public isBodyOfFor(): boolean {
return this.count() >= 2 &&
this.asts[this.top - 1].nodeType === TypeScript.NodeType.For &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 1]).body == this.asts[this.top - 0];
~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'ForStatement'.
}
public isBodyOfCase(): boolean {
return this.count() >= 2 &&
this.asts[this.top - 1].nodeType === TypeScript.NodeType.Case &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 1]).body == this.asts[this.top - 0];
~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'CaseStatement'.
}
public isBodyOfTry(): boolean {
return this.count() >= 2 &&
this.asts[this.top - 1].nodeType === TypeScript.NodeType.Try &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 1]).body == this.asts[this.top - 0];
~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'Try'.
}
public isBodyOfCatch(): boolean {
return this.count() >= 2 &&
this.asts[this.top - 1].nodeType === TypeScript.NodeType.Catch &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 1]).body == this.asts[this.top - 0];
~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'Catch'.
}
public isBodyOfDoWhile(): boolean {
return this.count() >= 2 &&
this.asts[this.top - 1].nodeType === TypeScript.NodeType.DoWhile &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 1]).body == this.asts[this.top - 0];
~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'DoWhileStatement'.
}
public isBodyOfWhile(): boolean {
return this.count() >= 2 &&
this.asts[this.top - 1].nodeType === TypeScript.NodeType.While &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 1]).body == this.asts[this.top - 0];
~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'WhileStatement'.
}
public isBodyOfForIn(): boolean {
return this.count() >= 2 &&
this.asts[this.top - 1].nodeType === TypeScript.NodeType.ForIn &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 1]).body == this.asts[this.top - 0];
~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'ForInStatement'.
}
public isBodyOfWith(): boolean {
return this.count() >= 2 &&
this.asts[this.top - 1].nodeType === TypeScript.NodeType.With &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 1]).body == this.asts[this.top - 0];
~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'WithStatement'.
}
public isBodyOfFinally(): boolean {
return this.count() >= 2 &&
this.asts[this.top - 1].nodeType === TypeScript.NodeType.Finally &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 1]).body == this.asts[this.top - 0];
~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'Finally'.
}
public isCaseOfSwitch(): boolean {
return this.count() >= 3 &&
this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
this.asts[this.top - 1].nodeType === TypeScript.NodeType.List &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 2]).caseList == this.asts[this.top - 1];
~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'SwitchStatement'.
}
public isDefaultCaseOfSwitch(): boolean {
return this.count() >= 3 &&
this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
this.asts[this.top - 1].nodeType === TypeScript.NodeType.List &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 2]).caseList == this.asts[this.top - 1] &&
~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'SwitchStatement'.
(this.asts[this.top - 2]).defaultCase == this.asts[this.top - 0];
~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'SwitchStatement'.
}
public isListOfObjectLit(): boolean {
return this.count() >= 2 &&
this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
this.asts[this.top - 0].nodeType === TypeScript.NodeType.List &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 1]).operand == this.asts[this.top - 0];
~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'.
}
public isBodyOfObjectLit(): boolean {
return this.isListOfObjectLit();
}
public isEmptyListOfObjectLit(): boolean {
return this.count() >= 2 &&
this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
this.asts[this.top - 0].nodeType === TypeScript.NodeType.List &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 1]).operand == this.asts[this.top - 0] &&
~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'.
(this.asts[this.top - 0]).members.length == 0;
~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'ASTList'.
}
public isMemberOfObjectLit(): boolean {
return this.count() >= 3 &&
this.asts[this.top - 2].nodeType === TypeScript.NodeType.ObjectLit &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
this.asts[this.top - 1].nodeType === TypeScript.NodeType.List &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
this.asts[this.top - 0].nodeType === TypeScript.NodeType.Member &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 2]).operand == this.asts[this.top - 1];
~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'.
}
public isNameOfMemberOfObjectLit(): boolean {
return this.count() >= 4 &&
this.asts[this.top - 3].nodeType === TypeScript.NodeType.ObjectLit &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
this.asts[this.top - 2].nodeType === TypeScript.NodeType.List &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
this.asts[this.top - 0].nodeType === TypeScript.NodeType.Name &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 3]).operand == this.asts[this.top - 2];
~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'.
}
public isListOfArrayLit(): boolean {
return this.count() >= 2 &&
this.asts[this.top - 1].nodeType === TypeScript.NodeType.ArrayLit &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
this.asts[this.top - 0].nodeType === TypeScript.NodeType.List &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 1]).operand == this.asts[this.top - 0];
~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'UnaryExpression'.
}
public isTargetOfMember(): boolean {
return this.count() >= 2 &&
this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 1]).operand1 === this.asts[this.top - 0];
~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'BinaryExpression'.
}
public isMemberOfMember(): boolean {
return this.count() >= 2 &&
this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 1]).operand2 === this.asts[this.top - 0];
~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'BinaryExpression'.
}
public isItemOfList(): boolean {
return this.count() >= 2 &&
this.asts[this.top - 1].nodeType === TypeScript.NodeType.List;
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
//(this.asts[this.top - 1]).operand2 === this.asts[this.top - 0];
}
public isThenOfIf(): boolean {
return this.count() >= 2 &&
this.asts[this.top - 1].nodeType === TypeScript.NodeType.If &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 1]).thenBod == this.asts[this.top - 0];
~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'IfStatement'.
}
public isElseOfIf(): boolean {
return this.count() >= 2 &&
this.asts[this.top - 1].nodeType === TypeScript.NodeType.If &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 1]).elseBod == this.asts[this.top - 0];
~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'IfStatement'.
}
public isBodyOfDefaultCase(): boolean {
return this.isBodyOfCase();
}
public isSingleStatementList(): boolean {
return this.count() >= 1 &&
this.asts[this.top].nodeType === TypeScript.NodeType.List &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top]).members.length === 1;
~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'ASTList'.
}
public isArgumentListOfFunction(): boolean {
return this.count() >= 2 &&
this.asts[this.top - 0].nodeType === TypeScript.NodeType.List &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 1]).arguments === this.asts[this.top - 0];
~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'.
}
public isArgumentOfFunction(): boolean {
return this.count() >= 3 &&
this.asts[this.top - 1].nodeType === TypeScript.NodeType.List &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 2]).arguments === this.asts[this.top - 1];
~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'FuncDecl'.
}
public isArgumentListOfCall(): boolean {
return this.count() >= 2 &&
this.asts[this.top - 0].nodeType === TypeScript.NodeType.List &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
this.asts[this.top - 1].nodeType === TypeScript.NodeType.Call &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 1]).arguments === this.asts[this.top - 0];
~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'CallExpression'.
}
public isArgumentListOfNew(): boolean {
return this.count() >= 2 &&
this.asts[this.top - 0].nodeType === TypeScript.NodeType.List &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
this.asts[this.top - 1].nodeType === TypeScript.NodeType.New &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 1]).arguments === this.asts[this.top - 0];
~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'CallExpression'.
}
public isSynthesizedBlock(): boolean {
return this.count() >= 1 &&
this.asts[this.top - 0].nodeType === TypeScript.NodeType.Block &&
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
(this.asts[this.top - 0]).isStatementBlock === false;
~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'Block'.
}
}
export function isValidAstNode(ast: TypeScript.ASTSpan): boolean {
~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'ASTSpan'.
if (ast === null)
return false;
if (ast.minChar === -1 || ast.limChar === -1)
return false;
return true;
}
export class AstPathContext {
public path = new TypeScript.AstPath();
}
export enum GetAstPathOptions {
Default = 0,
EdgeInclusive = 1,
//We need this options dealing with an AST coming from an incomplete AST. For example:
// class foo { // r
// If we ask for the AST at the position after the "r" character, we won't see we are
// inside a comment, because the "class" AST node has a limChar corresponding to the position of
// the "{" character, meaning we don't traverse the tree down to the stmt list of the class, meaning
// we don't find the "precomment" attached to the errorneous empty stmt.
//TODO: It would be nice to be able to get rid of this.
DontPruneSearchBasedOnPosition = 1 << 1,
}
///
/// Return the stack of AST nodes containing "position"
///
export function getAstPathToPosition(script: TypeScript.AST, pos: number, options = GetAstPathOptions.Default): TypeScript.AstPath {
~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
var lookInComments = (comments: TypeScript.Comment[]) => {
~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'Comment'.
if (comments && comments.length > 0) {
for (var i = 0; i < comments.length; i++) {
var minChar = comments[i].minChar;
var limChar = comments[i].limChar;
if (!comments[i].isBlockComment) {
limChar++; // For single line comments, include 1 more character (for the newline)
}
if (pos >= minChar && pos < limChar) {
ctx.path.push(comments[i]);
}
}
}
}
var pre = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: IAstWalker) {
~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
~~~~~~~~~~
!!! error TS2304: Cannot find name 'IAstWalker'.
if (isValidAstNode(cur)) {
// Add "cur" to the stack if it contains our position
// For "identifier" nodes, we need a special case: A position equal to "limChar" is
// valid, since the position corresponds to a caret position (in between characters)
// For example:
// bar
// 0123
// If "position == 3", the caret is at the "right" of the "r" character, which should be considered valid
var inclusive =
hasFlag(options, GetAstPathOptions.EdgeInclusive) ||
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
cur.nodeType === TypeScript.NodeType.Name ||
~~~~~~~~
!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'.
pos === script.limChar; // Special "EOF" case
var minChar = cur.minChar;
var limChar = cur.limChar + (inclusive ? 1 : 0)
if (pos >= minChar && pos < limChar) {
// TODO: Since AST is sometimes not correct wrt to position, only add "cur" if it's better
// than top of the stack.
var previous = ctx.path.ast();
if (previous == null || (cur.minChar >= previous.minChar && cur.limChar <= previous.limChar)) {
ctx.path.push(cur);
}
else {
//logger.log("TODO: Ignoring node because minChar, limChar not better than previous node in stack");
}
}
// The AST walker skips comments, but we might be in one, so check the pre/post comments for this node manually
if (pos < limChar) {
lookInComments(cur.preComments);
}
if (pos >= minChar) {
lookInComments(cur.postComments);
}
if (!hasFlag(options, GetAstPathOptions.DontPruneSearchBasedOnPosition)) {
~~~~~~~
!!! error TS2304: Cannot find name 'hasFlag'.
// Don't go further down the tree if pos is outside of [minChar, limChar]
walker.options.goChildren = (minChar <= pos && pos <= limChar);
}
}
return cur;
}
var ctx = new AstPathContext();
TypeScript.getAstWalkerFactory().walk(script, pre, null, null, ctx);
~~~~~~~~~~~~~~~~~~~
!!! error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'.
return ctx.path;
}
//
// Find a source text offset that is safe for lexing tokens at the given position.
// This is used when "position" might be inside a comment or string, etc.
//
export function getTokenizationOffset(script: TypeScript.Script, position: number): number {
~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'Script'.
var bestOffset = 0;
var pre = (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker): TypeScript.AST => {
~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'IAstWalker'.
~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
if (TypeScript.isValidAstNode(cur)) {
// Did we find a closer offset?
if (cur.minChar <= position) {
bestOffset = max(bestOffset, cur.minChar);
}
// Stop the walk if this node is not related to "minChar"
if (cur.minChar > position || cur.limChar < bestOffset) {
walker.options.goChildren = false;
}
}
return cur;
}
TypeScript.getAstWalkerFactory().walk(script, pre);
~~~~~~~~~~~~~~~~~~~
!!! error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'.
return bestOffset;
}
///
/// Simple function to Walk an AST using a simple callback function.
///
export function walkAST(ast: TypeScript.AST, callback: (path: AstPath, walker: TypeScript.IAstWalker) => void ): void {
~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'IAstWalker'.
var pre = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker) {
~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'IAstWalker'.
var path: TypeScript.AstPath = walker.state;
path.push(cur);
callback(path, walker);
return cur;
}
var post = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker) {
~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'AST'.
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2305: Module 'TypeScript' has no exported member 'IAstWalker'.
var path: TypeScript.AstPath = walker.state;
path.pop();
return cur;
}
var path = new AstPath();
TypeScript.getAstWalkerFactory().walk(ast, pre, post, null, path);
~~~~~~~~~~~~~~~~~~~
!!! error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'.
}
}