text: var __extends = (this && this.__extends) || (function () {
      var extendStatics = Object.setPrototypeOf ||
          function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
      return function (d, b) {
          extendStatics(d, b);
          function __() { this.constructor = d; }
          d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
  })();
  var ts;
  (function (ts) {
      // token > SyntaxKind.Identifer => token is a keyword
      // Also, If you add a new SyntaxKind be sure to keep the `Markers` section at the bottom in sync
      var SyntaxKind;
      (function (SyntaxKind) {
          SyntaxKind[SyntaxKind["Unknown"] = 0] = "Unknown";
          SyntaxKind[SyntaxKind["EndOfFileToken"] = 1] = "EndOfFileToken";
          SyntaxKind[SyntaxKind["SingleLineCommentTrivia"] = 2] = "SingleLineCommentTrivia";
          SyntaxKind[SyntaxKind["MultiLineCommentTrivia"] = 3] = "MultiLineCommentTrivia";
          SyntaxKind[SyntaxKind["NewLineTrivia"] = 4] = "NewLineTrivia";
          SyntaxKind[SyntaxKind["WhitespaceTrivia"] = 5] = "WhitespaceTrivia";
          // We detect and preserve #! on the first line
          SyntaxKind[SyntaxKind["ShebangTrivia"] = 6] = "ShebangTrivia";
          // We detect and provide better error recovery when we encounter a git merge marker.  This
          // allows us to edit files with git-conflict markers in them in a much more pleasant manner.
          SyntaxKind[SyntaxKind["ConflictMarkerTrivia"] = 7] = "ConflictMarkerTrivia";
          // Literals
          SyntaxKind[SyntaxKind["NumericLiteral"] = 8] = "NumericLiteral";
          SyntaxKind[SyntaxKind["StringLiteral"] = 9] = "StringLiteral";
          SyntaxKind[SyntaxKind["JsxText"] = 10] = "JsxText";
          SyntaxKind[SyntaxKind["RegularExpressionLiteral"] = 11] = "RegularExpressionLiteral";
          SyntaxKind[SyntaxKind["NoSubstitutionTemplateLiteral"] = 12] = "NoSubstitutionTemplateLiteral";
          // Pseudo-literals
          SyntaxKind[SyntaxKind["TemplateHead"] = 13] = "TemplateHead";
          SyntaxKind[SyntaxKind["TemplateMiddle"] = 14] = "TemplateMiddle";
          SyntaxKind[SyntaxKind["TemplateTail"] = 15] = "TemplateTail";
          // Punctuation
          SyntaxKind[SyntaxKind["OpenBraceToken"] = 16] = "OpenBraceToken";
          SyntaxKind[SyntaxKind["CloseBraceToken"] = 17] = "CloseBraceToken";
          SyntaxKind[SyntaxKind["OpenParenToken"] = 18] = "OpenParenToken";
          SyntaxKind[SyntaxKind["CloseParenToken"] = 19] = "CloseParenToken";
          SyntaxKind[SyntaxKind["OpenBracketToken"] = 20] = "OpenBracketToken";
          SyntaxKind[SyntaxKind["CloseBracketToken"] = 21] = "CloseBracketToken";
          SyntaxKind[SyntaxKind["DotToken"] = 22] = "DotToken";
          SyntaxKind[SyntaxKind["DotDotDotToken"] = 23] = "DotDotDotToken";
          SyntaxKind[SyntaxKind["SemicolonToken"] = 24] = "SemicolonToken";
          SyntaxKind[SyntaxKind["CommaToken"] = 25] = "CommaToken";
          SyntaxKind[SyntaxKind["LessThanToken"] = 26] = "LessThanToken";
          SyntaxKind[SyntaxKind["LessThanSlashToken"] = 27] = "LessThanSlashToken";
          SyntaxKind[SyntaxKind["GreaterThanToken"] = 28] = "GreaterThanToken";
          SyntaxKind[SyntaxKind["LessThanEqualsToken"] = 29] = "LessThanEqualsToken";
          SyntaxKind[SyntaxKind["GreaterThanEqualsToken"] = 30] = "GreaterThanEqualsToken";
          SyntaxKind[SyntaxKind["EqualsEqualsToken"] = 31] = "EqualsEqualsToken";
          SyntaxKind[SyntaxKind["ExclamationEqualsToken"] = 32] = "ExclamationEqualsToken";
          SyntaxKind[SyntaxKind["EqualsEqualsEqualsToken"] = 33] = "EqualsEqualsEqualsToken";
          SyntaxKind[SyntaxKind["ExclamationEqualsEqualsToken"] = 34] = "ExclamationEqualsEqualsToken";
          SyntaxKind[SyntaxKind["EqualsGreaterThanToken"] = 35] = "EqualsGreaterThanToken";
          SyntaxKind[SyntaxKind["PlusToken"] = 36] = "PlusToken";
          SyntaxKind[SyntaxKind["MinusToken"] = 37] = "MinusToken";
          SyntaxKind[SyntaxKind["AsteriskToken"] = 38] = "AsteriskToken";
          SyntaxKind[SyntaxKind["AsteriskAsteriskToken"] = 39] = "AsteriskAsteriskToken";
          SyntaxKind[SyntaxKind["SlashToken"] = 40] = "SlashToken";
          SyntaxKind[SyntaxKind["PercentToken"] = 41] = "PercentToken";
          SyntaxKind[SyntaxKind["PlusPlusToken"] = 42] = "PlusPlusToken";
          SyntaxKind[SyntaxKind["MinusMinusToken"] = 43] = "MinusMinusToken";
          SyntaxKind[SyntaxKind["LessThanLessThanToken"] = 44] = "LessThanLessThanToken";
          SyntaxKind[SyntaxKind["GreaterThanGreaterThanToken"] = 45] = "GreaterThanGreaterThanToken";
          SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanToken"] = 46] = "GreaterThanGreaterThanGreaterThanToken";
          SyntaxKind[SyntaxKind["AmpersandToken"] = 47] = "AmpersandToken";
          SyntaxKind[SyntaxKind["BarToken"] = 48] = "BarToken";
          SyntaxKind[SyntaxKind["CaretToken"] = 49] = "CaretToken";
          SyntaxKind[SyntaxKind["ExclamationToken"] = 50] = "ExclamationToken";
          SyntaxKind[SyntaxKind["TildeToken"] = 51] = "TildeToken";
          SyntaxKind[SyntaxKind["AmpersandAmpersandToken"] = 52] = "AmpersandAmpersandToken";
          SyntaxKind[SyntaxKind["BarBarToken"] = 53] = "BarBarToken";
          SyntaxKind[SyntaxKind["QuestionToken"] = 54] = "QuestionToken";
          SyntaxKind[SyntaxKind["ColonToken"] = 55] = "ColonToken";
          SyntaxKind[SyntaxKind["AtToken"] = 56] = "AtToken";
          // Assignments
          SyntaxKind[SyntaxKind["EqualsToken"] = 57] = "EqualsToken";
          SyntaxKind[SyntaxKind["PlusEqualsToken"] = 58] = "PlusEqualsToken";
          SyntaxKind[SyntaxKind["MinusEqualsToken"] = 59] = "MinusEqualsToken";
          SyntaxKind[SyntaxKind["AsteriskEqualsToken"] = 60] = "AsteriskEqualsToken";
          SyntaxKind[SyntaxKind["AsteriskAsteriskEqualsToken"] = 61] = "AsteriskAsteriskEqualsToken";
          SyntaxKind[SyntaxKind["SlashEqualsToken"] = 62] = "SlashEqualsToken";
          SyntaxKind[SyntaxKind["PercentEqualsToken"] = 63] = "PercentEqualsToken";
          SyntaxKind[SyntaxKind["LessThanLessThanEqualsToken"] = 64] = "LessThanLessThanEqualsToken";
          SyntaxKind[SyntaxKind["GreaterThanGreaterThanEqualsToken"] = 65] = "GreaterThanGreaterThanEqualsToken";
          SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanEqualsToken"] = 66] = "GreaterThanGreaterThanGreaterThanEqualsToken";
          SyntaxKind[SyntaxKind["AmpersandEqualsToken"] = 67] = "AmpersandEqualsToken";
          SyntaxKind[SyntaxKind["BarEqualsToken"] = 68] = "BarEqualsToken";
          SyntaxKind[SyntaxKind["CaretEqualsToken"] = 69] = "CaretEqualsToken";
          // Identifiers
          SyntaxKind[SyntaxKind["Identifier"] = 70] = "Identifier";
          // Reserved words
          SyntaxKind[SyntaxKind["BreakKeyword"] = 71] = "BreakKeyword";
          SyntaxKind[SyntaxKind["CaseKeyword"] = 72] = "CaseKeyword";
          SyntaxKind[SyntaxKind["CatchKeyword"] = 73] = "CatchKeyword";
          SyntaxKind[SyntaxKind["ClassKeyword"] = 74] = "ClassKeyword";
          SyntaxKind[SyntaxKind["ConstKeyword"] = 75] = "ConstKeyword";
          SyntaxKind[SyntaxKind["ContinueKeyword"] = 76] = "ContinueKeyword";
          SyntaxKind[SyntaxKind["DebuggerKeyword"] = 77] = "DebuggerKeyword";
          SyntaxKind[SyntaxKind["DefaultKeyword"] = 78] = "DefaultKeyword";
          SyntaxKind[SyntaxKind["DeleteKeyword"] = 79] = "DeleteKeyword";
          SyntaxKind[SyntaxKind["DoKeyword"] = 80] = "DoKeyword";
          SyntaxKind[SyntaxKind["ElseKeyword"] = 81] = "ElseKeyword";
          SyntaxKind[SyntaxKind["EnumKeyword"] = 82] = "EnumKeyword";
          SyntaxKind[SyntaxKind["ExportKeyword"] = 83] = "ExportKeyword";
          SyntaxKind[SyntaxKind["ExtendsKeyword"] = 84] = "ExtendsKeyword";
          SyntaxKind[SyntaxKind["FalseKeyword"] = 85] = "FalseKeyword";
          SyntaxKind[SyntaxKind["FinallyKeyword"] = 86] = "FinallyKeyword";
          SyntaxKind[SyntaxKind["ForKeyword"] = 87] = "ForKeyword";
          SyntaxKind[SyntaxKind["FunctionKeyword"] = 88] = "FunctionKeyword";
          SyntaxKind[SyntaxKind["IfKeyword"] = 89] = "IfKeyword";
          SyntaxKind[SyntaxKind["ImportKeyword"] = 90] = "ImportKeyword";
          SyntaxKind[SyntaxKind["InKeyword"] = 91] = "InKeyword";
          SyntaxKind[SyntaxKind["InstanceOfKeyword"] = 92] = "InstanceOfKeyword";
          SyntaxKind[SyntaxKind["NewKeyword"] = 93] = "NewKeyword";
          SyntaxKind[SyntaxKind["NullKeyword"] = 94] = "NullKeyword";
          SyntaxKind[SyntaxKind["ReturnKeyword"] = 95] = "ReturnKeyword";
          SyntaxKind[SyntaxKind["SuperKeyword"] = 96] = "SuperKeyword";
          SyntaxKind[SyntaxKind["SwitchKeyword"] = 97] = "SwitchKeyword";
          SyntaxKind[SyntaxKind["ThisKeyword"] = 98] = "ThisKeyword";
          SyntaxKind[SyntaxKind["ThrowKeyword"] = 99] = "ThrowKeyword";
          SyntaxKind[SyntaxKind["TrueKeyword"] = 100] = "TrueKeyword";
          SyntaxKind[SyntaxKind["TryKeyword"] = 101] = "TryKeyword";
          SyntaxKind[SyntaxKind["TypeOfKeyword"] = 102] = "TypeOfKeyword";
          SyntaxKind[SyntaxKind["VarKeyword"] = 103] = "VarKeyword";
          SyntaxKind[SyntaxKind["VoidKeyword"] = 104] = "VoidKeyword";
          SyntaxKind[SyntaxKind["WhileKeyword"] = 105] = "WhileKeyword";
          SyntaxKind[SyntaxKind["WithKeyword"] = 106] = "WithKeyword";
          // Strict mode reserved words
          SyntaxKind[SyntaxKind["ImplementsKeyword"] = 107] = "ImplementsKeyword";
          SyntaxKind[SyntaxKind["InterfaceKeyword"] = 108] = "InterfaceKeyword";
          SyntaxKind[SyntaxKind["LetKeyword"] = 109] = "LetKeyword";
          SyntaxKind[SyntaxKind["PackageKeyword"] = 110] = "PackageKeyword";
          SyntaxKind[SyntaxKind["PrivateKeyword"] = 111] = "PrivateKeyword";
          SyntaxKind[SyntaxKind["ProtectedKeyword"] = 112] = "ProtectedKeyword";
          SyntaxKind[SyntaxKind["PublicKeyword"] = 113] = "PublicKeyword";
          SyntaxKind[SyntaxKind["StaticKeyword"] = 114] = "StaticKeyword";
          SyntaxKind[SyntaxKind["YieldKeyword"] = 115] = "YieldKeyword";
          // Contextual keywords
          SyntaxKind[SyntaxKind["AbstractKeyword"] = 116] = "AbstractKeyword";
          SyntaxKind[SyntaxKind["AsKeyword"] = 117] = "AsKeyword";
          SyntaxKind[SyntaxKind["AnyKeyword"] = 118] = "AnyKeyword";
          SyntaxKind[SyntaxKind["AsyncKeyword"] = 119] = "AsyncKeyword";
          SyntaxKind[SyntaxKind["AwaitKeyword"] = 120] = "AwaitKeyword";
          SyntaxKind[SyntaxKind["BooleanKeyword"] = 121] = "BooleanKeyword";
          SyntaxKind[SyntaxKind["ConstructorKeyword"] = 122] = "ConstructorKeyword";
          SyntaxKind[SyntaxKind["DeclareKeyword"] = 123] = "DeclareKeyword";
          SyntaxKind[SyntaxKind["GetKeyword"] = 124] = "GetKeyword";
          SyntaxKind[SyntaxKind["IsKeyword"] = 125] = "IsKeyword";
          SyntaxKind[SyntaxKind["KeyOfKeyword"] = 126] = "KeyOfKeyword";
          SyntaxKind[SyntaxKind["ModuleKeyword"] = 127] = "ModuleKeyword";
          SyntaxKind[SyntaxKind["NamespaceKeyword"] = 128] = "NamespaceKeyword";
          SyntaxKind[SyntaxKind["NeverKeyword"] = 129] = "NeverKeyword";
          SyntaxKind[SyntaxKind["ReadonlyKeyword"] = 130] = "ReadonlyKeyword";
          SyntaxKind[SyntaxKind["RequireKeyword"] = 131] = "RequireKeyword";
          SyntaxKind[SyntaxKind["NumberKeyword"] = 132] = "NumberKeyword";
          SyntaxKind[SyntaxKind["ObjectKeyword"] = 133] = "ObjectKeyword";
          SyntaxKind[SyntaxKind["SetKeyword"] = 134] = "SetKeyword";
          SyntaxKind[SyntaxKind["StringKeyword"] = 135] = "StringKeyword";
          SyntaxKind[SyntaxKind["SymbolKeyword"] = 136] = "SymbolKeyword";
          SyntaxKind[SyntaxKind["TypeKeyword"] = 137] = "TypeKeyword";
          SyntaxKind[SyntaxKind["UndefinedKeyword"] = 138] = "UndefinedKeyword";
          SyntaxKind[SyntaxKind["FromKeyword"] = 139] = "FromKeyword";
          SyntaxKind[SyntaxKind["GlobalKeyword"] = 140] = "GlobalKeyword";
          SyntaxKind[SyntaxKind["OfKeyword"] = 141] = "OfKeyword";
          // Parse tree nodes
          // Names
          SyntaxKind[SyntaxKind["QualifiedName"] = 142] = "QualifiedName";
          SyntaxKind[SyntaxKind["ComputedPropertyName"] = 143] = "ComputedPropertyName";
          // Signature elements
          SyntaxKind[SyntaxKind["TypeParameter"] = 144] = "TypeParameter";
          SyntaxKind[SyntaxKind["Parameter"] = 145] = "Parameter";
          SyntaxKind[SyntaxKind["Decorator"] = 146] = "Decorator";
          // TypeMember
          SyntaxKind[SyntaxKind["PropertySignature"] = 147] = "PropertySignature";
          SyntaxKind[SyntaxKind["PropertyDeclaration"] = 148] = "PropertyDeclaration";
          SyntaxKind[SyntaxKind["MethodSignature"] = 149] = "MethodSignature";
          SyntaxKind[SyntaxKind["MethodDeclaration"] = 150] = "MethodDeclaration";
          SyntaxKind[SyntaxKind["Constructor"] = 151] = "Constructor";
          SyntaxKind[SyntaxKind["GetAccessor"] = 152] = "GetAccessor";
          SyntaxKind[SyntaxKind["SetAccessor"] = 153] = "SetAccessor";
          SyntaxKind[SyntaxKind["CallSignature"] = 154] = "CallSignature";
          SyntaxKind[SyntaxKind["ConstructSignature"] = 155] = "ConstructSignature";
          SyntaxKind[SyntaxKind["IndexSignature"] = 156] = "IndexSignature";
          // Type
          SyntaxKind[SyntaxKind["TypePredicate"] = 157] = "TypePredicate";
          SyntaxKind[SyntaxKind["TypeReference"] = 158] = "TypeReference";
          SyntaxKind[SyntaxKind["FunctionType"] = 159] = "FunctionType";
          SyntaxKind[SyntaxKind["ConstructorType"] = 160] = "ConstructorType";
          SyntaxKind[SyntaxKind["TypeQuery"] = 161] = "TypeQuery";
          SyntaxKind[SyntaxKind["TypeLiteral"] = 162] = "TypeLiteral";
          SyntaxKind[SyntaxKind["ArrayType"] = 163] = "ArrayType";
          SyntaxKind[SyntaxKind["TupleType"] = 164] = "TupleType";
          SyntaxKind[SyntaxKind["UnionType"] = 165] = "UnionType";
          SyntaxKind[SyntaxKind["IntersectionType"] = 166] = "IntersectionType";
          SyntaxKind[SyntaxKind["ParenthesizedType"] = 167] = "ParenthesizedType";
          SyntaxKind[SyntaxKind["ThisType"] = 168] = "ThisType";
          SyntaxKind[SyntaxKind["TypeOperator"] = 169] = "TypeOperator";
          SyntaxKind[SyntaxKind["IndexedAccessType"] = 170] = "IndexedAccessType";
          SyntaxKind[SyntaxKind["MappedType"] = 171] = "MappedType";
          SyntaxKind[SyntaxKind["LiteralType"] = 172] = "LiteralType";
          // Binding patterns
          SyntaxKind[SyntaxKind["ObjectBindingPattern"] = 173] = "ObjectBindingPattern";
          SyntaxKind[SyntaxKind["ArrayBindingPattern"] = 174] = "ArrayBindingPattern";
          SyntaxKind[SyntaxKind["BindingElement"] = 175] = "BindingElement";
          // Expression
          SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 176] = "ArrayLiteralExpression";
          SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 177] = "ObjectLiteralExpression";
          SyntaxKind[SyntaxKind["PropertyAccessExpression"] = 178] = "PropertyAccessExpression";
          SyntaxKind[SyntaxKind["ElementAccessExpression"] = 179] = "ElementAccessExpression";
          SyntaxKind[SyntaxKind["CallExpression"] = 180] = "CallExpression";
          SyntaxKind[SyntaxKind["NewExpression"] = 181] = "NewExpression";
          SyntaxKind[SyntaxKind["TaggedTemplateExpression"] = 182] = "TaggedTemplateExpression";
          SyntaxKind[SyntaxKind["TypeAssertionExpression"] = 183] = "TypeAssertionExpression";
          SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 184] = "ParenthesizedExpression";
          SyntaxKind[SyntaxKind["FunctionExpression"] = 185] = "FunctionExpression";
          SyntaxKind[SyntaxKind["ArrowFunction"] = 186] = "ArrowFunction";
          SyntaxKind[SyntaxKind["DeleteExpression"] = 187] = "DeleteExpression";
          SyntaxKind[SyntaxKind["TypeOfExpression"] = 188] = "TypeOfExpression";
          SyntaxKind[SyntaxKind["VoidExpression"] = 189] = "VoidExpression";
          SyntaxKind[SyntaxKind["AwaitExpression"] = 190] = "AwaitExpression";
          SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 191] = "PrefixUnaryExpression";
          SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 192] = "PostfixUnaryExpression";
          SyntaxKind[SyntaxKind["BinaryExpression"] = 193] = "BinaryExpression";
          SyntaxKind[SyntaxKind["ConditionalExpression"] = 194] = "ConditionalExpression";
          SyntaxKind[SyntaxKind["TemplateExpression"] = 195] = "TemplateExpression";
          SyntaxKind[SyntaxKind["YieldExpression"] = 196] = "YieldExpression";
          SyntaxKind[SyntaxKind["SpreadElement"] = 197] = "SpreadElement";
          SyntaxKind[SyntaxKind["ClassExpression"] = 198] = "ClassExpression";
          SyntaxKind[SyntaxKind["OmittedExpression"] = 199] = "OmittedExpression";
          SyntaxKind[SyntaxKind["ExpressionWithTypeArguments"] = 200] = "ExpressionWithTypeArguments";
          SyntaxKind[SyntaxKind["AsExpression"] = 201] = "AsExpression";
          SyntaxKind[SyntaxKind["NonNullExpression"] = 202] = "NonNullExpression";
          SyntaxKind[SyntaxKind["MetaProperty"] = 203] = "MetaProperty";
          // Misc
          SyntaxKind[SyntaxKind["TemplateSpan"] = 204] = "TemplateSpan";
          SyntaxKind[SyntaxKind["SemicolonClassElement"] = 205] = "SemicolonClassElement";
          // Element
          SyntaxKind[SyntaxKind["Block"] = 206] = "Block";
          SyntaxKind[SyntaxKind["VariableStatement"] = 207] = "VariableStatement";
          SyntaxKind[SyntaxKind["EmptyStatement"] = 208] = "EmptyStatement";
          SyntaxKind[SyntaxKind["ExpressionStatement"] = 209] = "ExpressionStatement";
          SyntaxKind[SyntaxKind["IfStatement"] = 210] = "IfStatement";
          SyntaxKind[SyntaxKind["DoStatement"] = 211] = "DoStatement";
          SyntaxKind[SyntaxKind["WhileStatement"] = 212] = "WhileStatement";
          SyntaxKind[SyntaxKind["ForStatement"] = 213] = "ForStatement";
          SyntaxKind[SyntaxKind["ForInStatement"] = 214] = "ForInStatement";
          SyntaxKind[SyntaxKind["ForOfStatement"] = 215] = "ForOfStatement";
          SyntaxKind[SyntaxKind["ContinueStatement"] = 216] = "ContinueStatement";
          SyntaxKind[SyntaxKind["BreakStatement"] = 217] = "BreakStatement";
          SyntaxKind[SyntaxKind["ReturnStatement"] = 218] = "ReturnStatement";
          SyntaxKind[SyntaxKind["WithStatement"] = 219] = "WithStatement";
          SyntaxKind[SyntaxKind["SwitchStatement"] = 220] = "SwitchStatement";
          SyntaxKind[SyntaxKind["LabeledStatement"] = 221] = "LabeledStatement";
          SyntaxKind[SyntaxKind["ThrowStatement"] = 222] = "ThrowStatement";
          SyntaxKind[SyntaxKind["TryStatement"] = 223] = "TryStatement";
          SyntaxKind[SyntaxKind["DebuggerStatement"] = 224] = "DebuggerStatement";
          SyntaxKind[SyntaxKind["VariableDeclaration"] = 225] = "VariableDeclaration";
          SyntaxKind[SyntaxKind["VariableDeclarationList"] = 226] = "VariableDeclarationList";
          SyntaxKind[SyntaxKind["FunctionDeclaration"] = 227] = "FunctionDeclaration";
          SyntaxKind[SyntaxKind["ClassDeclaration"] = 228] = "ClassDeclaration";
          SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 229] = "InterfaceDeclaration";
          SyntaxKind[SyntaxKind["TypeAliasDeclaration"] = 230] = "TypeAliasDeclaration";
          SyntaxKind[SyntaxKind["EnumDeclaration"] = 231] = "EnumDeclaration";
          SyntaxKind[SyntaxKind["ModuleDeclaration"] = 232] = "ModuleDeclaration";
          SyntaxKind[SyntaxKind["ModuleBlock"] = 233] = "ModuleBlock";
          SyntaxKind[SyntaxKind["CaseBlock"] = 234] = "CaseBlock";
          SyntaxKind[SyntaxKind["NamespaceExportDeclaration"] = 235] = "NamespaceExportDeclaration";
          SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 236] = "ImportEqualsDeclaration";
          SyntaxKind[SyntaxKind["ImportDeclaration"] = 237] = "ImportDeclaration";
          SyntaxKind[SyntaxKind["ImportClause"] = 238] = "ImportClause";
          SyntaxKind[SyntaxKind["NamespaceImport"] = 239] = "NamespaceImport";
          SyntaxKind[SyntaxKind["NamedImports"] = 240] = "NamedImports";
          SyntaxKind[SyntaxKind["ImportSpecifier"] = 241] = "ImportSpecifier";
          SyntaxKind[SyntaxKind["ExportAssignment"] = 242] = "ExportAssignment";
          SyntaxKind[SyntaxKind["ExportDeclaration"] = 243] = "ExportDeclaration";
          SyntaxKind[SyntaxKind["NamedExports"] = 244] = "NamedExports";
          SyntaxKind[SyntaxKind["ExportSpecifier"] = 245] = "ExportSpecifier";
          SyntaxKind[SyntaxKind["MissingDeclaration"] = 246] = "MissingDeclaration";
          // Module references
          SyntaxKind[SyntaxKind["ExternalModuleReference"] = 247] = "ExternalModuleReference";
          // JSX
          SyntaxKind[SyntaxKind["JsxElement"] = 248] = "JsxElement";
          SyntaxKind[SyntaxKind["JsxSelfClosingElement"] = 249] = "JsxSelfClosingElement";
          SyntaxKind[SyntaxKind["JsxOpeningElement"] = 250] = "JsxOpeningElement";
          SyntaxKind[SyntaxKind["JsxClosingElement"] = 251] = "JsxClosingElement";
          SyntaxKind[SyntaxKind["JsxAttribute"] = 252] = "JsxAttribute";
          SyntaxKind[SyntaxKind["JsxSpreadAttribute"] = 253] = "JsxSpreadAttribute";
          SyntaxKind[SyntaxKind["JsxExpression"] = 254] = "JsxExpression";
          // Clauses
          SyntaxKind[SyntaxKind["CaseClause"] = 255] = "CaseClause";
          SyntaxKind[SyntaxKind["DefaultClause"] = 256] = "DefaultClause";
          SyntaxKind[SyntaxKind["HeritageClause"] = 257] = "HeritageClause";
          SyntaxKind[SyntaxKind["CatchClause"] = 258] = "CatchClause";
          // Property assignments
          SyntaxKind[SyntaxKind["PropertyAssignment"] = 259] = "PropertyAssignment";
          SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 260] = "ShorthandPropertyAssignment";
          SyntaxKind[SyntaxKind["SpreadAssignment"] = 261] = "SpreadAssignment";
          // Enum
          SyntaxKind[SyntaxKind["EnumMember"] = 262] = "EnumMember";
          // Top-level nodes
          SyntaxKind[SyntaxKind["SourceFile"] = 263] = "SourceFile";
          SyntaxKind[SyntaxKind["Bundle"] = 264] = "Bundle";
          // JSDoc nodes
          SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 265] = "JSDocTypeExpression";
          // The * type
          SyntaxKind[SyntaxKind["JSDocAllType"] = 266] = "JSDocAllType";
          // The ? type
          SyntaxKind[SyntaxKind["JSDocUnknownType"] = 267] = "JSDocUnknownType";
          SyntaxKind[SyntaxKind["JSDocArrayType"] = 268] = "JSDocArrayType";
          SyntaxKind[SyntaxKind["JSDocUnionType"] = 269] = "JSDocUnionType";
          SyntaxKind[SyntaxKind["JSDocTupleType"] = 270] = "JSDocTupleType";
          SyntaxKind[SyntaxKind["JSDocNullableType"] = 271] = "JSDocNullableType";
          SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 272] = "JSDocNonNullableType";
          SyntaxKind[SyntaxKind["JSDocRecordType"] = 273] = "JSDocRecordType";
          SyntaxKind[SyntaxKind["JSDocRecordMember"] = 274] = "JSDocRecordMember";
          SyntaxKind[SyntaxKind["JSDocTypeReference"] = 275] = "JSDocTypeReference";
          SyntaxKind[SyntaxKind["JSDocOptionalType"] = 276] = "JSDocOptionalType";
          SyntaxKind[SyntaxKind["JSDocFunctionType"] = 277] = "JSDocFunctionType";
          SyntaxKind[SyntaxKind["JSDocVariadicType"] = 278] = "JSDocVariadicType";
          SyntaxKind[SyntaxKind["JSDocConstructorType"] = 279] = "JSDocConstructorType";
          SyntaxKind[SyntaxKind["JSDocThisType"] = 280] = "JSDocThisType";
          SyntaxKind[SyntaxKind["JSDocComment"] = 281] = "JSDocComment";
          SyntaxKind[SyntaxKind["JSDocTag"] = 282] = "JSDocTag";
          SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 283] = "JSDocAugmentsTag";
          SyntaxKind[SyntaxKind["JSDocParameterTag"] = 284] = "JSDocParameterTag";
          SyntaxKind[SyntaxKind["JSDocReturnTag"] = 285] = "JSDocReturnTag";
          SyntaxKind[SyntaxKind["JSDocTypeTag"] = 286] = "JSDocTypeTag";
          SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 287] = "JSDocTemplateTag";
          SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 288] = "JSDocTypedefTag";
          SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 289] = "JSDocPropertyTag";
          SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 290] = "JSDocTypeLiteral";
          SyntaxKind[SyntaxKind["JSDocLiteralType"] = 291] = "JSDocLiteralType";
          SyntaxKind[SyntaxKind["JSDocNullKeyword"] = 292] = "JSDocNullKeyword";
          SyntaxKind[SyntaxKind["JSDocUndefinedKeyword"] = 293] = "JSDocUndefinedKeyword";
          SyntaxKind[SyntaxKind["JSDocNeverKeyword"] = 294] = "JSDocNeverKeyword";
          // Synthesized list
          SyntaxKind[SyntaxKind["SyntaxList"] = 295] = "SyntaxList";
          // Transformation nodes
          SyntaxKind[SyntaxKind["NotEmittedStatement"] = 296] = "NotEmittedStatement";
          SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 297] = "PartiallyEmittedExpression";
          SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 298] = "MergeDeclarationMarker";
          SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 299] = "EndOfDeclarationMarker";
          // Enum value count
          SyntaxKind[SyntaxKind["Count"] = 300] = "Count";
          // Markers
          SyntaxKind[SyntaxKind["FirstAssignment"] = 57] = "FirstAssignment";
          SyntaxKind[SyntaxKind["LastAssignment"] = 69] = "LastAssignment";
          SyntaxKind[SyntaxKind["FirstCompoundAssignment"] = 58] = "FirstCompoundAssignment";
          SyntaxKind[SyntaxKind["LastCompoundAssignment"] = 69] = "LastCompoundAssignment";
          SyntaxKind[SyntaxKind["FirstReservedWord"] = 71] = "FirstReservedWord";
          SyntaxKind[SyntaxKind["LastReservedWord"] = 106] = "LastReservedWord";
          SyntaxKind[SyntaxKind["FirstKeyword"] = 71] = "FirstKeyword";
          SyntaxKind[SyntaxKind["LastKeyword"] = 141] = "LastKeyword";
          SyntaxKind[SyntaxKind["FirstFutureReservedWord"] = 107] = "FirstFutureReservedWord";
          SyntaxKind[SyntaxKind["LastFutureReservedWord"] = 115] = "LastFutureReservedWord";
          SyntaxKind[SyntaxKind["FirstTypeNode"] = 157] = "FirstTypeNode";
          SyntaxKind[SyntaxKind["LastTypeNode"] = 172] = "LastTypeNode";
          SyntaxKind[SyntaxKind["FirstPunctuation"] = 16] = "FirstPunctuation";
          SyntaxKind[SyntaxKind["LastPunctuation"] = 69] = "LastPunctuation";
          SyntaxKind[SyntaxKind["FirstToken"] = 0] = "FirstToken";
          SyntaxKind[SyntaxKind["LastToken"] = 141] = "LastToken";
          SyntaxKind[SyntaxKind["FirstTriviaToken"] = 2] = "FirstTriviaToken";
          SyntaxKind[SyntaxKind["LastTriviaToken"] = 7] = "LastTriviaToken";
          SyntaxKind[SyntaxKind["FirstLiteralToken"] = 8] = "FirstLiteralToken";
          SyntaxKind[SyntaxKind["LastLiteralToken"] = 12] = "LastLiteralToken";
          SyntaxKind[SyntaxKind["FirstTemplateToken"] = 12] = "FirstTemplateToken";
          SyntaxKind[SyntaxKind["LastTemplateToken"] = 15] = "LastTemplateToken";
          SyntaxKind[SyntaxKind["FirstBinaryOperator"] = 26] = "FirstBinaryOperator";
          SyntaxKind[SyntaxKind["LastBinaryOperator"] = 69] = "LastBinaryOperator";
          SyntaxKind[SyntaxKind["FirstNode"] = 142] = "FirstNode";
          SyntaxKind[SyntaxKind["FirstJSDocNode"] = 265] = "FirstJSDocNode";
          SyntaxKind[SyntaxKind["LastJSDocNode"] = 294] = "LastJSDocNode";
          SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 281] = "FirstJSDocTagNode";
          SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 294] = "LastJSDocTagNode";
      })(SyntaxKind = ts.SyntaxKind || (ts.SyntaxKind = {}));
      var NodeFlags;
      (function (NodeFlags) {
          NodeFlags[NodeFlags["None"] = 0] = "None";
          NodeFlags[NodeFlags["Let"] = 1] = "Let";
          NodeFlags[NodeFlags["Const"] = 2] = "Const";
          NodeFlags[NodeFlags["NestedNamespace"] = 4] = "NestedNamespace";
          NodeFlags[NodeFlags["Synthesized"] = 8] = "Synthesized";
          NodeFlags[NodeFlags["Namespace"] = 16] = "Namespace";
          NodeFlags[NodeFlags["ExportContext"] = 32] = "ExportContext";
          NodeFlags[NodeFlags["ContainsThis"] = 64] = "ContainsThis";
          NodeFlags[NodeFlags["HasImplicitReturn"] = 128] = "HasImplicitReturn";
          NodeFlags[NodeFlags["HasExplicitReturn"] = 256] = "HasExplicitReturn";
          NodeFlags[NodeFlags["GlobalAugmentation"] = 512] = "GlobalAugmentation";
          NodeFlags[NodeFlags["HasAsyncFunctions"] = 1024] = "HasAsyncFunctions";
          NodeFlags[NodeFlags["DisallowInContext"] = 2048] = "DisallowInContext";
          NodeFlags[NodeFlags["YieldContext"] = 4096] = "YieldContext";
          NodeFlags[NodeFlags["DecoratorContext"] = 8192] = "DecoratorContext";
          NodeFlags[NodeFlags["AwaitContext"] = 16384] = "AwaitContext";
          NodeFlags[NodeFlags["ThisNodeHasError"] = 32768] = "ThisNodeHasError";
          NodeFlags[NodeFlags["JavaScriptFile"] = 65536] = "JavaScriptFile";
          NodeFlags[NodeFlags["ThisNodeOrAnySubNodesHasError"] = 131072] = "ThisNodeOrAnySubNodesHasError";
          NodeFlags[NodeFlags["HasAggregatedChildData"] = 262144] = "HasAggregatedChildData";
          NodeFlags[NodeFlags["BlockScoped"] = 3] = "BlockScoped";
          NodeFlags[NodeFlags["ReachabilityCheckFlags"] = 384] = "ReachabilityCheckFlags";
          NodeFlags[NodeFlags["ReachabilityAndEmitFlags"] = 1408] = "ReachabilityAndEmitFlags";
          // Parsing context flags
          NodeFlags[NodeFlags["ContextFlags"] = 96256] = "ContextFlags";
          // Exclude these flags when parsing a Type
          NodeFlags[NodeFlags["TypeExcludesFlags"] = 20480] = "TypeExcludesFlags";
      })(NodeFlags = ts.NodeFlags || (ts.NodeFlags = {}));
      var ModifierFlags;
      (function (ModifierFlags) {
          ModifierFlags[ModifierFlags["None"] = 0] = "None";
          ModifierFlags[ModifierFlags["Export"] = 1] = "Export";
          ModifierFlags[ModifierFlags["Ambient"] = 2] = "Ambient";
          ModifierFlags[ModifierFlags["Public"] = 4] = "Public";
          ModifierFlags[ModifierFlags["Private"] = 8] = "Private";
          ModifierFlags[ModifierFlags["Protected"] = 16] = "Protected";
          ModifierFlags[ModifierFlags["Static"] = 32] = "Static";
          ModifierFlags[ModifierFlags["Readonly"] = 64] = "Readonly";
          ModifierFlags[ModifierFlags["Abstract"] = 128] = "Abstract";
          ModifierFlags[ModifierFlags["Async"] = 256] = "Async";
          ModifierFlags[ModifierFlags["Default"] = 512] = "Default";
          ModifierFlags[ModifierFlags["Const"] = 2048] = "Const";
          ModifierFlags[ModifierFlags["HasComputedFlags"] = 536870912] = "HasComputedFlags";
          ModifierFlags[ModifierFlags["AccessibilityModifier"] = 28] = "AccessibilityModifier";
          // Accessibility modifiers and 'readonly' can be attached to a parameter in a constructor to make it a property.
          ModifierFlags[ModifierFlags["ParameterPropertyModifier"] = 92] = "ParameterPropertyModifier";
          ModifierFlags[ModifierFlags["NonPublicAccessibilityModifier"] = 24] = "NonPublicAccessibilityModifier";
          ModifierFlags[ModifierFlags["TypeScriptModifier"] = 2270] = "TypeScriptModifier";
          ModifierFlags[ModifierFlags["ExportDefault"] = 513] = "ExportDefault";
      })(ModifierFlags = ts.ModifierFlags || (ts.ModifierFlags = {}));
      var JsxFlags;
      (function (JsxFlags) {
          JsxFlags[JsxFlags["None"] = 0] = "None";
          /** An element from a named property of the JSX.IntrinsicElements interface */
          JsxFlags[JsxFlags["IntrinsicNamedElement"] = 1] = "IntrinsicNamedElement";
          /** An element inferred from the string index signature of the JSX.IntrinsicElements interface */
          JsxFlags[JsxFlags["IntrinsicIndexedElement"] = 2] = "IntrinsicIndexedElement";
          JsxFlags[JsxFlags["IntrinsicElement"] = 3] = "IntrinsicElement";
      })(JsxFlags = ts.JsxFlags || (ts.JsxFlags = {}));
      /* @internal */
      var RelationComparisonResult;
      (function (RelationComparisonResult) {
          RelationComparisonResult[RelationComparisonResult["Succeeded"] = 1] = "Succeeded";
          RelationComparisonResult[RelationComparisonResult["Failed"] = 2] = "Failed";
          RelationComparisonResult[RelationComparisonResult["FailedAndReported"] = 3] = "FailedAndReported";
      })(RelationComparisonResult = ts.RelationComparisonResult || (ts.RelationComparisonResult = {}));
      /*@internal*/
      var GeneratedIdentifierKind;
      (function (GeneratedIdentifierKind) {
          GeneratedIdentifierKind[GeneratedIdentifierKind["None"] = 0] = "None";
          GeneratedIdentifierKind[GeneratedIdentifierKind["Auto"] = 1] = "Auto";
          GeneratedIdentifierKind[GeneratedIdentifierKind["Loop"] = 2] = "Loop";
          GeneratedIdentifierKind[GeneratedIdentifierKind["Unique"] = 3] = "Unique";
          GeneratedIdentifierKind[GeneratedIdentifierKind["Node"] = 4] = "Node";
      })(GeneratedIdentifierKind = ts.GeneratedIdentifierKind || (ts.GeneratedIdentifierKind = {}));
      var FlowFlags;
      (function (FlowFlags) {
          FlowFlags[FlowFlags["Unreachable"] = 1] = "Unreachable";
          FlowFlags[FlowFlags["Start"] = 2] = "Start";
          FlowFlags[FlowFlags["BranchLabel"] = 4] = "BranchLabel";
          FlowFlags[FlowFlags["LoopLabel"] = 8] = "LoopLabel";
          FlowFlags[FlowFlags["Assignment"] = 16] = "Assignment";
          FlowFlags[FlowFlags["TrueCondition"] = 32] = "TrueCondition";
          FlowFlags[FlowFlags["FalseCondition"] = 64] = "FalseCondition";
          FlowFlags[FlowFlags["SwitchClause"] = 128] = "SwitchClause";
          FlowFlags[FlowFlags["ArrayMutation"] = 256] = "ArrayMutation";
          FlowFlags[FlowFlags["Referenced"] = 512] = "Referenced";
          FlowFlags[FlowFlags["Shared"] = 1024] = "Shared";
          FlowFlags[FlowFlags["PreFinally"] = 2048] = "PreFinally";
          FlowFlags[FlowFlags["AfterFinally"] = 4096] = "AfterFinally";
          FlowFlags[FlowFlags["Label"] = 12] = "Label";
          FlowFlags[FlowFlags["Condition"] = 96] = "Condition";
      })(FlowFlags = ts.FlowFlags || (ts.FlowFlags = {}));
      var OperationCanceledException = (function () {
          function OperationCanceledException() {
          }
          return OperationCanceledException;
      }());
      ts.OperationCanceledException = OperationCanceledException;
      /** Return code used by getEmitOutput function to indicate status of the function */
      var ExitStatus;
      (function (ExitStatus) {
          // Compiler ran successfully.  Either this was a simple do-nothing compilation (for example,
          // when -version or -help was provided, or this was a normal compilation, no diagnostics
          // were produced, and all outputs were generated successfully.
          ExitStatus[ExitStatus["Success"] = 0] = "Success";
          // Diagnostics were produced and because of them no code was generated.
          ExitStatus[ExitStatus["DiagnosticsPresent_OutputsSkipped"] = 1] = "DiagnosticsPresent_OutputsSkipped";
          // Diagnostics were produced and outputs were generated in spite of them.
          ExitStatus[ExitStatus["DiagnosticsPresent_OutputsGenerated"] = 2] = "DiagnosticsPresent_OutputsGenerated";
      })(ExitStatus = ts.ExitStatus || (ts.ExitStatus = {}));
      var TypeFormatFlags;
      (function (TypeFormatFlags) {
          TypeFormatFlags[TypeFormatFlags["None"] = 0] = "None";
          TypeFormatFlags[TypeFormatFlags["WriteArrayAsGenericType"] = 1] = "WriteArrayAsGenericType";
          TypeFormatFlags[TypeFormatFlags["UseTypeOfFunction"] = 2] = "UseTypeOfFunction";
          TypeFormatFlags[TypeFormatFlags["NoTruncation"] = 4] = "NoTruncation";
          TypeFormatFlags[TypeFormatFlags["WriteArrowStyleSignature"] = 8] = "WriteArrowStyleSignature";
          TypeFormatFlags[TypeFormatFlags["WriteOwnNameForAnyLike"] = 16] = "WriteOwnNameForAnyLike";
          TypeFormatFlags[TypeFormatFlags["WriteTypeArgumentsOfSignature"] = 32] = "WriteTypeArgumentsOfSignature";
          TypeFormatFlags[TypeFormatFlags["InElementType"] = 64] = "InElementType";
          TypeFormatFlags[TypeFormatFlags["UseFullyQualifiedType"] = 128] = "UseFullyQualifiedType";
          TypeFormatFlags[TypeFormatFlags["InFirstTypeArgument"] = 256] = "InFirstTypeArgument";
          TypeFormatFlags[TypeFormatFlags["InTypeAlias"] = 512] = "InTypeAlias";
          TypeFormatFlags[TypeFormatFlags["UseTypeAliasValue"] = 1024] = "UseTypeAliasValue";
          TypeFormatFlags[TypeFormatFlags["SuppressAnyReturnType"] = 2048] = "SuppressAnyReturnType";
          TypeFormatFlags[TypeFormatFlags["AddUndefined"] = 4096] = "AddUndefined";
      })(TypeFormatFlags = ts.TypeFormatFlags || (ts.TypeFormatFlags = {}));
      var SymbolFormatFlags;
      (function (SymbolFormatFlags) {
          SymbolFormatFlags[SymbolFormatFlags["None"] = 0] = "None";
          // Write symbols's type argument if it is instantiated symbol
          // eg. class C<T> { p: T }   <-- Show p as C<T>.p here
          //     var a: C<number>;
          //     var p = a.p;  <--- Here p is property of C<number> so show it as C<number>.p instead of just C.p
          SymbolFormatFlags[SymbolFormatFlags["WriteTypeParametersOrArguments"] = 1] = "WriteTypeParametersOrArguments";
          // Use only external alias information to get the symbol name in the given context
          // eg.  module m { export class c { } } import x = m.c;
          // When this flag is specified m.c will be used to refer to the class instead of alias symbol x
          SymbolFormatFlags[SymbolFormatFlags["UseOnlyExternalAliasing"] = 2] = "UseOnlyExternalAliasing";
      })(SymbolFormatFlags = ts.SymbolFormatFlags || (ts.SymbolFormatFlags = {}));
      /* @internal */
      var SymbolAccessibility;
      (function (SymbolAccessibility) {
          SymbolAccessibility[SymbolAccessibility["Accessible"] = 0] = "Accessible";
          SymbolAccessibility[SymbolAccessibility["NotAccessible"] = 1] = "NotAccessible";
          SymbolAccessibility[SymbolAccessibility["CannotBeNamed"] = 2] = "CannotBeNamed";
      })(SymbolAccessibility = ts.SymbolAccessibility || (ts.SymbolAccessibility = {}));
      /* @internal */
      var SyntheticSymbolKind;
      (function (SyntheticSymbolKind) {
          SyntheticSymbolKind[SyntheticSymbolKind["UnionOrIntersection"] = 0] = "UnionOrIntersection";
          SyntheticSymbolKind[SyntheticSymbolKind["Spread"] = 1] = "Spread";
      })(SyntheticSymbolKind = ts.SyntheticSymbolKind || (ts.SyntheticSymbolKind = {}));
      var TypePredicateKind;
      (function (TypePredicateKind) {
          TypePredicateKind[TypePredicateKind["This"] = 0] = "This";
          TypePredicateKind[TypePredicateKind["Identifier"] = 1] = "Identifier";
      })(TypePredicateKind = ts.TypePredicateKind || (ts.TypePredicateKind = {}));
      /** Indicates how to serialize the name for a TypeReferenceNode when emitting decorator
        * metadata */
      /* @internal */
      var TypeReferenceSerializationKind;
      (function (TypeReferenceSerializationKind) {
          TypeReferenceSerializationKind[TypeReferenceSerializationKind["Unknown"] = 0] = "Unknown";
          // should be emitted using a safe fallback.
          TypeReferenceSerializationKind[TypeReferenceSerializationKind["TypeWithConstructSignatureAndValue"] = 1] = "TypeWithConstructSignatureAndValue";
          // function that can be reached at runtime (e.g. a `class`
          // declaration or a `var` declaration for the static side
          // of a type, such as the global `Promise` type in lib.d.ts).
          TypeReferenceSerializationKind[TypeReferenceSerializationKind["VoidNullableOrNeverType"] = 2] = "VoidNullableOrNeverType";
          TypeReferenceSerializationKind[TypeReferenceSerializationKind["NumberLikeType"] = 3] = "NumberLikeType";
          TypeReferenceSerializationKind[TypeReferenceSerializationKind["StringLikeType"] = 4] = "StringLikeType";
          TypeReferenceSerializationKind[TypeReferenceSerializationKind["BooleanType"] = 5] = "BooleanType";
          TypeReferenceSerializationKind[TypeReferenceSerializationKind["ArrayLikeType"] = 6] = "ArrayLikeType";
          TypeReferenceSerializationKind[TypeReferenceSerializationKind["ESSymbolType"] = 7] = "ESSymbolType";
          TypeReferenceSerializationKind[TypeReferenceSerializationKind["Promise"] = 8] = "Promise";
          TypeReferenceSerializationKind[TypeReferenceSerializationKind["TypeWithCallSignature"] = 9] = "TypeWithCallSignature";
          // with call signatures.
          TypeReferenceSerializationKind[TypeReferenceSerializationKind["ObjectType"] = 10] = "ObjectType";
      })(TypeReferenceSerializationKind = ts.TypeReferenceSerializationKind || (ts.TypeReferenceSerializationKind = {}));
      var SymbolFlags;
      (function (SymbolFlags) {
          SymbolFlags[SymbolFlags["None"] = 0] = "None";
          SymbolFlags[SymbolFlags["FunctionScopedVariable"] = 1] = "FunctionScopedVariable";
          SymbolFlags[SymbolFlags["BlockScopedVariable"] = 2] = "BlockScopedVariable";
          SymbolFlags[SymbolFlags["Property"] = 4] = "Property";
          SymbolFlags[SymbolFlags["EnumMember"] = 8] = "EnumMember";
          SymbolFlags[SymbolFlags["Function"] = 16] = "Function";
          SymbolFlags[SymbolFlags["Class"] = 32] = "Class";
          SymbolFlags[SymbolFlags["Interface"] = 64] = "Interface";
          SymbolFlags[SymbolFlags["ConstEnum"] = 128] = "ConstEnum";
          SymbolFlags[SymbolFlags["RegularEnum"] = 256] = "RegularEnum";
          SymbolFlags[SymbolFlags["ValueModule"] = 512] = "ValueModule";
          SymbolFlags[SymbolFlags["NamespaceModule"] = 1024] = "NamespaceModule";
          SymbolFlags[SymbolFlags["TypeLiteral"] = 2048] = "TypeLiteral";
          SymbolFlags[SymbolFlags["ObjectLiteral"] = 4096] = "ObjectLiteral";
          SymbolFlags[SymbolFlags["Method"] = 8192] = "Method";
          SymbolFlags[SymbolFlags["Constructor"] = 16384] = "Constructor";
          SymbolFlags[SymbolFlags["GetAccessor"] = 32768] = "GetAccessor";
          SymbolFlags[SymbolFlags["SetAccessor"] = 65536] = "SetAccessor";
          SymbolFlags[SymbolFlags["Signature"] = 131072] = "Signature";
          SymbolFlags[SymbolFlags["TypeParameter"] = 262144] = "TypeParameter";
          SymbolFlags[SymbolFlags["TypeAlias"] = 524288] = "TypeAlias";
          SymbolFlags[SymbolFlags["ExportValue"] = 1048576] = "ExportValue";
          SymbolFlags[SymbolFlags["ExportType"] = 2097152] = "ExportType";
          SymbolFlags[SymbolFlags["ExportNamespace"] = 4194304] = "ExportNamespace";
          SymbolFlags[SymbolFlags["Alias"] = 8388608] = "Alias";
          SymbolFlags[SymbolFlags["Prototype"] = 16777216] = "Prototype";
          SymbolFlags[SymbolFlags["ExportStar"] = 33554432] = "ExportStar";
          SymbolFlags[SymbolFlags["Optional"] = 67108864] = "Optional";
          SymbolFlags[SymbolFlags["Transient"] = 134217728] = "Transient";
          SymbolFlags[SymbolFlags["Enum"] = 384] = "Enum";
          SymbolFlags[SymbolFlags["Variable"] = 3] = "Variable";
          SymbolFlags[SymbolFlags["Value"] = 107455] = "Value";
          SymbolFlags[SymbolFlags["Type"] = 793064] = "Type";
          SymbolFlags[SymbolFlags["Namespace"] = 1920] = "Namespace";
          SymbolFlags[SymbolFlags["Module"] = 1536] = "Module";
          SymbolFlags[SymbolFlags["Accessor"] = 98304] = "Accessor";
          // Variables can be redeclared, but can not redeclare a block-scoped declaration with the
          // same name, or any other value that is not a variable, e.g. ValueModule or Class
          SymbolFlags[SymbolFlags["FunctionScopedVariableExcludes"] = 107454] = "FunctionScopedVariableExcludes";
          // Block-scoped declarations are not allowed to be re-declared
          // they can not merge with anything in the value space
          SymbolFlags[SymbolFlags["BlockScopedVariableExcludes"] = 107455] = "BlockScopedVariableExcludes";
          SymbolFlags[SymbolFlags["ParameterExcludes"] = 107455] = "ParameterExcludes";
          SymbolFlags[SymbolFlags["PropertyExcludes"] = 0] = "PropertyExcludes";
          SymbolFlags[SymbolFlags["EnumMemberExcludes"] = 900095] = "EnumMemberExcludes";
          SymbolFlags[SymbolFlags["FunctionExcludes"] = 106927] = "FunctionExcludes";
          SymbolFlags[SymbolFlags["ClassExcludes"] = 899519] = "ClassExcludes";
          SymbolFlags[SymbolFlags["InterfaceExcludes"] = 792968] = "InterfaceExcludes";
          SymbolFlags[SymbolFlags["RegularEnumExcludes"] = 899327] = "RegularEnumExcludes";
          SymbolFlags[SymbolFlags["ConstEnumExcludes"] = 899967] = "ConstEnumExcludes";
          SymbolFlags[SymbolFlags["ValueModuleExcludes"] = 106639] = "ValueModuleExcludes";
          SymbolFlags[SymbolFlags["NamespaceModuleExcludes"] = 0] = "NamespaceModuleExcludes";
          SymbolFlags[SymbolFlags["MethodExcludes"] = 99263] = "MethodExcludes";
          SymbolFlags[SymbolFlags["GetAccessorExcludes"] = 41919] = "GetAccessorExcludes";
          SymbolFlags[SymbolFlags["SetAccessorExcludes"] = 74687] = "SetAccessorExcludes";
          SymbolFlags[SymbolFlags["TypeParameterExcludes"] = 530920] = "TypeParameterExcludes";
          SymbolFlags[SymbolFlags["TypeAliasExcludes"] = 793064] = "TypeAliasExcludes";
          SymbolFlags[SymbolFlags["AliasExcludes"] = 8388608] = "AliasExcludes";
          SymbolFlags[SymbolFlags["ModuleMember"] = 8914931] = "ModuleMember";
          SymbolFlags[SymbolFlags["ExportHasLocal"] = 944] = "ExportHasLocal";
          SymbolFlags[SymbolFlags["HasExports"] = 1952] = "HasExports";
          SymbolFlags[SymbolFlags["HasMembers"] = 6240] = "HasMembers";
          SymbolFlags[SymbolFlags["BlockScoped"] = 418] = "BlockScoped";
          SymbolFlags[SymbolFlags["PropertyOrAccessor"] = 98308] = "PropertyOrAccessor";
          SymbolFlags[SymbolFlags["Export"] = 7340032] = "Export";
          SymbolFlags[SymbolFlags["ClassMember"] = 106500] = "ClassMember";
          /* @internal */
          // The set of things we consider semantically classifiable.  Used to speed up the LS during
          // classification.
          SymbolFlags[SymbolFlags["Classifiable"] = 788448] = "Classifiable";
      })(SymbolFlags = ts.SymbolFlags || (ts.SymbolFlags = {}));
      /* @internal */
      var CheckFlags;
      (function (CheckFlags) {
          CheckFlags[CheckFlags["Instantiated"] = 1] = "Instantiated";
          CheckFlags[CheckFlags["SyntheticProperty"] = 2] = "SyntheticProperty";
          CheckFlags[CheckFlags["Readonly"] = 4] = "Readonly";
          CheckFlags[CheckFlags["Partial"] = 8] = "Partial";
          CheckFlags[CheckFlags["HasNonUniformType"] = 16] = "HasNonUniformType";
          CheckFlags[CheckFlags["ContainsPublic"] = 32] = "ContainsPublic";
          CheckFlags[CheckFlags["ContainsProtected"] = 64] = "ContainsProtected";
          CheckFlags[CheckFlags["ContainsPrivate"] = 128] = "ContainsPrivate";
          CheckFlags[CheckFlags["ContainsStatic"] = 256] = "ContainsStatic";
      })(CheckFlags = ts.CheckFlags || (ts.CheckFlags = {}));
      /* @internal */
      var NodeCheckFlags;
      (function (NodeCheckFlags) {
          NodeCheckFlags[NodeCheckFlags["TypeChecked"] = 1] = "TypeChecked";
          NodeCheckFlags[NodeCheckFlags["LexicalThis"] = 2] = "LexicalThis";
          NodeCheckFlags[NodeCheckFlags["CaptureThis"] = 4] = "CaptureThis";
          NodeCheckFlags[NodeCheckFlags["CaptureNewTarget"] = 8] = "CaptureNewTarget";
          NodeCheckFlags[NodeCheckFlags["SuperInstance"] = 256] = "SuperInstance";
          NodeCheckFlags[NodeCheckFlags["SuperStatic"] = 512] = "SuperStatic";
          NodeCheckFlags[NodeCheckFlags["ContextChecked"] = 1024] = "ContextChecked";
          NodeCheckFlags[NodeCheckFlags["AsyncMethodWithSuper"] = 2048] = "AsyncMethodWithSuper";
          NodeCheckFlags[NodeCheckFlags["AsyncMethodWithSuperBinding"] = 4096] = "AsyncMethodWithSuperBinding";
          NodeCheckFlags[NodeCheckFlags["CaptureArguments"] = 8192] = "CaptureArguments";
          NodeCheckFlags[NodeCheckFlags["EnumValuesComputed"] = 16384] = "EnumValuesComputed";
          NodeCheckFlags[NodeCheckFlags["LexicalModuleMergesWithClass"] = 32768] = "LexicalModuleMergesWithClass";
          NodeCheckFlags[NodeCheckFlags["LoopWithCapturedBlockScopedBinding"] = 65536] = "LoopWithCapturedBlockScopedBinding";
          NodeCheckFlags[NodeCheckFlags["CapturedBlockScopedBinding"] = 131072] = "CapturedBlockScopedBinding";
          NodeCheckFlags[NodeCheckFlags["BlockScopedBindingInLoop"] = 262144] = "BlockScopedBindingInLoop";
          NodeCheckFlags[NodeCheckFlags["ClassWithBodyScopedClassBinding"] = 524288] = "ClassWithBodyScopedClassBinding";
          NodeCheckFlags[NodeCheckFlags["BodyScopedClassBinding"] = 1048576] = "BodyScopedClassBinding";
          NodeCheckFlags[NodeCheckFlags["NeedsLoopOutParameter"] = 2097152] = "NeedsLoopOutParameter";
          NodeCheckFlags[NodeCheckFlags["AssignmentsMarked"] = 4194304] = "AssignmentsMarked";
          NodeCheckFlags[NodeCheckFlags["ClassWithConstructorReference"] = 8388608] = "ClassWithConstructorReference";
          NodeCheckFlags[NodeCheckFlags["ConstructorReferenceInClass"] = 16777216] = "ConstructorReferenceInClass";
      })(NodeCheckFlags = ts.NodeCheckFlags || (ts.NodeCheckFlags = {}));
      var TypeFlags;
      (function (TypeFlags) {
          TypeFlags[TypeFlags["Any"] = 1] = "Any";
          TypeFlags[TypeFlags["String"] = 2] = "String";
          TypeFlags[TypeFlags["Number"] = 4] = "Number";
          TypeFlags[TypeFlags["Boolean"] = 8] = "Boolean";
          TypeFlags[TypeFlags["Enum"] = 16] = "Enum";
          TypeFlags[TypeFlags["StringLiteral"] = 32] = "StringLiteral";
          TypeFlags[TypeFlags["NumberLiteral"] = 64] = "NumberLiteral";
          TypeFlags[TypeFlags["BooleanLiteral"] = 128] = "BooleanLiteral";
          TypeFlags[TypeFlags["EnumLiteral"] = 256] = "EnumLiteral";
          TypeFlags[TypeFlags["ESSymbol"] = 512] = "ESSymbol";
          TypeFlags[TypeFlags["Void"] = 1024] = "Void";
          TypeFlags[TypeFlags["Undefined"] = 2048] = "Undefined";
          TypeFlags[TypeFlags["Null"] = 4096] = "Null";
          TypeFlags[TypeFlags["Never"] = 8192] = "Never";
          TypeFlags[TypeFlags["TypeParameter"] = 16384] = "TypeParameter";
          TypeFlags[TypeFlags["Object"] = 32768] = "Object";
          TypeFlags[TypeFlags["Union"] = 65536] = "Union";
          TypeFlags[TypeFlags["Intersection"] = 131072] = "Intersection";
          TypeFlags[TypeFlags["Index"] = 262144] = "Index";
          TypeFlags[TypeFlags["IndexedAccess"] = 524288] = "IndexedAccess";
          /* @internal */
          TypeFlags[TypeFlags["FreshLiteral"] = 1048576] = "FreshLiteral";
          /* @internal */
          TypeFlags[TypeFlags["ContainsWideningType"] = 2097152] = "ContainsWideningType";
          /* @internal */
          TypeFlags[TypeFlags["ContainsObjectLiteral"] = 4194304] = "ContainsObjectLiteral";
          /* @internal */
          TypeFlags[TypeFlags["ContainsAnyFunctionType"] = 8388608] = "ContainsAnyFunctionType";
          TypeFlags[TypeFlags["NonPrimitive"] = 16777216] = "NonPrimitive";
          /* @internal */
          TypeFlags[TypeFlags["Nullable"] = 6144] = "Nullable";
          TypeFlags[TypeFlags["Literal"] = 480] = "Literal";
          TypeFlags[TypeFlags["StringOrNumberLiteral"] = 96] = "StringOrNumberLiteral";
          /* @internal */
          TypeFlags[TypeFlags["DefinitelyFalsy"] = 7392] = "DefinitelyFalsy";
          TypeFlags[TypeFlags["PossiblyFalsy"] = 7406] = "PossiblyFalsy";
          /* @internal */
          TypeFlags[TypeFlags["Intrinsic"] = 16793231] = "Intrinsic";
          /* @internal */
          TypeFlags[TypeFlags["Primitive"] = 8190] = "Primitive";
          TypeFlags[TypeFlags["StringLike"] = 262178] = "StringLike";
          TypeFlags[TypeFlags["NumberLike"] = 340] = "NumberLike";
          TypeFlags[TypeFlags["BooleanLike"] = 136] = "BooleanLike";
          TypeFlags[TypeFlags["EnumLike"] = 272] = "EnumLike";
          TypeFlags[TypeFlags["UnionOrIntersection"] = 196608] = "UnionOrIntersection";
          TypeFlags[TypeFlags["StructuredType"] = 229376] = "StructuredType";
          TypeFlags[TypeFlags["StructuredOrTypeVariable"] = 1032192] = "StructuredOrTypeVariable";
          TypeFlags[TypeFlags["TypeVariable"] = 540672] = "TypeVariable";
          // 'Narrowable' types are types where narrowing actually narrows.
          // This *should* be every type other than null, undefined, void, and never
          TypeFlags[TypeFlags["Narrowable"] = 17810431] = "Narrowable";
          TypeFlags[TypeFlags["NotUnionOrUnit"] = 16810497] = "NotUnionOrUnit";
          /* @internal */
          TypeFlags[TypeFlags["RequiresWidening"] = 6291456] = "RequiresWidening";
          /* @internal */
          TypeFlags[TypeFlags["PropagatingFlags"] = 14680064] = "PropagatingFlags";
      })(TypeFlags = ts.TypeFlags || (ts.TypeFlags = {}));
      var ObjectFlags;
      (function (ObjectFlags) {
          ObjectFlags[ObjectFlags["Class"] = 1] = "Class";
          ObjectFlags[ObjectFlags["Interface"] = 2] = "Interface";
          ObjectFlags[ObjectFlags["Reference"] = 4] = "Reference";
          ObjectFlags[ObjectFlags["Tuple"] = 8] = "Tuple";
          ObjectFlags[ObjectFlags["Anonymous"] = 16] = "Anonymous";
          ObjectFlags[ObjectFlags["Mapped"] = 32] = "Mapped";
          ObjectFlags[ObjectFlags["Instantiated"] = 64] = "Instantiated";
          ObjectFlags[ObjectFlags["ObjectLiteral"] = 128] = "ObjectLiteral";
          ObjectFlags[ObjectFlags["EvolvingArray"] = 256] = "EvolvingArray";
          ObjectFlags[ObjectFlags["ObjectLiteralPatternWithComputedProperties"] = 512] = "ObjectLiteralPatternWithComputedProperties";
          ObjectFlags[ObjectFlags["NonPrimitive"] = 1024] = "NonPrimitive";
          ObjectFlags[ObjectFlags["ClassOrInterface"] = 3] = "ClassOrInterface";
      })(ObjectFlags = ts.ObjectFlags || (ts.ObjectFlags = {}));
      var SignatureKind;
      (function (SignatureKind) {
          SignatureKind[SignatureKind["Call"] = 0] = "Call";
          SignatureKind[SignatureKind["Construct"] = 1] = "Construct";
      })(SignatureKind = ts.SignatureKind || (ts.SignatureKind = {}));
      var IndexKind;
      (function (IndexKind) {
          IndexKind[IndexKind["String"] = 0] = "String";
          IndexKind[IndexKind["Number"] = 1] = "Number";
      })(IndexKind = ts.IndexKind || (ts.IndexKind = {}));
      /* @internal */
      var SpecialPropertyAssignmentKind;
      (function (SpecialPropertyAssignmentKind) {
          SpecialPropertyAssignmentKind[SpecialPropertyAssignmentKind["None"] = 0] = "None";
          /// exports.name = expr
          SpecialPropertyAssignmentKind[SpecialPropertyAssignmentKind["ExportsProperty"] = 1] = "ExportsProperty";
          /// module.exports = expr
          SpecialPropertyAssignmentKind[SpecialPropertyAssignmentKind["ModuleExports"] = 2] = "ModuleExports";
          /// className.prototype.name = expr
          SpecialPropertyAssignmentKind[SpecialPropertyAssignmentKind["PrototypeProperty"] = 3] = "PrototypeProperty";
          /// this.name = expr
          SpecialPropertyAssignmentKind[SpecialPropertyAssignmentKind["ThisProperty"] = 4] = "ThisProperty";
      })(SpecialPropertyAssignmentKind = ts.SpecialPropertyAssignmentKind || (ts.SpecialPropertyAssignmentKind = {}));
      var DiagnosticCategory;
      (function (DiagnosticCategory) {
          DiagnosticCategory[DiagnosticCategory["Warning"] = 0] = "Warning";
          DiagnosticCategory[DiagnosticCategory["Error"] = 1] = "Error";
          DiagnosticCategory[DiagnosticCategory["Message"] = 2] = "Message";
      })(DiagnosticCategory = ts.DiagnosticCategory || (ts.DiagnosticCategory = {}));
      var ModuleResolutionKind;
      (function (ModuleResolutionKind) {
          ModuleResolutionKind[ModuleResolutionKind["Classic"] = 1] = "Classic";
          ModuleResolutionKind[ModuleResolutionKind["NodeJs"] = 2] = "NodeJs";
      })(ModuleResolutionKind = ts.ModuleResolutionKind || (ts.ModuleResolutionKind = {}));
      var ModuleKind;
      (function (ModuleKind) {
          ModuleKind[ModuleKind["None"] = 0] = "None";
          ModuleKind[ModuleKind["CommonJS"] = 1] = "CommonJS";
          ModuleKind[ModuleKind["AMD"] = 2] = "AMD";
          ModuleKind[ModuleKind["UMD"] = 3] = "UMD";
          ModuleKind[ModuleKind["System"] = 4] = "System";
          ModuleKind[ModuleKind["ES2015"] = 5] = "ES2015";
      })(ModuleKind = ts.ModuleKind || (ts.ModuleKind = {}));
      var JsxEmit;
      (function (JsxEmit) {
          JsxEmit[JsxEmit["None"] = 0] = "None";
          JsxEmit[JsxEmit["Preserve"] = 1] = "Preserve";
          JsxEmit[JsxEmit["React"] = 2] = "React";
          JsxEmit[JsxEmit["ReactNative"] = 3] = "ReactNative";
      })(JsxEmit = ts.JsxEmit || (ts.JsxEmit = {}));
      var NewLineKind;
      (function (NewLineKind) {
          NewLineKind[NewLineKind["CarriageReturnLineFeed"] = 0] = "CarriageReturnLineFeed";
          NewLineKind[NewLineKind["LineFeed"] = 1] = "LineFeed";
      })(NewLineKind = ts.NewLineKind || (ts.NewLineKind = {}));
      var ScriptKind;
      (function (ScriptKind) {
          ScriptKind[ScriptKind["Unknown"] = 0] = "Unknown";
          ScriptKind[ScriptKind["JS"] = 1] = "JS";
          ScriptKind[ScriptKind["JSX"] = 2] = "JSX";
          ScriptKind[ScriptKind["TS"] = 3] = "TS";
          ScriptKind[ScriptKind["TSX"] = 4] = "TSX";
          ScriptKind[ScriptKind["External"] = 5] = "External";
      })(ScriptKind = ts.ScriptKind || (ts.ScriptKind = {}));
      var ScriptTarget;
      (function (ScriptTarget) {
          ScriptTarget[ScriptTarget["ES3"] = 0] = "ES3";
          ScriptTarget[ScriptTarget["ES5"] = 1] = "ES5";
          ScriptTarget[ScriptTarget["ES2015"] = 2] = "ES2015";
          ScriptTarget[ScriptTarget["ES2016"] = 3] = "ES2016";
          ScriptTarget[ScriptTarget["ES2017"] = 4] = "ES2017";
          ScriptTarget[ScriptTarget["ESNext"] = 5] = "ESNext";
          ScriptTarget[ScriptTarget["Latest"] = 5] = "Latest";
      })(ScriptTarget = ts.ScriptTarget || (ts.ScriptTarget = {}));
      var LanguageVariant;
      (function (LanguageVariant) {
          LanguageVariant[LanguageVariant["Standard"] = 0] = "Standard";
          LanguageVariant[LanguageVariant["JSX"] = 1] = "JSX";
      })(LanguageVariant = ts.LanguageVariant || (ts.LanguageVariant = {}));
      /* @internal */
      var DiagnosticStyle;
      (function (DiagnosticStyle) {
          DiagnosticStyle[DiagnosticStyle["Simple"] = 0] = "Simple";
          DiagnosticStyle[DiagnosticStyle["Pretty"] = 1] = "Pretty";
      })(DiagnosticStyle = ts.DiagnosticStyle || (ts.DiagnosticStyle = {}));
      var WatchDirectoryFlags;
      (function (WatchDirectoryFlags) {
          WatchDirectoryFlags[WatchDirectoryFlags["None"] = 0] = "None";
          WatchDirectoryFlags[WatchDirectoryFlags["Recursive"] = 1] = "Recursive";
      })(WatchDirectoryFlags = ts.WatchDirectoryFlags || (ts.WatchDirectoryFlags = {}));
      /* @internal */
      var CharacterCodes;
      (function (CharacterCodes) {
          CharacterCodes[CharacterCodes["nullCharacter"] = 0] = "nullCharacter";
          CharacterCodes[CharacterCodes["maxAsciiCharacter"] = 127] = "maxAsciiCharacter";
          CharacterCodes[CharacterCodes["lineFeed"] = 10] = "lineFeed";
          CharacterCodes[CharacterCodes["carriageReturn"] = 13] = "carriageReturn";
          CharacterCodes[CharacterCodes["lineSeparator"] = 8232] = "lineSeparator";
          CharacterCodes[CharacterCodes["paragraphSeparator"] = 8233] = "paragraphSeparator";
          CharacterCodes[CharacterCodes["nextLine"] = 133] = "nextLine";
          // Unicode 3.0 space characters
          CharacterCodes[CharacterCodes["space"] = 32] = "space";
          CharacterCodes[CharacterCodes["nonBreakingSpace"] = 160] = "nonBreakingSpace";
          CharacterCodes[CharacterCodes["enQuad"] = 8192] = "enQuad";
          CharacterCodes[CharacterCodes["emQuad"] = 8193] = "emQuad";
          CharacterCodes[CharacterCodes["enSpace"] = 8194] = "enSpace";
          CharacterCodes[CharacterCodes["emSpace"] = 8195] = "emSpace";
          CharacterCodes[CharacterCodes["threePerEmSpace"] = 8196] = "threePerEmSpace";
          CharacterCodes[CharacterCodes["fourPerEmSpace"] = 8197] = "fourPerEmSpace";
          CharacterCodes[CharacterCodes["sixPerEmSpace"] = 8198] = "sixPerEmSpace";
          CharacterCodes[CharacterCodes["figureSpace"] = 8199] = "figureSpace";
          CharacterCodes[CharacterCodes["punctuationSpace"] = 8200] = "punctuationSpace";
          CharacterCodes[CharacterCodes["thinSpace"] = 8201] = "thinSpace";
          CharacterCodes[CharacterCodes["hairSpace"] = 8202] = "hairSpace";
          CharacterCodes[CharacterCodes["zeroWidthSpace"] = 8203] = "zeroWidthSpace";
          CharacterCodes[CharacterCodes["narrowNoBreakSpace"] = 8239] = "narrowNoBreakSpace";
          CharacterCodes[CharacterCodes["ideographicSpace"] = 12288] = "ideographicSpace";
          CharacterCodes[CharacterCodes["mathematicalSpace"] = 8287] = "mathematicalSpace";
          CharacterCodes[CharacterCodes["ogham"] = 5760] = "ogham";
          CharacterCodes[CharacterCodes["_"] = 95] = "_";
          CharacterCodes[CharacterCodes["$"] = 36] = "$";
          CharacterCodes[CharacterCodes["_0"] = 48] = "_0";
          CharacterCodes[CharacterCodes["_1"] = 49] = "_1";
          CharacterCodes[CharacterCodes["_2"] = 50] = "_2";
          CharacterCodes[CharacterCodes["_3"] = 51] = "_3";
          CharacterCodes[CharacterCodes["_4"] = 52] = "_4";
          CharacterCodes[CharacterCodes["_5"] = 53] = "_5";
          CharacterCodes[CharacterCodes["_6"] = 54] = "_6";
          CharacterCodes[CharacterCodes["_7"] = 55] = "_7";
          CharacterCodes[CharacterCodes["_8"] = 56] = "_8";
          CharacterCodes[CharacterCodes["_9"] = 57] = "_9";
          CharacterCodes[CharacterCodes["a"] = 97] = "a";
          CharacterCodes[CharacterCodes["b"] = 98] = "b";
          CharacterCodes[CharacterCodes["c"] = 99] = "c";
          CharacterCodes[CharacterCodes["d"] = 100] = "d";
          CharacterCodes[CharacterCodes["e"] = 101] = "e";
          CharacterCodes[CharacterCodes["f"] = 102] = "f";
          CharacterCodes[CharacterCodes["g"] = 103] = "g";
          CharacterCodes[CharacterCodes["h"] = 104] = "h";
          CharacterCodes[CharacterCodes["i"] = 105] = "i";
          CharacterCodes[CharacterCodes["j"] = 106] = "j";
          CharacterCodes[CharacterCodes["k"] = 107] = "k";
          CharacterCodes[CharacterCodes["l"] = 108] = "l";
          CharacterCodes[CharacterCodes["m"] = 109] = "m";
          CharacterCodes[CharacterCodes["n"] = 110] = "n";
          CharacterCodes[CharacterCodes["o"] = 111] = "o";
          CharacterCodes[CharacterCodes["p"] = 112] = "p";
          CharacterCodes[CharacterCodes["q"] = 113] = "q";
          CharacterCodes[CharacterCodes["r"] = 114] = "r";
          CharacterCodes[CharacterCodes["s"] = 115] = "s";
          CharacterCodes[CharacterCodes["t"] = 116] = "t";
          CharacterCodes[CharacterCodes["u"] = 117] = "u";
          CharacterCodes[CharacterCodes["v"] = 118] = "v";
          CharacterCodes[CharacterCodes["w"] = 119] = "w";
          CharacterCodes[CharacterCodes["x"] = 120] = "x";
          CharacterCodes[CharacterCodes["y"] = 121] = "y";
          CharacterCodes[CharacterCodes["z"] = 122] = "z";
          CharacterCodes[CharacterCodes["A"] = 65] = "A";
          CharacterCodes[CharacterCodes["B"] = 66] = "B";
          CharacterCodes[CharacterCodes["C"] = 67] = "C";
          CharacterCodes[CharacterCodes["D"] = 68] = "D";
          CharacterCodes[CharacterCodes["E"] = 69] = "E";
          CharacterCodes[CharacterCodes["F"] = 70] = "F";
          CharacterCodes[CharacterCodes["G"] = 71] = "G";
          CharacterCodes[CharacterCodes["H"] = 72] = "H";
          CharacterCodes[CharacterCodes["I"] = 73] = "I";
          CharacterCodes[CharacterCodes["J"] = 74] = "J";
          CharacterCodes[CharacterCodes["K"] = 75] = "K";
          CharacterCodes[CharacterCodes["L"] = 76] = "L";
          CharacterCodes[CharacterCodes["M"] = 77] = "M";
          CharacterCodes[CharacterCodes["N"] = 78] = "N";
          CharacterCodes[CharacterCodes["O"] = 79] = "O";
          CharacterCodes[CharacterCodes["P"] = 80] = "P";
          CharacterCodes[CharacterCodes["Q"] = 81] = "Q";
          CharacterCodes[CharacterCodes["R"] = 82] = "R";
          CharacterCodes[CharacterCodes["S"] = 83] = "S";
          CharacterCodes[CharacterCodes["T"] = 84] = "T";
          CharacterCodes[CharacterCodes["U"] = 85] = "U";
          CharacterCodes[CharacterCodes["V"] = 86] = "V";
          CharacterCodes[CharacterCodes["W"] = 87] = "W";
          CharacterCodes[CharacterCodes["X"] = 88] = "X";
          CharacterCodes[CharacterCodes["Y"] = 89] = "Y";
          CharacterCodes[CharacterCodes["Z"] = 90] = "Z";
          CharacterCodes[CharacterCodes["ampersand"] = 38] = "ampersand";
          CharacterCodes[CharacterCodes["asterisk"] = 42] = "asterisk";
          CharacterCodes[CharacterCodes["at"] = 64] = "at";
          CharacterCodes[CharacterCodes["backslash"] = 92] = "backslash";
          CharacterCodes[CharacterCodes["backtick"] = 96] = "backtick";
          CharacterCodes[CharacterCodes["bar"] = 124] = "bar";
          CharacterCodes[CharacterCodes["caret"] = 94] = "caret";
          CharacterCodes[CharacterCodes["closeBrace"] = 125] = "closeBrace";
          CharacterCodes[CharacterCodes["closeBracket"] = 93] = "closeBracket";
          CharacterCodes[CharacterCodes["closeParen"] = 41] = "closeParen";
          CharacterCodes[CharacterCodes["colon"] = 58] = "colon";
          CharacterCodes[CharacterCodes["comma"] = 44] = "comma";
          CharacterCodes[CharacterCodes["dot"] = 46] = "dot";
          CharacterCodes[CharacterCodes["doubleQuote"] = 34] = "doubleQuote";
          CharacterCodes[CharacterCodes["equals"] = 61] = "equals";
          CharacterCodes[CharacterCodes["exclamation"] = 33] = "exclamation";
          CharacterCodes[CharacterCodes["greaterThan"] = 62] = "greaterThan";
          CharacterCodes[CharacterCodes["hash"] = 35] = "hash";
          CharacterCodes[CharacterCodes["lessThan"] = 60] = "lessThan";
          CharacterCodes[CharacterCodes["minus"] = 45] = "minus";
          CharacterCodes[CharacterCodes["openBrace"] = 123] = "openBrace";
          CharacterCodes[CharacterCodes["openBracket"] = 91] = "openBracket";
          CharacterCodes[CharacterCodes["openParen"] = 40] = "openParen";
          CharacterCodes[CharacterCodes["percent"] = 37] = "percent";
          CharacterCodes[CharacterCodes["plus"] = 43] = "plus";
          CharacterCodes[CharacterCodes["question"] = 63] = "question";
          CharacterCodes[CharacterCodes["semicolon"] = 59] = "semicolon";
          CharacterCodes[CharacterCodes["singleQuote"] = 39] = "singleQuote";
          CharacterCodes[CharacterCodes["slash"] = 47] = "slash";
          CharacterCodes[CharacterCodes["tilde"] = 126] = "tilde";
          CharacterCodes[CharacterCodes["backspace"] = 8] = "backspace";
          CharacterCodes[CharacterCodes["formFeed"] = 12] = "formFeed";
          CharacterCodes[CharacterCodes["byteOrderMark"] = 65279] = "byteOrderMark";
          CharacterCodes[CharacterCodes["tab"] = 9] = "tab";
          CharacterCodes[CharacterCodes["verticalTab"] = 11] = "verticalTab";
      })(CharacterCodes = ts.CharacterCodes || (ts.CharacterCodes = {}));
      var Extension;
      (function (Extension) {
          Extension[Extension["Ts"] = 0] = "Ts";
          Extension[Extension["Tsx"] = 1] = "Tsx";
          Extension[Extension["Dts"] = 2] = "Dts";
          Extension[Extension["Js"] = 3] = "Js";
          Extension[Extension["Jsx"] = 4] = "Jsx";
          Extension[Extension["LastTypeScriptExtension"] = 2] = "LastTypeScriptExtension";
      })(Extension = ts.Extension || (ts.Extension = {}));
      /* @internal */
      var TransformFlags;
      (function (TransformFlags) {
          TransformFlags[TransformFlags["None"] = 0] = "None";
          // Facts
          // - Flags used to indicate that a node or subtree contains syntax that requires transformation.
          TransformFlags[TransformFlags["TypeScript"] = 1] = "TypeScript";
          TransformFlags[TransformFlags["ContainsTypeScript"] = 2] = "ContainsTypeScript";
          TransformFlags[TransformFlags["ContainsJsx"] = 4] = "ContainsJsx";
          TransformFlags[TransformFlags["ContainsESNext"] = 8] = "ContainsESNext";
          TransformFlags[TransformFlags["ContainsES2017"] = 16] = "ContainsES2017";
          TransformFlags[TransformFlags["ContainsES2016"] = 32] = "ContainsES2016";
          TransformFlags[TransformFlags["ES2015"] = 64] = "ES2015";
          TransformFlags[TransformFlags["ContainsES2015"] = 128] = "ContainsES2015";
          TransformFlags[TransformFlags["Generator"] = 256] = "Generator";
          TransformFlags[TransformFlags["ContainsGenerator"] = 512] = "ContainsGenerator";
          TransformFlags[TransformFlags["DestructuringAssignment"] = 1024] = "DestructuringAssignment";
          TransformFlags[TransformFlags["ContainsDestructuringAssignment"] = 2048] = "ContainsDestructuringAssignment";
          // Markers
          // - Flags used to indicate that a subtree contains a specific transformation.
          TransformFlags[TransformFlags["ContainsDecorators"] = 4096] = "ContainsDecorators";
          TransformFlags[TransformFlags["ContainsPropertyInitializer"] = 8192] = "ContainsPropertyInitializer";
          TransformFlags[TransformFlags["ContainsLexicalThis"] = 16384] = "ContainsLexicalThis";
          TransformFlags[TransformFlags["ContainsCapturedLexicalThis"] = 32768] = "ContainsCapturedLexicalThis";
          TransformFlags[TransformFlags["ContainsLexicalThisInComputedPropertyName"] = 65536] = "ContainsLexicalThisInComputedPropertyName";
          TransformFlags[TransformFlags["ContainsDefaultValueAssignments"] = 131072] = "ContainsDefaultValueAssignments";
          TransformFlags[TransformFlags["ContainsParameterPropertyAssignments"] = 262144] = "ContainsParameterPropertyAssignments";
          TransformFlags[TransformFlags["ContainsSpread"] = 524288] = "ContainsSpread";
          TransformFlags[TransformFlags["ContainsObjectSpread"] = 1048576] = "ContainsObjectSpread";
          TransformFlags[TransformFlags["ContainsRest"] = 524288] = "ContainsRest";
          TransformFlags[TransformFlags["ContainsObjectRest"] = 1048576] = "ContainsObjectRest";
          TransformFlags[TransformFlags["ContainsComputedPropertyName"] = 2097152] = "ContainsComputedPropertyName";
          TransformFlags[TransformFlags["ContainsBlockScopedBinding"] = 4194304] = "ContainsBlockScopedBinding";
          TransformFlags[TransformFlags["ContainsBindingPattern"] = 8388608] = "ContainsBindingPattern";
          TransformFlags[TransformFlags["ContainsYield"] = 16777216] = "ContainsYield";
          TransformFlags[TransformFlags["ContainsHoistedDeclarationOrCompletion"] = 33554432] = "ContainsHoistedDeclarationOrCompletion";
          TransformFlags[TransformFlags["HasComputedFlags"] = 536870912] = "HasComputedFlags";
          // Assertions
          // - Bitmasks that are used to assert facts about the syntax of a node and its subtree.
          TransformFlags[TransformFlags["AssertTypeScript"] = 3] = "AssertTypeScript";
          TransformFlags[TransformFlags["AssertJsx"] = 4] = "AssertJsx";
          TransformFlags[TransformFlags["AssertESNext"] = 8] = "AssertESNext";
          TransformFlags[TransformFlags["AssertES2017"] = 16] = "AssertES2017";
          TransformFlags[TransformFlags["AssertES2016"] = 32] = "AssertES2016";
          TransformFlags[TransformFlags["AssertES2015"] = 192] = "AssertES2015";
          TransformFlags[TransformFlags["AssertGenerator"] = 768] = "AssertGenerator";
          TransformFlags[TransformFlags["AssertDestructuringAssignment"] = 3072] = "AssertDestructuringAssignment";
          // Scope Exclusions
          // - Bitmasks that exclude flags from propagating out of a specific context
          //   into the subtree flags of their container.
          TransformFlags[TransformFlags["NodeExcludes"] = 536872257] = "NodeExcludes";
          TransformFlags[TransformFlags["ArrowFunctionExcludes"] = 601249089] = "ArrowFunctionExcludes";
          TransformFlags[TransformFlags["FunctionExcludes"] = 601281857] = "FunctionExcludes";
          TransformFlags[TransformFlags["ConstructorExcludes"] = 601015617] = "ConstructorExcludes";
          TransformFlags[TransformFlags["MethodOrAccessorExcludes"] = 601015617] = "MethodOrAccessorExcludes";
          TransformFlags[TransformFlags["ClassExcludes"] = 539358529] = "ClassExcludes";
          TransformFlags[TransformFlags["ModuleExcludes"] = 574674241] = "ModuleExcludes";
          TransformFlags[TransformFlags["TypeExcludes"] = -3] = "TypeExcludes";
          TransformFlags[TransformFlags["ObjectLiteralExcludes"] = 540087617] = "ObjectLiteralExcludes";
          TransformFlags[TransformFlags["ArrayLiteralOrCallOrNewExcludes"] = 537396545] = "ArrayLiteralOrCallOrNewExcludes";
          TransformFlags[TransformFlags["VariableDeclarationListExcludes"] = 546309441] = "VariableDeclarationListExcludes";
          TransformFlags[TransformFlags["ParameterExcludes"] = 536872257] = "ParameterExcludes";
          TransformFlags[TransformFlags["CatchClauseExcludes"] = 537920833] = "CatchClauseExcludes";
          TransformFlags[TransformFlags["BindingPatternExcludes"] = 537396545] = "BindingPatternExcludes";
          // Masks
          // - Additional bitmasks
          TransformFlags[TransformFlags["TypeScriptClassSyntaxMask"] = 274432] = "TypeScriptClassSyntaxMask";
          TransformFlags[TransformFlags["ES2015FunctionSyntaxMask"] = 163840] = "ES2015FunctionSyntaxMask";
      })(TransformFlags = ts.TransformFlags || (ts.TransformFlags = {}));
      var EmitFlags;
      (function (EmitFlags) {
          EmitFlags[EmitFlags["SingleLine"] = 1] = "SingleLine";
          EmitFlags[EmitFlags["AdviseOnEmitNode"] = 2] = "AdviseOnEmitNode";
          EmitFlags[EmitFlags["NoSubstitution"] = 4] = "NoSubstitution";
          EmitFlags[EmitFlags["CapturesThis"] = 8] = "CapturesThis";
          EmitFlags[EmitFlags["NoLeadingSourceMap"] = 16] = "NoLeadingSourceMap";
          EmitFlags[EmitFlags["NoTrailingSourceMap"] = 32] = "NoTrailingSourceMap";
          EmitFlags[EmitFlags["NoSourceMap"] = 48] = "NoSourceMap";
          EmitFlags[EmitFlags["NoNestedSourceMaps"] = 64] = "NoNestedSourceMaps";
          EmitFlags[EmitFlags["NoTokenLeadingSourceMaps"] = 128] = "NoTokenLeadingSourceMaps";
          EmitFlags[EmitFlags["NoTokenTrailingSourceMaps"] = 256] = "NoTokenTrailingSourceMaps";
          EmitFlags[EmitFlags["NoTokenSourceMaps"] = 384] = "NoTokenSourceMaps";
          EmitFlags[EmitFlags["NoLeadingComments"] = 512] = "NoLeadingComments";
          EmitFlags[EmitFlags["NoTrailingComments"] = 1024] = "NoTrailingComments";
          EmitFlags[EmitFlags["NoComments"] = 1536] = "NoComments";
          EmitFlags[EmitFlags["NoNestedComments"] = 2048] = "NoNestedComments";
          EmitFlags[EmitFlags["HelperName"] = 4096] = "HelperName";
          EmitFlags[EmitFlags["ExportName"] = 8192] = "ExportName";
          EmitFlags[EmitFlags["LocalName"] = 16384] = "LocalName";
          EmitFlags[EmitFlags["Indented"] = 32768] = "Indented";
          EmitFlags[EmitFlags["NoIndentation"] = 65536] = "NoIndentation";
          EmitFlags[EmitFlags["AsyncFunctionBody"] = 131072] = "AsyncFunctionBody";
          EmitFlags[EmitFlags["ReuseTempVariableScope"] = 262144] = "ReuseTempVariableScope";
          EmitFlags[EmitFlags["CustomPrologue"] = 524288] = "CustomPrologue";
          EmitFlags[EmitFlags["NoHoisting"] = 1048576] = "NoHoisting";
          EmitFlags[EmitFlags["HasEndOfDeclarationMarker"] = 2097152] = "HasEndOfDeclarationMarker";
      })(EmitFlags = ts.EmitFlags || (ts.EmitFlags = {}));
      /**
       * Used by the checker, this enum keeps track of external emit helpers that should be type
       * checked.
       */
      /* @internal */
      var ExternalEmitHelpers;
      (function (ExternalEmitHelpers) {
          ExternalEmitHelpers[ExternalEmitHelpers["Extends"] = 1] = "Extends";
          ExternalEmitHelpers[ExternalEmitHelpers["Assign"] = 2] = "Assign";
          ExternalEmitHelpers[ExternalEmitHelpers["Rest"] = 4] = "Rest";
          ExternalEmitHelpers[ExternalEmitHelpers["Decorate"] = 8] = "Decorate";
          ExternalEmitHelpers[ExternalEmitHelpers["Metadata"] = 16] = "Metadata";
          ExternalEmitHelpers[ExternalEmitHelpers["Param"] = 32] = "Param";
          ExternalEmitHelpers[ExternalEmitHelpers["Awaiter"] = 64] = "Awaiter";
          ExternalEmitHelpers[ExternalEmitHelpers["Generator"] = 128] = "Generator";
          ExternalEmitHelpers[ExternalEmitHelpers["FirstEmitHelper"] = 1] = "FirstEmitHelper";
          ExternalEmitHelpers[ExternalEmitHelpers["LastEmitHelper"] = 128] = "LastEmitHelper";
      })(ExternalEmitHelpers = ts.ExternalEmitHelpers || (ts.ExternalEmitHelpers = {}));
      var EmitHint;
      (function (EmitHint) {
          EmitHint[EmitHint["SourceFile"] = 0] = "SourceFile";
          EmitHint[EmitHint["Expression"] = 1] = "Expression";
          EmitHint[EmitHint["IdentifierName"] = 2] = "IdentifierName";
          EmitHint[EmitHint["Unspecified"] = 3] = "Unspecified";
      })(EmitHint = ts.EmitHint || (ts.EmitHint = {}));
  })(ts || (ts = {}));
  /*@internal*/
  var ts;
  (function (ts) {
      /** Gets a timestamp with (at least) ms resolution */
      ts.timestamp = typeof performance !== "undefined" && performance.now ? function () { return performance.now(); } : Date.now ? Date.now : function () { return +(new Date()); };
  })(ts || (ts = {}));
  /*@internal*/
  /** Performance measurements for the compiler. */
  (function (ts) {
      var performance;
      (function (performance) {
          var profilerEvent = typeof onProfilerEvent === "function" && onProfilerEvent.profiler === true
              ? onProfilerEvent
              : function (_markName) { };
          var enabled = false;
          var profilerStart = 0;
          var counts;
          var marks;
          var measures;
          /**
           * Marks a performance event.
           *
           * @param markName The name of the mark.
           */
          function mark(markName) {
              if (enabled) {
                  marks.set(markName, ts.timestamp());
                  counts.set(markName, (counts.get(markName) || 0) + 1);
                  profilerEvent(markName);
              }
          }
          performance.mark = mark;
          /**
           * Adds a performance measurement with the specified name.
           *
           * @param measureName The name of the performance measurement.
           * @param startMarkName The name of the starting mark. If not supplied, the point at which the
           *      profiler was enabled is used.
           * @param endMarkName The name of the ending mark. If not supplied, the current timestamp is
           *      used.
           */
          function measure(measureName, startMarkName, endMarkName) {
              if (enabled) {
                  var end = endMarkName && marks.get(endMarkName) || ts.timestamp();
                  var start = startMarkName && marks.get(startMarkName) || profilerStart;
                  measures.set(measureName, (measures.get(measureName) || 0) + (end - start));
              }
          }
          performance.measure = measure;
          /**
           * Gets the number of times a marker was encountered.
           *
           * @param markName The name of the mark.
           */
          function getCount(markName) {
              return counts && counts.get(markName) || 0;
          }
          performance.getCount = getCount;
          /**
           * Gets the total duration of all measurements with the supplied name.
           *
           * @param measureName The name of the measure whose durations should be accumulated.
           */
          function getDuration(measureName) {
              return measures && measures.get(measureName) || 0;
          }
          performance.getDuration = getDuration;
          /**
           * Iterate over each measure, performing some action
           *
           * @param cb The action to perform for each measure
           */
          function forEachMeasure(cb) {
              measures.forEach(function (measure, key) {
                  cb(key, measure);
              });
          }
          performance.forEachMeasure = forEachMeasure;
          /** Enables (and resets) performance measurements for the compiler. */
          function enable() {
              counts = ts.createMap();
              marks = ts.createMap();
              measures = ts.createMap();
              enabled = true;
              profilerStart = ts.timestamp();
          }
          performance.enable = enable;
          /** Disables performance measurements for the compiler. */
          function disable() {
              enabled = false;
          }
          performance.disable = disable;
      })(performance = ts.performance || (ts.performance = {}));
  })(ts || (ts = {}));
  /// <reference path="types.ts"/>
  /// <reference path="performance.ts" />
  var ts;
  (function (ts) {
      /** The version of the TypeScript compiler release */
      ts.version = "2.2.1";
  })(ts || (ts = {}));
  /* @internal */
  (function (ts) {
      /**
       * Ternary values are defined such that
       * x & y is False if either x or y is False.
       * x & y is Maybe if either x or y is Maybe, but neither x or y is False.
       * x & y is True if both x and y are True.
       * x | y is False if both x and y are False.
       * x | y is Maybe if either x or y is Maybe, but neither x or y is True.
       * x | y is True if either x or y is True.
       */
      var Ternary;
      (function (Ternary) {
          Ternary[Ternary["False"] = 0] = "False";
          Ternary[Ternary["Maybe"] = 1] = "Maybe";
          Ternary[Ternary["True"] = -1] = "True";
      })(Ternary = ts.Ternary || (ts.Ternary = {}));
      // More efficient to create a collator once and use its `compare` than to call `a.localeCompare(b)` many times.
      ts.collator = typeof Intl === "object" && typeof Intl.Collator === "function" ? new Intl.Collator(/*locales*/ undefined, { usage: "sort", sensitivity: "accent" }) : undefined;
      // Intl is missing in Safari, and node 0.10 treats "a" as greater than "B".
      ts.localeCompareIsCorrect = ts.collator && ts.collator.compare("a", "B") < 0;
      /** Create a MapLike with good performance. */
      function createDictionaryObject() {
          var map = Object.create(null); // tslint:disable-line:no-null-keyword
          // Using 'delete' on an object causes V8 to put the object in dictionary mode.
          // This disables creation of hidden classes, which are expensive when an object is
          // constantly changing shape.
          map["__"] = undefined;
          delete map["__"];
          return map;
      }
      /** Create a new map. If a template object is provided, the map will copy entries from it. */
      function createMap() {
          return new MapCtr();
      }
      ts.createMap = createMap;
      function createMapFromTemplate(template) {
          var map = new MapCtr();
          // Copies keys/values from template. Note that for..in will not throw if
          // template is undefined, and instead will just exit the loop.
          for (var key in template)
              if (hasOwnProperty.call(template, key)) {
                  map.set(key, template[key]);
              }
          return map;
      }
      ts.createMapFromTemplate = createMapFromTemplate;
      // Internet Explorer's Map doesn't support iteration, so don't use it.
      // tslint:disable-next-line:no-in-operator
      var MapCtr = typeof Map !== "undefined" && "entries" in Map.prototype ? Map : shimMap();
      // Keep the class inside a function so it doesn't get compiled if it's not used.
      function shimMap() {
          var MapIterator = (function () {
              function MapIterator(data, selector) {
                  this.index = 0;
                  this.data = data;
                  this.selector = selector;
                  this.keys = Object.keys(data);
              }
              MapIterator.prototype.next = function () {
                  var index = this.index;
                  if (index < this.keys.length) {
                      this.index++;
                      return { value: this.selector(this.data, this.keys[index]), done: false };
                  }
                  return { value: undefined, done: true };
              };
              return MapIterator;
          }());
          // FIXME: Working around a Higgs bug
          return (function () {
              function class_1() {
                  this.data = createDictionaryObject();
                  this.size = 0;
              }
              class_1.prototype.get = function (key) {
                  key = "." + key;
                  return this.data[key];
              };
              class_1.prototype.set = function (key, value) {
                  key = "." + key;
                  if (!this.has(key)) {
                      this.size++;
                  }
                  this.data[key] = value;
                  return this;
              };
              class_1.prototype.has = function (key) {
                  key = "." + key;
                  // tslint:disable-next-line:no-in-operator
                  return key in this.data;
              };
              class_1.prototype.delete = function (key) {
                  key = "." + key;
                  if (this.has(key)) {
                      this.size--;
                      delete this.data[key];
                      return true;
                  }
                  return false;
              };
              class_1.prototype.clear = function () {
                  this.data = createDictionaryObject();
                  this.size = 0;
              };
              class_1.prototype.keys = function () {
                  return new MapIterator(this.data, function (_data, key) { return key.replace(/^\./, ""); });
              };
              class_1.prototype.values = function () {
                  return new MapIterator(this.data, function (data, key) { return data[key]; });
              };
              class_1.prototype.entries = function () {
                  return new MapIterator(this.data, function (data, key) { return [key.replace(/^\./, ""), data[key]]; });
              };
              class_1.prototype.forEach = function (action) {
                  for (var key in this.data) {
                      action(this.data[key], key.replace(/^\./, ""));
                  }
              };
              return class_1;
          }());
      }
      function createFileMap(keyMapper) {
          var files = createMap();
          return {
              get: get,
              set: set,
              contains: contains,
              remove: remove,
              forEachValue: forEachValueInMap,
              getKeys: getKeys,
              clear: clear,
          };
          function forEachValueInMap(f) {
              files.forEach(function (file, key) {
                  f(key, file);
              });
          }
          function getKeys() {
              return arrayFrom(files.keys());
          }
          // path should already be well-formed so it does not need to be normalized
          function get(path) {
              return files.get(toKey(path));
          }
          function set(path, value) {
              files.set(toKey(path), value);
          }
          function contains(path) {
              return files.has(toKey(path));
          }
          function remove(path) {
              files.delete(toKey(path));
          }
          function clear() {
              files.clear();
          }
          function toKey(path) {
              return keyMapper ? keyMapper(path) : path;
          }
      }
      ts.createFileMap = createFileMap;
      function toPath(fileName, basePath, getCanonicalFileName) {
          var nonCanonicalizedPath = isRootedDiskPath(fileName)
              ? normalizePath(fileName)
              : getNormalizedAbsolutePath(fileName, basePath);
          return getCanonicalFileName(nonCanonicalizedPath);
      }
      ts.toPath = toPath;
      var Comparison;
      (function (Comparison) {
          Comparison[Comparison["LessThan"] = -1] = "LessThan";
          Comparison[Comparison["EqualTo"] = 0] = "EqualTo";
          Comparison[Comparison["GreaterThan"] = 1] = "GreaterThan";
      })(Comparison = ts.Comparison || (ts.Comparison = {}));
      function length(array) {
          return array ? array.length : 0;
      }
      ts.length = length;
      /**
       * Iterates through 'array' by index and performs the callback on each element of array until the callback
       * returns a truthy value, then returns that value.
       * If no such value is found, the callback is applied to each element of array and undefined is returned.
       */
      function forEach(array, callback) {
          if (array) {
              for (var i = 0; i < array.length; i++) {
                  var result = callback(array[i], i);
                  if (result) {
                      return result;
                  }
              }
          }
          return undefined;
      }
      ts.forEach = forEach;
      function zipWith(arrayA, arrayB, callback) {
          Debug.assert(arrayA.length === arrayB.length);
          for (var i = 0; i < arrayA.length; i++) {
              callback(arrayA[i], arrayB[i], i);
          }
      }
      ts.zipWith = zipWith;
      /**
       * Iterates through `array` by index and performs the callback on each element of array until the callback
       * returns a falsey value, then returns false.
       * If no such value is found, the callback is applied to each element of array and `true` is returned.
       */
      function every(array, callback) {
          if (array) {
              for (var i = 0; i < array.length; i++) {
                  if (!callback(array[i], i)) {
                      return false;
                  }
              }
          }
          return true;
      }
      ts.every = every;
      /** Works like Array.prototype.find, returning `undefined` if no element satisfying the predicate is found. */
      function find(array, predicate) {
          for (var i = 0; i < array.length; i++) {
              var value = array[i];
              if (predicate(value, i)) {
                  return value;
              }
          }
          return undefined;
      }
      ts.find = find;
      /** Works like Array.prototype.findIndex, returning `-1` if no element satisfying the predicate is found. */
      function findIndex(array, predicate) {
          for (var i = 0; i < array.length; i++) {
              if (predicate(array[i], i)) {
                  return i;
              }
          }
          return -1;
      }
      ts.findIndex = findIndex;
      /**
       * Returns the first truthy result of `callback`, or else fails.
       * This is like `forEach`, but never returns undefined.
       */
      function findMap(array, callback) {
          for (var i = 0; i < array.length; i++) {
              var result = callback(array[i], i);
              if (result) {
                  return result;
              }
          }
          Debug.fail();
      }
      ts.findMap = findMap;
      function contains(array, value) {
          if (array) {
              for (var _i = 0, array_1 = array; _i < array_1.length; _i++) {
                  var v = array_1[_i];
                  if (v === value) {
                      return true;
                  }
              }
          }
          return false;
      }
      ts.contains = contains;
      function indexOf(array, value) {
          if (array) {
              for (var i = 0; i < array.length; i++) {
                  if (array[i] === value) {
                      return i;
                  }
              }
          }
          return -1;
      }
      ts.indexOf = indexOf;
      function indexOfAnyCharCode(text, charCodes, start) {
          for (var i = start || 0; i < text.length; i++) {
              if (contains(charCodes, text.charCodeAt(i))) {
                  return i;
              }
          }
          return -1;
      }
      ts.indexOfAnyCharCode = indexOfAnyCharCode;
      function countWhere(array, predicate) {
          var count = 0;
          if (array) {
              for (var i = 0; i < array.length; i++) {
                  var v = array[i];
                  if (predicate(v, i)) {
                      count++;
                  }
              }
          }
          return count;
      }
      ts.countWhere = countWhere;
      function filter(array, f) {
          if (array) {
              var len = array.length;
              var i = 0;
              while (i < len && f(array[i]))
                  i++;
              if (i < len) {
                  var result = array.slice(0, i);
                  i++;
                  while (i < len) {
                      var item = array[i];
                      if (f(item)) {
                          result.push(item);
                      }
                      i++;
                  }
                  return result;
              }
          }
          return array;
      }
      ts.filter = filter;
      function removeWhere(array, f) {
          var outIndex = 0;
          for (var _i = 0, array_2 = array; _i < array_2.length; _i++) {
              var item = array_2[_i];
              if (!f(item)) {
                  array[outIndex] = item;
                  outIndex++;
              }
          }
          if (outIndex !== array.length) {
              array.length = outIndex;
              return true;
          }
          return false;
      }
      ts.removeWhere = removeWhere;
      function filterMutate(array, f) {
          var outIndex = 0;
          for (var _i = 0, array_3 = array; _i < array_3.length; _i++) {
              var item = array_3[_i];
              if (f(item)) {
                  array[outIndex] = item;
                  outIndex++;
              }
          }
          array.length = outIndex;
      }
      ts.filterMutate = filterMutate;
      function map(array, f) {
          var result;
          if (array) {
              result = [];
              for (var i = 0; i < array.length; i++) {
                  result.push(f(array[i], i));
              }
          }
          return result;
      }
      ts.map = map;
      // Maps from T to T and avoids allocation if all elements map to themselves
      function sameMap(array, f) {
          var result;
          if (array) {
              for (var i = 0; i < array.length; i++) {
                  if (result) {
                      result.push(f(array[i], i));
                  }
                  else {
                      var item = array[i];
                      var mapped = f(item, i);
                      if (item !== mapped) {
                          result = array.slice(0, i);
                          result.push(mapped);
                      }
                  }
              }
          }
          return result || array;
      }
      ts.sameMap = sameMap;
      /**
       * Flattens an array containing a mix of array or non-array elements.
       *
       * @param array The array to flatten.
       */
      function flatten(array) {
          var result;
          if (array) {
              result = [];
              for (var _i = 0, array_4 = array; _i < array_4.length; _i++) {
                  var v = array_4[_i];
                  if (v) {
                      if (isArray(v)) {
                          addRange(result, v);
                      }
                      else {
                          result.push(v);
                      }
                  }
              }
          }
          return result;
      }
      ts.flatten = flatten;
      /**
       * Maps an array. If the mapped value is an array, it is spread into the result.
       *
       * @param array The array to map.
       * @param mapfn The callback used to map the result into one or more values.
       */
      function flatMap(array, mapfn) {
          var result;
          if (array) {
              result = [];
              for (var i = 0; i < array.length; i++) {
                  var v = mapfn(array[i], i);
                  if (v) {
                      if (isArray(v)) {
                          addRange(result, v);
                      }
                      else {
                          result.push(v);
                      }
                  }
              }
          }
          return result;
      }
      ts.flatMap = flatMap;
      /**
       * Computes the first matching span of elements and returns a tuple of the first span
       * and the remaining elements.
       */
      function span(array, f) {
          if (array) {
              for (var i = 0; i < array.length; i++) {
                  if (!f(array[i], i)) {
                      return [array.slice(0, i), array.slice(i)];
                  }
              }
              return [array.slice(0), []];
          }
          return undefined;
      }
      ts.span = span;
      /**
       * Maps contiguous spans of values with the same key.
       *
       * @param array The array to map.
       * @param keyfn A callback used to select the key for an element.
       * @param mapfn A callback used to map a contiguous chunk of values to a single value.
       */
      function spanMap(array, keyfn, mapfn) {
          var result;
          if (array) {
              result = [];
              var len = array.length;
              var previousKey = void 0;
              var key = void 0;
              var start = 0;
              var pos = 0;
              while (start < len) {
                  while (pos < len) {
                      var value = array[pos];
                      key = keyfn(value, pos);
                      if (pos === 0) {
                          previousKey = key;
                      }
                      else if (key !== previousKey) {
                          break;
                      }
                      pos++;
                  }
                  if (start < pos) {
                      var v = mapfn(array.slice(start, pos), previousKey, start, pos);
                      if (v) {
                          result.push(v);
                      }
                      start = pos;
                  }
                  previousKey = key;
                  pos++;
              }
          }
          return result;
      }
      ts.spanMap = spanMap;
      function mapEntries(map, f) {
          if (!map) {
              return undefined;
          }
          var result = createMap();
          map.forEach(function (value, key) {
              var _a = f(key, value), newKey = _a[0], newValue = _a[1];
              result.set(newKey, newValue);
          });
          return result;
      }
      ts.mapEntries = mapEntries;
      function some(array, predicate) {
          if (array) {
              if (predicate) {
                  for (var _i = 0, array_5 = array; _i < array_5.length; _i++) {
                      var v = array_5[_i];
                      if (predicate(v)) {
                          return true;
                      }
                  }
              }
              else {
                  return array.length > 0;
              }
          }
          return false;
      }
      ts.some = some;
      function concatenate(array1, array2) {
          if (!some(array2))
              return array1;
          if (!some(array1))
              return array2;
          return array1.concat(array2);
      }
      ts.concatenate = concatenate;
      // TODO: fixme (N^2) - add optional comparer so collection can be sorted before deduplication.
      function deduplicate(array, areEqual) {
          var result;
          if (array) {
              result = [];
              loop: for (var _i = 0, array_6 = array; _i < array_6.length; _i++) {
                  var item = array_6[_i];
                  for (var _a = 0, result_1 = result; _a < result_1.length; _a++) {
                      var res = result_1[_a];
                      if (areEqual ? areEqual(res, item) : res === item) {
                          continue loop;
                      }
                  }
                  result.push(item);
              }
          }
          return result;
      }
      ts.deduplicate = deduplicate;
      function arrayIsEqualTo(array1, array2, equaler) {
          if (!array1 || !array2) {
              return array1 === array2;
          }
          if (array1.length !== array2.length) {
              return false;
          }
          for (var i = 0; i < array1.length; i++) {
              var equals = equaler ? equaler(array1[i], array2[i]) : array1[i] === array2[i];
              if (!equals) {
                  return false;
              }
          }
          return true;
      }
      ts.arrayIsEqualTo = arrayIsEqualTo;
      function changesAffectModuleResolution(oldOptions, newOptions) {
          return !oldOptions ||
              (oldOptions.module !== newOptions.module) ||
              (oldOptions.moduleResolution !== newOptions.moduleResolution) ||
              (oldOptions.noResolve !== newOptions.noResolve) ||
              (oldOptions.target !== newOptions.target) ||
              (oldOptions.noLib !== newOptions.noLib) ||
              (oldOptions.jsx !== newOptions.jsx) ||
              (oldOptions.allowJs !== newOptions.allowJs) ||
              (oldOptions.rootDir !== newOptions.rootDir) ||
              (oldOptions.configFilePath !== newOptions.configFilePath) ||
              (oldOptions.baseUrl !== newOptions.baseUrl) ||
              (oldOptions.maxNodeModuleJsDepth !== newOptions.maxNodeModuleJsDepth) ||
              !arrayIsEqualTo(oldOptions.lib, newOptions.lib) ||
              !arrayIsEqualTo(oldOptions.typeRoots, newOptions.typeRoots) ||
              !arrayIsEqualTo(oldOptions.rootDirs, newOptions.rootDirs) ||
              !equalOwnProperties(oldOptions.paths, newOptions.paths);
      }
      ts.changesAffectModuleResolution = changesAffectModuleResolution;
      /**
       * Compacts an array, removing any falsey elements.
       */
      function compact(array) {
          var result;
          if (array) {
              for (var i = 0; i < array.length; i++) {
                  var v = array[i];
                  if (result || !v) {
                      if (!result) {
                          result = array.slice(0, i);
                      }
                      if (v) {
                          result.push(v);
                      }
                  }
              }
          }
          return result || array;
      }
      ts.compact = compact;
      /**
       * Gets the relative complement of `arrayA` with respect to `b`, returning the elements that
       * are not present in `arrayA` but are present in `arrayB`. Assumes both arrays are sorted
       * based on the provided comparer.
       */
      function relativeComplement(arrayA, arrayB, comparer, offsetA, offsetB) {
          if (comparer === void 0) { comparer = compareValues; }
          if (offsetA === void 0) { offsetA = 0; }
          if (offsetB === void 0) { offsetB = 0; }
          if (!arrayB || !arrayA || arrayB.length === 0 || arrayA.length === 0)
              return arrayB;
          var result = [];
          outer: for (; offsetB < arrayB.length; offsetB++) {
              inner: for (; offsetA < arrayA.length; offsetA++) {
                  switch (comparer(arrayB[offsetB], arrayA[offsetA])) {
                      case -1 /* LessThan */: break inner;
                      case 0 /* EqualTo */: continue outer;
                      case 1 /* GreaterThan */: continue inner;
                  }
              }
              result.push(arrayB[offsetB]);
          }
          return result;
      }
      ts.relativeComplement = relativeComplement;
      function sum(array, prop) {
          var result = 0;
          for (var _i = 0, array_7 = array; _i < array_7.length; _i++) {
              var v = array_7[_i];
              result += v[prop];
          }
          return result;
      }
      ts.sum = sum;
      /**
       * Appends a value to an array, returning the array.
       *
       * @param to The array to which `value` is to be appended. If `to` is `undefined`, a new array
       * is created if `value` was appended.
       * @param value The value to append to the array. If `value` is `undefined`, nothing is
       * appended.
       */
      function append(to, value) {
          if (value === undefined)
              return to;
          if (to === undefined)
              return [value];
          to.push(value);
          return to;
      }
      ts.append = append;
      /**
       * Appends a range of value to an array, returning the array.
       *
       * @param to The array to which `value` is to be appended. If `to` is `undefined`, a new array
       * is created if `value` was appended.
       * @param from The values to append to the array. If `from` is `undefined`, nothing is
       * appended. If an element of `from` is `undefined`, that element is not appended.
       */
      function addRange(to, from) {
          if (from === undefined)
              return to;
          for (var _i = 0, from_1 = from; _i < from_1.length; _i++) {
              var v = from_1[_i];
              to = append(to, v);
          }
          return to;
      }
      ts.addRange = addRange;
      /**
       * Stable sort of an array. Elements equal to each other maintain their relative position in the array.
       */
      function stableSort(array, comparer) {
          if (comparer === void 0) { comparer = compareValues; }
          return array
              .map(function (_, i) { return i; }) // create array of indices
              .sort(function (x, y) { return comparer(array[x], array[y]) || compareValues(x, y); }) // sort indices by value then position
              .map(function (i) { return array[i]; }); // get sorted array
      }
      ts.stableSort = stableSort;
      function rangeEquals(array1, array2, pos, end) {
          while (pos < end) {
              if (array1[pos] !== array2[pos]) {
                  return false;
              }
              pos++;
          }
          return true;
      }
      ts.rangeEquals = rangeEquals;
      /**
       * Returns the first element of an array if non-empty, `undefined` otherwise.
       */
      function firstOrUndefined(array) {
          return array && array.length > 0
              ? array[0]
              : undefined;
      }
      ts.firstOrUndefined = firstOrUndefined;
      /**
       * Returns the last element of an array if non-empty, `undefined` otherwise.
       */
      function lastOrUndefined(array) {
          return array && array.length > 0
              ? array[array.length - 1]
              : undefined;
      }
      ts.lastOrUndefined = lastOrUndefined;
      /**
       * Returns the only element of an array if it contains only one element, `undefined` otherwise.
       */
      function singleOrUndefined(array) {
          return array && array.length === 1
              ? array[0]
              : undefined;
      }
      ts.singleOrUndefined = singleOrUndefined;
      /**
       * Returns the only element of an array if it contains only one element; otheriwse, returns the
       * array.
       */
      function singleOrMany(array) {
          return array && array.length === 1
              ? array[0]
              : array;
      }
      ts.singleOrMany = singleOrMany;
      function replaceElement(array, index, value) {
          var result = array.slice(0);
          result[index] = value;
          return result;
      }
      ts.replaceElement = replaceElement;
      /**
       * Performs a binary search, finding the index at which 'value' occurs in 'array'.
       * If no such index is found, returns the 2's-complement of first index at which
       * number[index] exceeds number.
       * @param array A sorted array whose first element must be no larger than number
       * @param number The value to be searched for in the array.
       */
      function binarySearch(array, value, comparer, offset) {
          if (!array || array.length === 0) {
              return -1;
          }
          var low = offset || 0;
          var high = array.length - 1;
          comparer = comparer !== undefined
              ? comparer
              : function (v1, v2) { return (v1 < v2 ? -1 : (v1 > v2 ? 1 : 0)); };
          while (low <= high) {
              var middle = low + ((high - low) >> 1);
              var midValue = array[middle];
              if (comparer(midValue, value) === 0) {
                  return middle;
              }
              else if (comparer(midValue, value) > 0) {
                  high = middle - 1;
              }
              else {
                  low = middle + 1;
              }
          }
          return ~low;
      }
      ts.binarySearch = binarySearch;
      function reduceLeft(array, f, initial, start, count) {
          if (array && array.length > 0) {
              var size = array.length;
              if (size > 0) {
                  var pos = start === undefined || start < 0 ? 0 : start;
                  var end = count === undefined || pos + count > size - 1 ? size - 1 : pos + count;
                  var result = void 0;
                  if (arguments.length <= 2) {
                      result = array[pos];
                      pos++;
                  }
                  else {
                      result = initial;
                  }
                  while (pos <= end) {
                      result = f(result, array[pos], pos);
                      pos++;
                  }
                  return result;
              }
          }
          return initial;
      }
      ts.reduceLeft = reduceLeft;
      function reduceRight(array, f, initial, start, count) {
          if (array) {
              var size = array.length;
              if (size > 0) {
                  var pos = start === undefined || start > size - 1 ? size - 1 : start;
                  var end = count === undefined || pos - count < 0 ? 0 : pos - count;
                  var result = void 0;
                  if (arguments.length <= 2) {
                      result = array[pos];
                      pos--;
                  }
                  else {
                      result = initial;
                  }
                  while (pos >= end) {
                      result = f(result, array[pos], pos);
                      pos--;
                  }
                  return result;
              }
          }
          return initial;
      }
      ts.reduceRight = reduceRight;
      var hasOwnProperty = Object.prototype.hasOwnProperty;
      /**
       * Indicates whether a map-like contains an own property with the specified key.
       *
       * @param map A map-like.
       * @param key A property key.
       */
      function hasProperty(map, key) {
          return hasOwnProperty.call(map, key);
      }
      ts.hasProperty = hasProperty;
      /**
       * Gets the value of an owned property in a map-like.
       *
       * @param map A map-like.
       * @param key A property key.
       */
      function getProperty(map, key) {
          return hasOwnProperty.call(map, key) ? map[key] : undefined;
      }
      ts.getProperty = getProperty;
      /**
       * Gets the owned, enumerable property keys of a map-like.
       *
       * NOTE: This is intended for use with MapLike<T> objects. For Map<T> objects, use
       *       Object.keys instead as it offers better performance.
       *
       * @param map A map-like.
       */
      function getOwnKeys(map) {
          var keys = [];
          for (var key in map)
              if (hasOwnProperty.call(map, key)) {
                  keys.push(key);
              }
          return keys;
      }
      ts.getOwnKeys = getOwnKeys;
      /** Shims `Array.from`. */
      function arrayFrom(iterator) {
          var result = [];
          for (var _a = iterator.next(), value = _a.value, done = _a.done; !done; _b = iterator.next(), value = _b.value, done = _b.done, _b) {
              result.push(value);
          }
          return result;
          var _b;
      }
      ts.arrayFrom = arrayFrom;
      function convertToArray(iterator, f) {
          var result = [];
          for (var _a = iterator.next(), value = _a.value, done = _a.done; !done; _b = iterator.next(), value = _b.value, done = _b.done, _b) {
              result.push(f(value));
          }
          return result;
          var _b;
      }
      ts.convertToArray = convertToArray;
      /**
       * Calls `callback` for each entry in the map, returning the first truthy result.
       * Use `map.forEach` instead for normal iteration.
       */
      function forEachEntry(map, callback) {
          var iterator = map.entries();
          for (var _a = iterator.next(), pair = _a.value, done = _a.done; !done; _b = iterator.next(), pair = _b.value, done = _b.done, _b) {
              var key = pair[0], value = pair[1];
              var result = callback(value, key);
              if (result) {
                  return result;
              }
          }
          return undefined;
          var _b;
      }
      ts.forEachEntry = forEachEntry;
      /** `forEachEntry` for just keys. */
      function forEachKey(map, callback) {
          var iterator = map.keys();
          for (var _a = iterator.next(), key = _a.value, done = _a.done; !done; _b = iterator.next(), key = _b.value, done = _b.done, _b) {
              var result = callback(key);
              if (result) {
                  return result;
              }
          }
          return undefined;
          var _b;
      }
      ts.forEachKey = forEachKey;
      /** Copy entries from `source` to `target`. */
      function copyEntries(source, target) {
          source.forEach(function (value, key) {
              target.set(key, value);
          });
      }
      ts.copyEntries = copyEntries;
      function assign(t) {
          var args = [];
          for (var _i = 1; _i < arguments.length; _i++) {
              args[_i - 1] = arguments[_i];
          }
          for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {
              var arg = args_1[_a];
              for (var _b = 0, _c = getOwnKeys(arg); _b < _c.length; _b++) {
                  var p = _c[_b];
                  t[p] = arg[p];
              }
          }
          return t;
      }
      ts.assign = assign;
      /**
       * Performs a shallow equality comparison of the contents of two map-likes.
       *
       * @param left A map-like whose properties should be compared.
       * @param right A map-like whose properties should be compared.
       */
      function equalOwnProperties(left, right, equalityComparer) {
          if (left === right)
              return true;
          if (!left || !right)
              return false;
          for (var key in left)
              if (hasOwnProperty.call(left, key)) {
                  if (!hasOwnProperty.call(right, key) === undefined)
                      return false;
                  if (equalityComparer ? !equalityComparer(left[key], right[key]) : left[key] !== right[key])
                      return false;
              }
          for (var key in right)
              if (hasOwnProperty.call(right, key)) {
                  if (!hasOwnProperty.call(left, key))
                      return false;
              }
          return true;
      }
      ts.equalOwnProperties = equalOwnProperties;
      function arrayToMap(array, makeKey, makeValue) {
          var result = createMap();
          for (var _i = 0, array_8 = array; _i < array_8.length; _i++) {
              var value = array_8[_i];
              result.set(makeKey(value), makeValue ? makeValue(value) : value);
          }
          return result;
      }
      ts.arrayToMap = arrayToMap;
      function cloneMap(map) {
          var clone = createMap();
          copyEntries(map, clone);
          return clone;
      }
      ts.cloneMap = cloneMap;
      function clone(object) {
          var result = {};
          for (var id in object) {
              if (hasOwnProperty.call(object, id)) {
                  result[id] = object[id];
              }
          }
          return result;
      }
      ts.clone = clone;
      function extend(first, second) {
          var result = {};
          for (var id in second)
              if (hasOwnProperty.call(second, id)) {
                  result[id] = second[id];
              }
          for (var id in first)
              if (hasOwnProperty.call(first, id)) {
                  result[id] = first[id];
              }
          return result;
      }
      ts.extend = extend;
      function createMultiMap() {
          var map = createMap();
          map.add = multiMapAdd;
          map.remove = multiMapRemove;
          return map;
      }
      ts.createMultiMap = createMultiMap;
      function multiMapAdd(key, value) {
          var values = this.get(key);
          if (values) {
              values.push(value);
          }
          else {
              this.set(key, values = [value]);
          }
          return values;
      }
      function multiMapRemove(key, value) {
          var values = this.get(key);
          if (values) {
              unorderedRemoveItem(values, value);
              if (!values.length) {
                  this.delete(key);
              }
          }
      }
      /**
       * Tests whether a value is an array.
       */
      function isArray(value) {
          return Array.isArray ? Array.isArray(value) : value instanceof Array;
      }
      ts.isArray = isArray;
      /** Does nothing. */
      function noop() { }
      ts.noop = noop;
      /** Throws an error because a function is not implemented. */
      function notImplemented() {
          throw new Error("Not implemented");
      }
      ts.notImplemented = notImplemented;
      function memoize(callback) {
          var value;
          return function () {
              if (callback) {
                  value = callback();
                  callback = undefined;
              }
              return value;
          };
      }
      ts.memoize = memoize;
      function chain(a, b, c, d, e) {
          if (e) {
              var args_2 = [];
              for (var i = 0; i < arguments.length; i++) {
                  args_2[i] = arguments[i];
              }
              return function (t) { return compose.apply(void 0, map(args_2, function (f) { return f(t); })); };
          }
          else if (d) {
              return function (t) { return compose(a(t), b(t), c(t), d(t)); };
          }
          else if (c) {
              return function (t) { return compose(a(t), b(t), c(t)); };
          }
          else if (b) {
              return function (t) { return compose(a(t), b(t)); };
          }
          else if (a) {
              return function (t) { return compose(a(t)); };
          }
          else {
              return function (_) { return function (u) { return u; }; };
          }
      }
      ts.chain = chain;
      function compose(a, b, c, d, e) {
          if (e) {
              var args_3 = [];
              for (var i = 0; i < arguments.length; i++) {
                  args_3[i] = arguments[i];
              }
              return function (t) { return reduceLeft(args_3, function (u, f) { return f(u); }, t); };
          }
          else if (d) {
              return function (t) { return d(c(b(a(t)))); };
          }
          else if (c) {
              return function (t) { return c(b(a(t))); };
          }
          else if (b) {
              return function (t) { return b(a(t)); };
          }
          else if (a) {
              return function (t) { return a(t); };
          }
          else {
              return function (t) { return t; };
          }
      }
      ts.compose = compose;
      function formatStringFromArgs(text, args, baseIndex) {
          baseIndex = baseIndex || 0;
          return text.replace(/\{(\d+)\}/g, function (_match, index) { return args[+index + baseIndex]; });
      }
      ts.formatStringFromArgs = formatStringFromArgs;
      ts.localizedDiagnosticMessages = undefined;
      function getLocaleSpecificMessage(message) {
          return ts.localizedDiagnosticMessages && ts.localizedDiagnosticMessages[message.key] || message.message;
      }
      ts.getLocaleSpecificMessage = getLocaleSpecificMessage;
      function createFileDiagnostic(file, start, length, message) {
          var end = start + length;
          Debug.assert(start >= 0, "start must be non-negative, is " + start);
          Debug.assert(length >= 0, "length must be non-negative, is " + length);
          if (file) {
              Debug.assert(start <= file.text.length, "start must be within the bounds of the file. " + start + " > " + file.text.length);
              Debug.assert(end <= file.text.length, "end must be the bounds of the file. " + end + " > " + file.text.length);
          }
          var text = getLocaleSpecificMessage(message);
          if (arguments.length > 4) {
              text = formatStringFromArgs(text, arguments, 4);
          }
          return {
              file: file,
              start: start,
              length: length,
              messageText: text,
              category: message.category,
              code: message.code,
          };
      }
      ts.createFileDiagnostic = createFileDiagnostic;
      /* internal */
      function formatMessage(_dummy, message) {
          var text = getLocaleSpecificMessage(message);
          if (arguments.length > 2) {
              text = formatStringFromArgs(text, arguments, 2);
          }
          return text;
      }
      ts.formatMessage = formatMessage;
      function createCompilerDiagnostic(message) {
          var text = getLocaleSpecificMessage(message);
          if (arguments.length > 1) {
              text = formatStringFromArgs(text, arguments, 1);
          }
          return {
              file: undefined,
              start: undefined,
              length: undefined,
              messageText: text,
              category: message.category,
              code: message.code
          };
      }
      ts.createCompilerDiagnostic = createCompilerDiagnostic;
      function createCompilerDiagnosticFromMessageChain(chain) {
          return {
              file: undefined,
              start: undefined,
              length: undefined,
              code: chain.code,
              category: chain.category,
              messageText: chain.next ? chain : chain.messageText
          };
      }
      ts.createCompilerDiagnosticFromMessageChain = createCompilerDiagnosticFromMessageChain;
      function chainDiagnosticMessages(details, message) {
          var text = getLocaleSpecificMessage(message);
          if (arguments.length > 2) {
              text = formatStringFromArgs(text, arguments, 2);
          }
          return {
              messageText: text,
              category: message.category,
              code: message.code,
              next: details
          };
      }
      ts.chainDiagnosticMessages = chainDiagnosticMessages;
      function concatenateDiagnosticMessageChains(headChain, tailChain) {
          var lastChain = headChain;
          while (lastChain.next) {
              lastChain = lastChain.next;
          }
          lastChain.next = tailChain;
          return headChain;
      }
      ts.concatenateDiagnosticMessageChains = concatenateDiagnosticMessageChains;
      function compareValues(a, b) {
          if (a === b)
              return 0 /* EqualTo */;
          if (a === undefined)
              return -1 /* LessThan */;
          if (b === undefined)
              return 1 /* GreaterThan */;
          return a < b ? -1 /* LessThan */ : 1 /* GreaterThan */;
      }
      ts.compareValues = compareValues;
      function compareStrings(a, b, ignoreCase) {
          if (a === b)
              return 0 /* EqualTo */;
          if (a === undefined)
              return -1 /* LessThan */;
          if (b === undefined)
              return 1 /* GreaterThan */;
          if (ignoreCase) {
              // Checking if "collator exists indicates that Intl is available.
              // We still have to check if "collator.compare" is correct. If it is not, use "String.localeComapre"
              if (ts.collator) {
                  var result = ts.localeCompareIsCorrect ?
                      ts.collator.compare(a, b) :
                      a.localeCompare(b, /*locales*/ undefined, { usage: "sort", sensitivity: "accent" }); // accent means a ≠ b, a ≠ á, a = A
                  return result < 0 ? -1 /* LessThan */ : result > 0 ? 1 /* GreaterThan */ : 0 /* EqualTo */;
              }
              a = a.toUpperCase();
              b = b.toUpperCase();
              if (a === b)
                  return 0 /* EqualTo */;
          }
          return a < b ? -1 /* LessThan */ : 1 /* GreaterThan */;
      }
      ts.compareStrings = compareStrings;
      function compareStringsCaseInsensitive(a, b) {
          return compareStrings(a, b, /*ignoreCase*/ true);
      }
      ts.compareStringsCaseInsensitive = compareStringsCaseInsensitive;
      function getDiagnosticFileName(diagnostic) {
          return diagnostic.file ? diagnostic.file.fileName : undefined;
      }
      function compareDiagnostics(d1, d2) {
          return compareValues(getDiagnosticFileName(d1), getDiagnosticFileName(d2)) ||
              compareValues(d1.start, d2.start) ||
              compareValues(d1.length, d2.length) ||
              compareValues(d1.code, d2.code) ||
              compareMessageText(d1.messageText, d2.messageText) ||
              0 /* EqualTo */;
      }
      ts.compareDiagnostics = compareDiagnostics;
      function compareMessageText(text1, text2) {
          while (text1 && text2) {
              // We still have both chains.
              var string1 = typeof text1 === "string" ? text1 : text1.messageText;
              var string2 = typeof text2 === "string" ? text2 : text2.messageText;
              var res = compareValues(string1, string2);
              if (res) {
                  return res;
              }
              text1 = typeof text1 === "string" ? undefined : text1.next;
              text2 = typeof text2 === "string" ? undefined : text2.next;
          }
          if (!text1 && !text2) {
              // if the chains are done, then these messages are the same.
              return 0 /* EqualTo */;
          }
          // We still have one chain remaining.  The shorter chain should come first.
          return text1 ? 1 /* GreaterThan */ : -1 /* LessThan */;
      }
      function sortAndDeduplicateDiagnostics(diagnostics) {
          return deduplicateSortedDiagnostics(diagnostics.sort(compareDiagnostics));
      }
      ts.sortAndDeduplicateDiagnostics = sortAndDeduplicateDiagnostics;
      function deduplicateSortedDiagnostics(diagnostics) {
          if (diagnostics.length < 2) {
              return diagnostics;
          }
          var newDiagnostics = [diagnostics[0]];
          var previousDiagnostic = diagnostics[0];
          for (var i = 1; i < diagnostics.length; i++) {
              var currentDiagnostic = diagnostics[i];
              var isDupe = compareDiagnostics(currentDiagnostic, previousDiagnostic) === 0 /* EqualTo */;
              if (!isDupe) {
                  newDiagnostics.push(currentDiagnostic);
                  previousDiagnostic = currentDiagnostic;
              }
          }
          return newDiagnostics;
      }
      ts.deduplicateSortedDiagnostics = deduplicateSortedDiagnostics;
      function normalizeSlashes(path) {
          return path.replace(/\\/g, "/");
      }
      ts.normalizeSlashes = normalizeSlashes;
      /**
       * Returns length of path root (i.e. length of "/", "x:/", "//server/share/, file:///user/files")
      */
      function getRootLength(path) {
          if (path.charCodeAt(0) === 47 /* slash */) {
              if (path.charCodeAt(1) !== 47 /* slash */)
                  return 1;
              var p1 = path.indexOf("/", 2);
              if (p1 < 0)
                  return 2;
              var p2 = path.indexOf("/", p1 + 1);
              if (p2 < 0)
                  return p1 + 1;
              return p2 + 1;
          }
          if (path.charCodeAt(1) === 58 /* colon */) {
              if (path.charCodeAt(2) === 47 /* slash */)
                  return 3;
              return 2;
          }
          // Per RFC 1738 'file' URI schema has the shape file://<host>/<path>
          // if <host> is omitted then it is assumed that host value is 'localhost',
          // however slash after the omitted <host> is not removed.
          // file:///folder1/file1 - this is a correct URI
          // file://folder2/file2 - this is an incorrect URI
          if (path.lastIndexOf("file:///", 0) === 0) {
              return "file:///".length;
          }
          var idx = path.indexOf("://");
          if (idx !== -1) {
              return idx + "://".length;
          }
          return 0;
      }
      ts.getRootLength = getRootLength;
      /**
       * Internally, we represent paths as strings with '/' as the directory separator.
       * When we make system calls (eg: LanguageServiceHost.getDirectory()),
       * we expect the host to correctly handle paths in our specified format.
       */
      ts.directorySeparator = "/";
      var directorySeparatorCharCode = 47 /* slash */;
      function getNormalizedParts(normalizedSlashedPath, rootLength) {
          var parts = normalizedSlashedPath.substr(rootLength).split(ts.directorySeparator);
          var normalized = [];
          for (var _i = 0, parts_1 = parts; _i < parts_1.length; _i++) {
              var part = parts_1[_i];
              if (part !== ".") {
                  if (part === ".." && normalized.length > 0 && lastOrUndefined(normalized) !== "..") {
                      normalized.pop();
                  }
                  else {
                      // A part may be an empty string (which is 'falsy') if the path had consecutive slashes,
                      // e.g. "path//file.ts".  Drop these before re-joining the parts.
                      if (part) {
                          normalized.push(part);
                      }
                  }
              }
          }
          return normalized;
      }
      function normalizePath(path) {
          path = normalizeSlashes(path);
          var rootLength = getRootLength(path);
          var root = path.substr(0, rootLength);
          var normalized = getNormalizedParts(path, rootLength);
          if (normalized.length) {
              var joinedParts = root + normalized.join(ts.directorySeparator);
              return pathEndsWithDirectorySeparator(path) ? joinedParts + ts.directorySeparator : joinedParts;
          }
          else {
              return root;
          }
      }
      ts.normalizePath = normalizePath;
      /** A path ending with '/' refers to a directory only, never a file. */
      function pathEndsWithDirectorySeparator(path) {
          return path.charCodeAt(path.length - 1) === directorySeparatorCharCode;
      }
      ts.pathEndsWithDirectorySeparator = pathEndsWithDirectorySeparator;
      function getDirectoryPath(path) {
          return path.substr(0, Math.max(getRootLength(path), path.lastIndexOf(ts.directorySeparator)));
      }
      ts.getDirectoryPath = getDirectoryPath;
      function isUrl(path) {
          return path && !isRootedDiskPath(path) && path.indexOf("://") !== -1;
      }
      ts.isUrl = isUrl;
      function isExternalModuleNameRelative(moduleName) {
          // TypeScript 1.0 spec (April 2014): 11.2.1
          // An external module name is "relative" if the first term is "." or "..".
          return /^\.\.?($|[\\\/])/.test(moduleName);
      }
      ts.isExternalModuleNameRelative = isExternalModuleNameRelative;
      function getEmitScriptTarget(compilerOptions) {
          return compilerOptions.target || 0 /* ES3 */;
      }
      ts.getEmitScriptTarget = getEmitScriptTarget;
      function getEmitModuleKind(compilerOptions) {
          return typeof compilerOptions.module === "number" ?
              compilerOptions.module :
              getEmitScriptTarget(compilerOptions) >= 2 /* ES2015 */ ? ts.ModuleKind.ES2015 : ts.ModuleKind.CommonJS;
      }
      ts.getEmitModuleKind = getEmitModuleKind;
      function getEmitModuleResolutionKind(compilerOptions) {
          var moduleResolution = compilerOptions.moduleResolution;
          if (moduleResolution === undefined) {
              moduleResolution = getEmitModuleKind(compilerOptions) === ts.ModuleKind.CommonJS ? ts.ModuleResolutionKind.NodeJs : ts.ModuleResolutionKind.Classic;
          }
          return moduleResolution;
      }
      ts.getEmitModuleResolutionKind = getEmitModuleResolutionKind;
      /* @internal */
      function hasZeroOrOneAsteriskCharacter(str) {
          var seenAsterisk = false;
          for (var i = 0; i < str.length; i++) {
              if (str.charCodeAt(i) === 42 /* asterisk */) {
                  if (!seenAsterisk) {
                      seenAsterisk = true;
                  }
                  else {
                      // have already seen asterisk
                      return false;
                  }
              }
          }
          return true;
      }
      ts.hasZeroOrOneAsteriskCharacter = hasZeroOrOneAsteriskCharacter;
      function isRootedDiskPath(path) {
          return getRootLength(path) !== 0;
      }
      ts.isRootedDiskPath = isRootedDiskPath;
      function convertToRelativePath(absoluteOrRelativePath, basePath, getCanonicalFileName) {
          return !isRootedDiskPath(absoluteOrRelativePath)
              ? absoluteOrRelativePath
              : getRelativePathToDirectoryOrUrl(basePath, absoluteOrRelativePath, basePath, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false);
      }
      ts.convertToRelativePath = convertToRelativePath;
      function normalizedPathComponents(path, rootLength) {
          var normalizedParts = getNormalizedParts(path, rootLength);
          return [path.substr(0, rootLength)].concat(normalizedParts);
      }
      function getNormalizedPathComponents(path, currentDirectory) {
          path = normalizeSlashes(path);
          var rootLength = getRootLength(path);
          if (rootLength === 0) {
              // If the path is not rooted it is relative to current directory
              path = combinePaths(normalizeSlashes(currentDirectory), path);
              rootLength = getRootLength(path);
          }
          return normalizedPathComponents(path, rootLength);
      }
      ts.getNormalizedPathComponents = getNormalizedPathComponents;
      function getNormalizedAbsolutePath(fileName, currentDirectory) {
          return getNormalizedPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory));
      }
      ts.getNormalizedAbsolutePath = getNormalizedAbsolutePath;
      function getNormalizedPathFromPathComponents(pathComponents) {
          if (pathComponents && pathComponents.length) {
              return pathComponents[0] + pathComponents.slice(1).join(ts.directorySeparator);
          }
      }
      ts.getNormalizedPathFromPathComponents = getNormalizedPathFromPathComponents;
      function getNormalizedPathComponentsOfUrl(url) {
          // Get root length of http://www.website.com/folder1/folder2/
          // In this example the root is:  http://www.website.com/
          // normalized path components should be ["http://www.website.com/", "folder1", "folder2"]
          var urlLength = url.length;
          // Initial root length is http:// part
          var rootLength = url.indexOf("://") + "://".length;
          while (rootLength < urlLength) {
              // Consume all immediate slashes in the protocol
              // eg.initial rootlength is just file:// but it needs to consume another "/" in file:///
              if (url.charCodeAt(rootLength) === 47 /* slash */) {
                  rootLength++;
              }
              else {
                  // non slash character means we continue proceeding to next component of root search
                  break;
              }
          }
          // there are no parts after http:// just return current string as the pathComponent
          if (rootLength === urlLength) {
              return [url];
          }
          // Find the index of "/" after website.com so the root can be http://www.website.com/ (from existing http://)
          var indexOfNextSlash = url.indexOf(ts.directorySeparator, rootLength);
          if (indexOfNextSlash !== -1) {
              // Found the "/" after the website.com so the root is length of http://www.website.com/
              // and get components after the root normally like any other folder components
              rootLength = indexOfNextSlash + 1;
              return normalizedPathComponents(url, rootLength);
          }
          else {
              // Can't find the host assume the rest of the string as component
              // but make sure we append "/"  to it as root is not joined using "/"
              // eg. if url passed in was http://website.com we want to use root as [http://website.com/]
              // so that other path manipulations will be correct and it can be merged with relative paths correctly
              return [url + ts.directorySeparator];
          }
      }
      function getNormalizedPathOrUrlComponents(pathOrUrl, currentDirectory) {
          if (isUrl(pathOrUrl)) {
              return getNormalizedPathComponentsOfUrl(pathOrUrl);
          }
          else {
              return getNormalizedPathComponents(pathOrUrl, currentDirectory);
          }
      }
      function getRelativePathToDirectoryOrUrl(directoryPathOrUrl, relativeOrAbsolutePath, currentDirectory, getCanonicalFileName, isAbsolutePathAnUrl) {
          var pathComponents = getNormalizedPathOrUrlComponents(relativeOrAbsolutePath, currentDirectory);
          var directoryComponents = getNormalizedPathOrUrlComponents(directoryPathOrUrl, currentDirectory);
          if (directoryComponents.length > 1 && lastOrUndefined(directoryComponents) === "") {
              // If the directory path given was of type test/cases/ then we really need components of directory to be only till its name
              // that is  ["test", "cases", ""] needs to be actually ["test", "cases"]
              directoryComponents.length--;
          }
          // Find the component that differs
          var joinStartIndex;
          for (joinStartIndex = 0; joinStartIndex < pathComponents.length && joinStartIndex < directoryComponents.length; joinStartIndex++) {
              if (getCanonicalFileName(directoryComponents[joinStartIndex]) !== getCanonicalFileName(pathComponents[joinStartIndex])) {
                  break;
              }
          }
          // Get the relative path
          if (joinStartIndex) {
              var relativePath = "";
              var relativePathComponents = pathComponents.slice(joinStartIndex, pathComponents.length);
              for (; joinStartIndex < directoryComponents.length; joinStartIndex++) {
                  if (directoryComponents[joinStartIndex] !== "") {
                      relativePath = relativePath + ".." + ts.directorySeparator;
                  }
              }
              return relativePath + relativePathComponents.join(ts.directorySeparator);
          }
          // Cant find the relative path, get the absolute path
          var absolutePath = getNormalizedPathFromPathComponents(pathComponents);
          if (isAbsolutePathAnUrl && isRootedDiskPath(absolutePath)) {
              absolutePath = "file:///" + absolutePath;
          }
          return absolutePath;
      }
      ts.getRelativePathToDirectoryOrUrl = getRelativePathToDirectoryOrUrl;
      function getBaseFileName(path) {
          if (path === undefined) {
              return undefined;
          }
          var i = path.lastIndexOf(ts.directorySeparator);
          return i < 0 ? path : path.substring(i + 1);
      }
      ts.getBaseFileName = getBaseFileName;
      function combinePaths(path1, path2) {
          if (!(path1 && path1.length))
              return path2;
          if (!(path2 && path2.length))
              return path1;
          if (getRootLength(path2) !== 0)
              return path2;
          if (path1.charAt(path1.length - 1) === ts.directorySeparator)
              return path1 + path2;
          return path1 + ts.directorySeparator + path2;
      }
      ts.combinePaths = combinePaths;
      /**
       * Removes a trailing directory separator from a path.
       * @param path The path.
       */
      function removeTrailingDirectorySeparator(path) {
          if (path.charAt(path.length - 1) === ts.directorySeparator) {
              return path.substr(0, path.length - 1);
          }
          return path;
      }
      ts.removeTrailingDirectorySeparator = removeTrailingDirectorySeparator;
      /**
       * Adds a trailing directory separator to a path, if it does not already have one.
       * @param path The path.
       */
      function ensureTrailingDirectorySeparator(path) {
          if (path.charAt(path.length - 1) !== ts.directorySeparator) {
              return path + ts.directorySeparator;
          }
          return path;
      }
      ts.ensureTrailingDirectorySeparator = ensureTrailingDirectorySeparator;
      function comparePaths(a, b, currentDirectory, ignoreCase) {
          if (a === b)
              return 0 /* EqualTo */;
          if (a === undefined)
              return -1 /* LessThan */;
          if (b === undefined)
              return 1 /* GreaterThan */;
          a = removeTrailingDirectorySeparator(a);
          b = removeTrailingDirectorySeparator(b);
          var aComponents = getNormalizedPathComponents(a, currentDirectory);
          var bComponents = getNormalizedPathComponents(b, currentDirectory);
          var sharedLength = Math.min(aComponents.length, bComponents.length);
          for (var i = 0; i < sharedLength; i++) {
              var result = compareStrings(aComponents[i], bComponents[i], ignoreCase);
              if (result !== 0 /* EqualTo */) {
                  return result;
              }
          }
          return compareValues(aComponents.length, bComponents.length);
      }
      ts.comparePaths = comparePaths;
      function containsPath(parent, child, currentDirectory, ignoreCase) {
          if (parent === undefined || child === undefined)
              return false;
          if (parent === child)
              return true;
          parent = removeTrailingDirectorySeparator(parent);
          child = removeTrailingDirectorySeparator(child);
          if (parent === child)
              return true;
          var parentComponents = getNormalizedPathComponents(parent, currentDirectory);
          var childComponents = getNormalizedPathComponents(child, currentDirectory);
          if (childComponents.length < parentComponents.length) {
              return false;
          }
          for (var i = 0; i < parentComponents.length; i++) {
              var result = compareStrings(parentComponents[i], childComponents[i], ignoreCase);
              if (result !== 0 /* EqualTo */) {
                  return false;
              }
          }
          return true;
      }
      ts.containsPath = containsPath;
      /* @internal */
      function startsWith(str, prefix) {
          return str.lastIndexOf(prefix, 0) === 0;
      }
      ts.startsWith = startsWith;
      /* @internal */
      function endsWith(str, suffix) {
          var expectedPos = str.length - suffix.length;
          return expectedPos >= 0 && str.indexOf(suffix, expectedPos) === expectedPos;
      }
      ts.endsWith = endsWith;
      function hasExtension(fileName) {
          return getBaseFileName(fileName).indexOf(".") >= 0;
      }
      ts.hasExtension = hasExtension;
      function fileExtensionIs(path, extension) {
          return path.length > extension.length && endsWith(path, extension);
      }
      ts.fileExtensionIs = fileExtensionIs;
      function fileExtensionIsAny(path, extensions) {
          for (var _i = 0, extensions_1 = extensions; _i < extensions_1.length; _i++) {
              var extension = extensions_1[_i];
              if (fileExtensionIs(path, extension)) {
                  return true;
              }
          }
          return false;
      }
      ts.fileExtensionIsAny = fileExtensionIsAny;
      // Reserved characters, forces escaping of any non-word (or digit), non-whitespace character.
      // It may be inefficient (we could just match (/[-[\]{}()*+?.,\\^$|#\s]/g), but this is future
      // proof.
      var reservedCharacterPattern = /[^\w\s\/]/g;
      var wildcardCharCodes = [42 /* asterisk */, 63 /* question */];
      /**
       * Matches any single directory segment unless it is the last segment and a .min.js file
       * Breakdown:
       *  [^./]                   # matches everything up to the first . character (excluding directory seperators)
       *  (\\.(?!min\\.js$))?     # matches . characters but not if they are part of the .min.js file extension
       */
      var singleAsteriskRegexFragmentFiles = "([^./]|(\\.(?!min\\.js$))?)*";
      var singleAsteriskRegexFragmentOther = "[^/]*";
      function getRegularExpressionForWildcard(specs, basePath, usage) {
          var patterns = getRegularExpressionsForWildcards(specs, basePath, usage);
          if (!patterns || !patterns.length) {
              return undefined;
          }
          var pattern = patterns.map(function (pattern) { return "(" + pattern + ")"; }).join("|");
          // If excluding, match "foo/bar/baz...", but if including, only allow "foo".
          var terminator = usage === "exclude" ? "($|/)" : "$";
          return "^(" + pattern + ")" + terminator;
      }
      ts.getRegularExpressionForWildcard = getRegularExpressionForWildcard;
      function getRegularExpressionsForWildcards(specs, basePath, usage) {
          if (specs === undefined || specs.length === 0) {
              return undefined;
          }
          var replaceWildcardCharacter = usage === "files" ? replaceWildCardCharacterFiles : replaceWildCardCharacterOther;
          var singleAsteriskRegexFragment = usage === "files" ? singleAsteriskRegexFragmentFiles : singleAsteriskRegexFragmentOther;
          /**
           * Regex for the ** wildcard. Matches any number of subdirectories. When used for including
           * files or directories, does not match subdirectories that start with a . character
           */
          var doubleAsteriskRegexFragment = usage === "exclude" ? "(/.+?)?" : "(/[^/.][^/]*)*?";
          return flatMap(specs, function (spec) {
              return spec && getSubPatternFromSpec(spec, basePath, usage, singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter);
          });
      }
      /**
       * An "includes" path "foo" is implicitly a glob "foo/** /*" (without the space) if its last component has no extension,
       * and does not contain any glob characters itself.
       */
      function isImplicitGlob(lastPathComponent) {
          return !/[.*?]/.test(lastPathComponent);
      }
      ts.isImplicitGlob = isImplicitGlob;
      function getSubPatternFromSpec(spec, basePath, usage, singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter) {
          var subpattern = "";
          var hasRecursiveDirectoryWildcard = false;
          var hasWrittenComponent = false;
          var components = getNormalizedPathComponents(spec, basePath);
          var lastComponent = lastOrUndefined(components);
          if (usage !== "exclude" && lastComponent === "**") {
              return undefined;
          }
          // getNormalizedPathComponents includes the separator for the root component.
          // We need to remove to create our regex correctly.
          components[0] = removeTrailingDirectorySeparator(components[0]);
          if (isImplicitGlob(lastComponent)) {
              components.push("**", "*");
          }
          var optionalCount = 0;
          for (var _i = 0, components_1 = components; _i < components_1.length; _i++) {
              var component = components_1[_i];
              if (component === "**") {
                  if (hasRecursiveDirectoryWildcard) {
                      return undefined;
                  }
                  subpattern += doubleAsteriskRegexFragment;
                  hasRecursiveDirectoryWildcard = true;
              }
              else {
                  if (usage === "directories") {
                      subpattern += "(";
                      optionalCount++;
                  }
                  if (hasWrittenComponent) {
                      subpattern += ts.directorySeparator;
                  }
                  if (usage !== "exclude") {
                      // The * and ? wildcards should not match directories or files that start with . if they
                      // appear first in a component. Dotted directories and files can be included explicitly
                      // like so: **/.*/.*
                      if (component.charCodeAt(0) === 42 /* asterisk */) {
                          subpattern += "([^./]" + singleAsteriskRegexFragment + ")?";
                          component = component.substr(1);
                      }
                      else if (component.charCodeAt(0) === 63 /* question */) {
                          subpattern += "[^./]";
                          component = component.substr(1);
                      }
                  }
                  subpattern += component.replace(reservedCharacterPattern, replaceWildcardCharacter);
              }
              hasWrittenComponent = true;
          }
          while (optionalCount > 0) {
              subpattern += ")?";
              optionalCount--;
          }
          return subpattern;
      }
      function replaceWildCardCharacterFiles(match) {
          return replaceWildcardCharacter(match, singleAsteriskRegexFragmentFiles);
      }
      function replaceWildCardCharacterOther(match) {
          return replaceWildcardCharacter(match, singleAsteriskRegexFragmentOther);
      }
      function replaceWildcardCharacter(match, singleAsteriskRegexFragment) {
          return match === "*" ? singleAsteriskRegexFragment : match === "?" ? "[^/]" : "\\" + match;
      }
      function getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory) {
          path = normalizePath(path);
          currentDirectory = normalizePath(currentDirectory);
          var absolutePath = combinePaths(currentDirectory, path);
          return {
              includeFilePatterns: map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^" + pattern + "$"; }),
              includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
              includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
              excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
              basePaths: getBasePaths(path, includes, useCaseSensitiveFileNames)
          };
      }
      ts.getFileMatcherPatterns = getFileMatcherPatterns;
      function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, getFileSystemEntries) {
          path = normalizePath(path);
          currentDirectory = normalizePath(currentDirectory);
          var patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory);
          var regexFlag = useCaseSensitiveFileNames ? "" : "i";
          var includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map(function (pattern) { return new RegExp(pattern, regexFlag); });
          var includeDirectoryRegex = patterns.includeDirectoryPattern && new RegExp(patterns.includeDirectoryPattern, regexFlag);
          var excludeRegex = patterns.excludePattern && new RegExp(patterns.excludePattern, regexFlag);
          // Associate an array of results with each include regex. This keeps results in order of the "include" order.
          // If there are no "includes", then just put everything in results[0].
          var results = includeFileRegexes ? includeFileRegexes.map(function () { return []; }) : [[]];
          var comparer = useCaseSensitiveFileNames ? compareStrings : compareStringsCaseInsensitive;
          for (var _i = 0, _a = patterns.basePaths; _i < _a.length; _i++) {
              var basePath = _a[_i];
              visitDirectory(basePath, combinePaths(currentDirectory, basePath));
          }
          return flatten(results);
          function visitDirectory(path, absolutePath) {
              var _a = getFileSystemEntries(path), files = _a.files, directories = _a.directories;
              files = files.slice().sort(comparer);
              directories = directories.slice().sort(comparer);
              var _loop_1 = function (current) {
                  var name = combinePaths(path, current);
                  var absoluteName = combinePaths(absolutePath, current);
                  if (extensions && !fileExtensionIsAny(name, extensions))
                      return "continue";
                  if (excludeRegex && excludeRegex.test(absoluteName))
                      return "continue";
                  if (!includeFileRegexes) {
                      results[0].push(name);
                  }
                  else {
                      var includeIndex = findIndex(includeFileRegexes, function (re) { return re.test(absoluteName); });
                      if (includeIndex !== -1) {
                          results[includeIndex].push(name);
                      }
                  }
              };
              for (var _i = 0, files_1 = files; _i < files_1.length; _i++) {
                  var current = files_1[_i];
                  _loop_1(current);
              }
              for (var _b = 0, directories_1 = directories; _b < directories_1.length; _b++) {
                  var current = directories_1[_b];
                  var name = combinePaths(path, current);
                  var absoluteName = combinePaths(absolutePath, current);
                  if ((!includeDirectoryRegex || includeDirectoryRegex.test(absoluteName)) &&
                      (!excludeRegex || !excludeRegex.test(absoluteName))) {
                      visitDirectory(name, absoluteName);
                  }
              }
          }
      }
      ts.matchFiles = matchFiles;
      /**
       * Computes the unique non-wildcard base paths amongst the provided include patterns.
       */
      function getBasePaths(path, includes, useCaseSensitiveFileNames) {
          // Storage for our results in the form of literal paths (e.g. the paths as written by the user).
          var basePaths = [path];
          if (includes) {
              // Storage for literal base paths amongst the include patterns.
              var includeBasePaths = [];
              for (var _i = 0, includes_1 = includes; _i < includes_1.length; _i++) {
                  var include = includes_1[_i];
                  // We also need to check the relative paths by converting them to absolute and normalizing
                  // in case they escape the base path (e.g "..\somedirectory")
                  var absolute = isRootedDiskPath(include) ? include : normalizePath(combinePaths(path, include));
                  // Append the literal and canonical candidate base paths.
                  includeBasePaths.push(getIncludeBasePath(absolute));
              }
              // Sort the offsets array using either the literal or canonical path representations.
              includeBasePaths.sort(useCaseSensitiveFileNames ? compareStrings : compareStringsCaseInsensitive);
              var _loop_2 = function (includeBasePath) {
                  if (ts.every(basePaths, function (basePath) { return !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames); })) {
                      basePaths.push(includeBasePath);
                  }
              };
              // Iterate over each include base path and include unique base paths that are not a
              // subpath of an existing base path
              for (var _a = 0, includeBasePaths_1 = includeBasePaths; _a < includeBasePaths_1.length; _a++) {
                  var includeBasePath = includeBasePaths_1[_a];
                  _loop_2(includeBasePath);
              }
          }
          return basePaths;
      }
      function getIncludeBasePath(absolute) {
          var wildcardOffset = indexOfAnyCharCode(absolute, wildcardCharCodes);
          if (wildcardOffset < 0) {
              // No "*" or "?" in the path
              return !hasExtension(absolute)
                  ? absolute
                  : removeTrailingDirectorySeparator(getDirectoryPath(absolute));
          }
          return absolute.substring(0, absolute.lastIndexOf(ts.directorySeparator, wildcardOffset));
      }
      function ensureScriptKind(fileName, scriptKind) {
          // Using scriptKind as a condition handles both:
          // - 'scriptKind' is unspecified and thus it is `undefined`
          // - 'scriptKind' is set and it is `Unknown` (0)
          // If the 'scriptKind' is 'undefined' or 'Unknown' then we attempt
          // to get the ScriptKind from the file name. If it cannot be resolved
          // from the file name then the default 'TS' script kind is returned.
          return (scriptKind || getScriptKindFromFileName(fileName)) || 3 /* TS */;
      }
      ts.ensureScriptKind = ensureScriptKind;
      function getScriptKindFromFileName(fileName) {
          var ext = fileName.substr(fileName.lastIndexOf("."));
          switch (ext.toLowerCase()) {
              case ".js":
                  return 1 /* JS */;
              case ".jsx":
                  return 2 /* JSX */;
              case ".ts":
                  return 3 /* TS */;
              case ".tsx":
                  return 4 /* TSX */;
              default:
                  return 0 /* Unknown */;
          }
      }
      ts.getScriptKindFromFileName = getScriptKindFromFileName;
      /**
       *  List of supported extensions in order of file resolution precedence.
       */
      ts.supportedTypeScriptExtensions = [".ts", ".tsx", ".d.ts"];
      /** Must have ".d.ts" first because if ".ts" goes first, that will be detected as the extension instead of ".d.ts". */
      ts.supportedTypescriptExtensionsForExtractExtension = [".d.ts", ".ts", ".tsx"];
      ts.supportedJavascriptExtensions = [".js", ".jsx"];
      var allSupportedExtensions = ts.supportedTypeScriptExtensions.concat(ts.supportedJavascriptExtensions);
      function getSupportedExtensions(options, extraFileExtensions) {
          var needAllExtensions = options && options.allowJs;
          if (!extraFileExtensions || extraFileExtensions.length === 0 || !needAllExtensions) {
              return needAllExtensions ? allSupportedExtensions : ts.supportedTypeScriptExtensions;
          }
          var extensions = allSupportedExtensions.slice(0);
          for (var _i = 0, extraFileExtensions_1 = extraFileExtensions; _i < extraFileExtensions_1.length; _i++) {
              var extInfo = extraFileExtensions_1[_i];
              if (extensions.indexOf(extInfo.extension) === -1) {
                  extensions.push(extInfo.extension);
              }
          }
          return extensions;
      }
      ts.getSupportedExtensions = getSupportedExtensions;
      function hasJavaScriptFileExtension(fileName) {
          return forEach(ts.supportedJavascriptExtensions, function (extension) { return fileExtensionIs(fileName, extension); });
      }
      ts.hasJavaScriptFileExtension = hasJavaScriptFileExtension;
      function hasTypeScriptFileExtension(fileName) {
          return forEach(ts.supportedTypeScriptExtensions, function (extension) { return fileExtensionIs(fileName, extension); });
      }
      ts.hasTypeScriptFileExtension = hasTypeScriptFileExtension;
      function isSupportedSourceFileName(fileName, compilerOptions, extraFileExtensions) {
          if (!fileName) {
              return false;
          }
          for (var _i = 0, _a = getSupportedExtensions(compilerOptions, extraFileExtensions); _i < _a.length; _i++) {
              var extension = _a[_i];
              if (fileExtensionIs(fileName, extension)) {
                  return true;
              }
          }
          return false;
      }
      ts.isSupportedSourceFileName = isSupportedSourceFileName;
      /**
       * Extension boundaries by priority. Lower numbers indicate higher priorities, and are
       * aligned to the offset of the highest priority extension in the
       * allSupportedExtensions array.
       */
      var ExtensionPriority;
      (function (ExtensionPriority) {
          ExtensionPriority[ExtensionPriority["TypeScriptFiles"] = 0] = "TypeScriptFiles";
          ExtensionPriority[ExtensionPriority["DeclarationAndJavaScriptFiles"] = 2] = "DeclarationAndJavaScriptFiles";
          ExtensionPriority[ExtensionPriority["Highest"] = 0] = "Highest";
          ExtensionPriority[ExtensionPriority["Lowest"] = 2] = "Lowest";
      })(ExtensionPriority = ts.ExtensionPriority || (ts.ExtensionPriority = {}));
      function getExtensionPriority(path, supportedExtensions) {
          for (var i = supportedExtensions.length - 1; i >= 0; i--) {
              if (fileExtensionIs(path, supportedExtensions[i])) {
                  return adjustExtensionPriority(i, supportedExtensions);
              }
          }
          // If its not in the list of supported extensions, this is likely a
          // TypeScript file with a non-ts extension
          return 0 /* Highest */;
      }
      ts.getExtensionPriority = getExtensionPriority;
      /**
       * Adjusts an extension priority to be the highest priority within the same range.
       */
      function adjustExtensionPriority(extensionPriority, supportedExtensions) {
          if (extensionPriority < 2 /* DeclarationAndJavaScriptFiles */) {
              return 0 /* TypeScriptFiles */;
          }
          else if (extensionPriority < supportedExtensions.length) {
              return 2 /* DeclarationAndJavaScriptFiles */;
          }
          else {
              return supportedExtensions.length;
          }
      }
      ts.adjustExtensionPriority = adjustExtensionPriority;
      /**
       * Gets the next lowest extension priority for a given priority.
       */
      function getNextLowestExtensionPriority(extensionPriority, supportedExtensions) {
          if (extensionPriority < 2 /* DeclarationAndJavaScriptFiles */) {
              return 2 /* DeclarationAndJavaScriptFiles */;
          }
          else {
              return supportedExtensions.length;
          }
      }
      ts.getNextLowestExtensionPriority = getNextLowestExtensionPriority;
      var extensionsToRemove = [".d.ts", ".ts", ".js", ".tsx", ".jsx"];
      function removeFileExtension(path) {
          for (var _i = 0, extensionsToRemove_1 = extensionsToRemove; _i < extensionsToRemove_1.length; _i++) {
              var ext = extensionsToRemove_1[_i];
              var extensionless = tryRemoveExtension(path, ext);
              if (extensionless !== undefined) {
                  return extensionless;
              }
          }
          return path;
      }
      ts.removeFileExtension = removeFileExtension;
      function tryRemoveExtension(path, extension) {
          return fileExtensionIs(path, extension) ? removeExtension(path, extension) : undefined;
      }
      ts.tryRemoveExtension = tryRemoveExtension;
      function removeExtension(path, extension) {
          return path.substring(0, path.length - extension.length);
      }
      ts.removeExtension = removeExtension;
      function changeExtension(path, newExtension) {
          return (removeFileExtension(path) + newExtension);
      }
      ts.changeExtension = changeExtension;
      function Symbol(flags, name) {
          this.flags = flags;
          this.name = name;
          this.declarations = undefined;
      }
      function Type(_checker, flags) {
          this.flags = flags;
      }
      function Signature() {
      }
      function Node(kind, pos, end) {
          this.id = 0;
          this.kind = kind;
          this.pos = pos;
          this.end = end;
          this.flags = 0 /* None */;
          this.modifierFlagsCache = 0 /* None */;
          this.transformFlags = 0 /* None */;
          this.parent = undefined;
          this.original = undefined;
      }
      ts.objectAllocator = {
          getNodeConstructor: function () { return Node; },
          getTokenConstructor: function () { return Node; },
          getIdentifierConstructor: function () { return Node; },
          getSourceFileConstructor: function () { return Node; },
          getSymbolConstructor: function () { return Symbol; },
          getTypeConstructor: function () { return Type; },
          getSignatureConstructor: function () { return Signature; }
      };
      var AssertionLevel;
      (function (AssertionLevel) {
          AssertionLevel[AssertionLevel["None"] = 0] = "None";
          AssertionLevel[AssertionLevel["Normal"] = 1] = "Normal";
          AssertionLevel[AssertionLevel["Aggressive"] = 2] = "Aggressive";
          AssertionLevel[AssertionLevel["VeryAggressive"] = 3] = "VeryAggressive";
      })(AssertionLevel = ts.AssertionLevel || (ts.AssertionLevel = {}));
      var Debug;
      (function (Debug) {
          Debug.currentAssertionLevel = 0 /* None */;
          function shouldAssert(level) {
              return Debug.currentAssertionLevel >= level;
          }
          Debug.shouldAssert = shouldAssert;
          function assert(expression, message, verboseDebugInfo) {
              if (!expression) {
                  var verboseDebugString = "";
                  if (verboseDebugInfo) {
                      verboseDebugString = "\r\nVerbose Debug Information: " + verboseDebugInfo();
                  }
                  debugger;
                  throw new Error("Debug Failure. False expression: " + (message || "") + verboseDebugString);
              }
          }
          Debug.assert = assert;
          function fail(message) {
              Debug.assert(/*expression*/ false, message);
          }
          Debug.fail = fail;
      })(Debug = ts.Debug || (ts.Debug = {}));
      /** Remove an item from an array, moving everything to its right one space left. */
      function orderedRemoveItem(array, item) {
          for (var i = 0; i < array.length; i++) {
              if (array[i] === item) {
                  orderedRemoveItemAt(array, i);
                  return true;
              }
          }
          return false;
      }
      ts.orderedRemoveItem = orderedRemoveItem;
      /** Remove an item by index from an array, moving everything to its right one space left. */
      function orderedRemoveItemAt(array, index) {
          // This seems to be faster than either `array.splice(i, 1)` or `array.copyWithin(i, i+ 1)`.
          for (var i = index; i < array.length - 1; i++) {
              array[i] = array[i + 1];
          }
          array.pop();
      }
      ts.orderedRemoveItemAt = orderedRemoveItemAt;
      function unorderedRemoveItemAt(array, index) {
          // Fill in the "hole" left at `index`.
          array[index] = array[array.length - 1];
          array.pop();
      }
      ts.unorderedRemoveItemAt = unorderedRemoveItemAt;
      /** Remove the *first* occurrence of `item` from the array. */
      function unorderedRemoveItem(array, item) {
          unorderedRemoveFirstItemWhere(array, function (element) { return element === item; });
      }
      ts.unorderedRemoveItem = unorderedRemoveItem;
      /** Remove the *first* element satisfying `predicate`. */
      function unorderedRemoveFirstItemWhere(array, predicate) {
          for (var i = 0; i < array.length; i++) {
              if (predicate(array[i])) {
                  unorderedRemoveItemAt(array, i);
                  break;
              }
          }
      }
      function createGetCanonicalFileName(useCaseSensitiveFileNames) {
          return useCaseSensitiveFileNames
              ? (function (fileName) { return fileName; })
              : (function (fileName) { return fileName.toLowerCase(); });
      }
      ts.createGetCanonicalFileName = createGetCanonicalFileName;
      /**
       * patternStrings contains both pattern strings (containing "*") and regular strings.
       * Return an exact match if possible, or a pattern match, or undefined.
       * (These are verified by verifyCompilerOptions to have 0 or 1 "*" characters.)
       */
      /* @internal */
      function matchPatternOrExact(patternStrings, candidate) {
          var patterns = [];
          for (var _i = 0, patternStrings_1 = patternStrings; _i < patternStrings_1.length; _i++) {
              var patternString = patternStrings_1[_i];
              var pattern = tryParsePattern(patternString);
              if (pattern) {
                  patterns.push(pattern);
              }
              else if (patternString === candidate) {
                  // pattern was matched as is - no need to search further
                  return patternString;
              }
          }
          return findBestPatternMatch(patterns, function (_) { return _; }, candidate);
      }
      ts.matchPatternOrExact = matchPatternOrExact;
      /* @internal */
      function patternText(_a) {
          var prefix = _a.prefix, suffix = _a.suffix;
          return prefix + "*" + suffix;
      }
      ts.patternText = patternText;
      /**
       * Given that candidate matches pattern, returns the text matching the '*'.
       * E.g.: matchedText(tryParsePattern("foo*baz"), "foobarbaz") === "bar"
       */
      /* @internal */
      function matchedText(pattern, candidate) {
          Debug.assert(isPatternMatch(pattern, candidate));
          return candidate.substr(pattern.prefix.length, candidate.length - pattern.suffix.length);
      }
      ts.matchedText = matchedText;
      /** Return the object corresponding to the best pattern to match `candidate`. */
      /* @internal */
      function findBestPatternMatch(values, getPattern, candidate) {
          var matchedValue = undefined;
          // use length of prefix as betterness criteria
          var longestMatchPrefixLength = -1;
          for (var _i = 0, values_1 = values; _i < values_1.length; _i++) {
              var v = values_1[_i];
              var pattern = getPattern(v);
              if (isPatternMatch(pattern, candidate) && pattern.prefix.length > longestMatchPrefixLength) {
                  longestMatchPrefixLength = pattern.prefix.length;
                  matchedValue = v;
              }
          }
          return matchedValue;
      }
      ts.findBestPatternMatch = findBestPatternMatch;
      function isPatternMatch(_a, candidate) {
          var prefix = _a.prefix, suffix = _a.suffix;
          return candidate.length >= prefix.length + suffix.length &&
              startsWith(candidate, prefix) &&
              endsWith(candidate, suffix);
      }
      /* @internal */
      function tryParsePattern(pattern) {
          // This should be verified outside of here and a proper error thrown.
          Debug.assert(hasZeroOrOneAsteriskCharacter(pattern));
          var indexOfStar = pattern.indexOf("*");
          return indexOfStar === -1 ? undefined : {
              prefix: pattern.substr(0, indexOfStar),
              suffix: pattern.substr(indexOfStar + 1)
          };
      }
      ts.tryParsePattern = tryParsePattern;
      function positionIsSynthesized(pos) {
          // This is a fast way of testing the following conditions:
          //  pos === undefined || pos === null || isNaN(pos) || pos < 0;
          return !(pos >= 0);
      }
      ts.positionIsSynthesized = positionIsSynthesized;
      /** True if an extension is one of the supported TypeScript extensions. */
      function extensionIsTypeScript(ext) {
          return ext <= ts.Extension.LastTypeScriptExtension;
      }
      ts.extensionIsTypeScript = extensionIsTypeScript;
      /**
       * Gets the extension from a path.
       * Path must have a valid extension.
       */
      function extensionFromPath(path) {
          var ext = tryGetExtensionFromPath(path);
          if (ext !== undefined) {
              return ext;
          }
          Debug.fail("File " + path + " has unknown extension.");
      }
      ts.extensionFromPath = extensionFromPath;
      function tryGetExtensionFromPath(path) {
          if (fileExtensionIs(path, ".d.ts")) {
              return ts.Extension.Dts;
          }
          if (fileExtensionIs(path, ".ts")) {
              return ts.Extension.Ts;
          }
          if (fileExtensionIs(path, ".tsx")) {
              return ts.Extension.Tsx;
          }
          if (fileExtensionIs(path, ".js")) {
              return ts.Extension.Js;
          }
          if (fileExtensionIs(path, ".jsx")) {
              return ts.Extension.Jsx;
          }
      }
      ts.tryGetExtensionFromPath = tryGetExtensionFromPath;
  })(ts || (ts = {}));
  /// <reference path="core.ts"/>
  var higgsArguments = arguments;
  var ts;
  (function (ts) {
      function getNodeMajorVersion() {
          if (typeof process === "undefined") {
              return undefined;
          }
          var version = process.version;
          if (!version) {
              return undefined;
          }
          var dot = version.indexOf(".");
          if (dot === -1) {
              return undefined;
          }
          return parseInt(version.substring(1, dot));
      }
      ts.getNodeMajorVersion = getNodeMajorVersion;
      ts.sys = (function () {
          function getWScriptSystem() {
              var fso = new ActiveXObject("Scripting.FileSystemObject");
              var shell = new ActiveXObject("WScript.Shell");
              var fileStream = new ActiveXObject("ADODB.Stream");
              fileStream.Type = 2 /*text*/;
              var binaryStream = new ActiveXObject("ADODB.Stream");
              binaryStream.Type = 1 /*binary*/;
              var args = [];
              for (var i = 0; i < WScript.Arguments.length; i++) {
                  args[i] = WScript.Arguments.Item(i);
              }
              function readFile(fileName, encoding) {
                  if (!fso.FileExists(fileName)) {
                      return undefined;
                  }
                  fileStream.Open();
                  try {
                      if (encoding) {
                          fileStream.Charset = encoding;
                          fileStream.LoadFromFile(fileName);
                      }
                      else {
                          // Load file and read the first two bytes into a string with no interpretation
                          fileStream.Charset = "x-ansi";
                          fileStream.LoadFromFile(fileName);
                          var bom = fileStream.ReadText(2) || "";
                          // Position must be at 0 before encoding can be changed
                          fileStream.Position = 0;
                          // [0xFF,0xFE] and [0xFE,0xFF] mean utf-16 (little or big endian), otherwise default to utf-8
                          fileStream.Charset = bom.length >= 2 && (bom.charCodeAt(0) === 0xFF && bom.charCodeAt(1) === 0xFE || bom.charCodeAt(0) === 0xFE && bom.charCodeAt(1) === 0xFF) ? "unicode" : "utf-8";
                      }
                      // ReadText method always strips byte order mark from resulting string
                      return fileStream.ReadText();
                  }
                  catch (e) {
                      throw e;
                  }
                  finally {
                      fileStream.Close();
                  }
              }
              function writeFile(fileName, data, writeByteOrderMark) {
                  fileStream.Open();
                  binaryStream.Open();
                  try {
                      // Write characters in UTF-8 encoding
                      fileStream.Charset = "utf-8";
                      fileStream.WriteText(data);
                      // If we don't want the BOM, then skip it by setting the starting location to 3 (size of BOM).
                      // If not, start from position 0, as the BOM will be added automatically when charset==utf8.
                      if (writeByteOrderMark) {
                          fileStream.Position = 0;
                      }
                      else {
                          fileStream.Position = 3;
                      }
                      fileStream.CopyTo(binaryStream);
                      binaryStream.SaveToFile(fileName, 2 /*overwrite*/);
                  }
                  finally {
                      binaryStream.Close();
                      fileStream.Close();
                  }
              }
              function getNames(collection) {
                  var result = [];
                  for (var e = new Enumerator(collection); !e.atEnd(); e.moveNext()) {
                      result.push(e.item().Name);
                  }
                  return result.sort();
              }
              function getDirectories(path) {
                  var folder = fso.GetFolder(path);
                  return getNames(folder.subfolders);
              }
              function getAccessibleFileSystemEntries(path) {
                  try {
                      var folder = fso.GetFolder(path || ".");
                      var files = getNames(folder.files);
                      var directories = getNames(folder.subfolders);
                      return { files: files, directories: directories };
                  }
                  catch (e) {
                      return { files: [], directories: [] };
                  }
              }
              function readDirectory(path, extensions, excludes, includes) {
                  return ts.matchFiles(path, extensions, excludes, includes, /*useCaseSensitiveFileNames*/ false, shell.CurrentDirectory, getAccessibleFileSystemEntries);
              }
              var wscriptSystem = {
                  args: args,
                  newLine: "\r\n",
                  useCaseSensitiveFileNames: false,
                  write: function (s) {
                      WScript.StdOut.Write(s);
                  },
                  readFile: readFile,
                  writeFile: writeFile,
                  resolvePath: function (path) {
                      return fso.GetAbsolutePathName(path);
                  },
                  fileExists: function (path) {
                      return fso.FileExists(path);
                  },
                  directoryExists: function (path) {
                      return fso.FolderExists(path);
                  },
                  createDirectory: function (directoryName) {
                      if (!wscriptSystem.directoryExists(directoryName)) {
                          fso.CreateFolder(directoryName);
                      }
                  },
                  getExecutingFilePath: function () {
                      return WScript.ScriptFullName;
                  },
                  getCurrentDirectory: function () {
                      return shell.CurrentDirectory;
                  },
                  getDirectories: getDirectories,
                  getEnvironmentVariable: function (name) {
                      return new ActiveXObject("WScript.Shell").ExpandEnvironmentStrings("%" + name + "%");
                  },
                  readDirectory: readDirectory,
                  exit: function (exitCode) {
                      try {
                          WScript.Quit(exitCode);
                      }
                      catch (e) {
                      }
                  }
              };
              return wscriptSystem;
          }
          function getNodeSystem() {
              var _fs = require("fs");
              var _path = require("path");
              var _os = require("os");
              var _crypto = require("crypto");
              var useNonPollingWatchers = process.env["TSC_NONPOLLING_WATCHER"];
              function createWatchedFileSet() {
                  var dirWatchers = ts.createMap();
                  // One file can have multiple watchers
                  var fileWatcherCallbacks = ts.createMultiMap();
                  return { addFile: addFile, removeFile: removeFile };
                  function reduceDirWatcherRefCountForFile(fileName) {
                      var dirName = ts.getDirectoryPath(fileName);
                      var watcher = dirWatchers.get(dirName);
                      if (watcher) {
                          watcher.referenceCount -= 1;
                          if (watcher.referenceCount <= 0) {
                              watcher.close();
                              dirWatchers.delete(dirName);
                          }
                      }
                  }
                  function addDirWatcher(dirPath) {
                      var watcher = dirWatchers.get(dirPath);
                      if (watcher) {
                          watcher.referenceCount += 1;
                          return;
                      }
                      watcher = _fs.watch(dirPath, { persistent: true }, function (eventName, relativeFileName) { return fileEventHandler(eventName, relativeFileName, dirPath); });
                      watcher.referenceCount = 1;
                      dirWatchers.set(dirPath, watcher);
                      return;
                  }
                  function addFileWatcherCallback(filePath, callback) {
                      fileWatcherCallbacks.add(filePath, callback);
                  }
                  function addFile(fileName, callback) {
                      addFileWatcherCallback(fileName, callback);
                      addDirWatcher(ts.getDirectoryPath(fileName));
                      return { fileName: fileName, callback: callback };
                  }
                  function removeFile(watchedFile) {
                      removeFileWatcherCallback(watchedFile.fileName, watchedFile.callback);
                      reduceDirWatcherRefCountForFile(watchedFile.fileName);
                  }
                  function removeFileWatcherCallback(filePath, callback) {
                      fileWatcherCallbacks.remove(filePath, callback);
                  }
                  function fileEventHandler(eventName, relativeFileName, baseDirPath) {
                      // When files are deleted from disk, the triggered "rename" event would have a relativefileName of "undefined"
                      var fileName = typeof relativeFileName !== "string"
                          ? undefined
                          : ts.getNormalizedAbsolutePath(relativeFileName, baseDirPath);
                      // Some applications save a working file via rename operations
                      if ((eventName === "change" || eventName === "rename")) {
                          var callbacks = fileWatcherCallbacks.get(fileName);
                          if (callbacks) {
                              for (var _i = 0, callbacks_1 = callbacks; _i < callbacks_1.length; _i++) {
                                  var fileCallback = callbacks_1[_i];
                                  fileCallback(fileName);
                              }
                          }
                      }
                  }
              }
              var watchedFileSet = createWatchedFileSet();
              var nodeVersion = getNodeMajorVersion();
              var isNode4OrLater = nodeVersion >= 4;
              function isFileSystemCaseSensitive() {
                  // win32\win64 are case insensitive platforms
                  if (platform === "win32" || platform === "win64") {
                      return false;
                  }
                  // convert current file name to upper case / lower case and check if file exists
                  // (guards against cases when name is already all uppercase or lowercase)
                  return !fileExists(__filename.toUpperCase()) || !fileExists(__filename.toLowerCase());
              }
              var platform = _os.platform();
              var useCaseSensitiveFileNames = isFileSystemCaseSensitive();
              function readFile(fileName, _encoding) {
                  if (!fileExists(fileName)) {
                      return undefined;
                  }
                  var buffer = _fs.readFileSync(fileName);
                  var len = buffer.length;
                  if (len >= 2 && buffer[0] === 0xFE && buffer[1] === 0xFF) {
                      // Big endian UTF-16 byte order mark detected. Since big endian is not supported by node.js,
                      // flip all byte pairs and treat as little endian.
                      len &= ~1;
                      for (var i = 0; i < len; i += 2) {
                          var temp = buffer[i];
                          buffer[i] = buffer[i + 1];
                          buffer[i + 1] = temp;
                      }
                      return buffer.toString("utf16le", 2);
                  }
                  if (len >= 2 && buffer[0] === 0xFF && buffer[1] === 0xFE) {
                      // Little endian UTF-16 byte order mark detected
                      return buffer.toString("utf16le", 2);
                  }
                  if (len >= 3 && buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) {
                      // UTF-8 byte order mark detected
                      return buffer.toString("utf8", 3);
                  }
                  // Default is UTF-8 with no byte order mark
                  return buffer.toString("utf8");
              }
              function writeFile(fileName, data, writeByteOrderMark) {
                  // If a BOM is required, emit one
                  if (writeByteOrderMark) {
                      data = "\uFEFF" + data;
                  }
                  var fd;
                  try {
                      fd = _fs.openSync(fileName, "w");
                      _fs.writeSync(fd, data, undefined, "utf8");
                  }
                  finally {
                      if (fd !== undefined) {
                          _fs.closeSync(fd);
                      }
                  }
              }
              function getAccessibleFileSystemEntries(path) {
                  try {
                      var entries = _fs.readdirSync(path || ".").sort();
                      var files = [];
                      var directories = [];
                      for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
                          var entry = entries_1[_i];
                          // This is necessary because on some file system node fails to exclude
                          // "." and "..". See https://github.com/nodejs/node/issues/4002
                          if (entry === "." || entry === "..") {
                              continue;
                          }
                          var name = ts.combinePaths(path, entry);
                          var stat = void 0;
                          try {
                              stat = _fs.statSync(name);
                          }
                          catch (e) {
                              continue;
                          }
                          if (stat.isFile()) {
                              files.push(entry);
                          }
                          else if (stat.isDirectory()) {
                              directories.push(entry);
                          }
                      }
                      return { files: files, directories: directories };
                  }
                  catch (e) {
                      return { files: [], directories: [] };
                  }
              }
              function readDirectory(path, extensions, excludes, includes) {
                  return ts.matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, process.cwd(), getAccessibleFileSystemEntries);
              }
              var FileSystemEntryKind;
              (function (FileSystemEntryKind) {
                  FileSystemEntryKind[FileSystemEntryKind["File"] = 0] = "File";
                  FileSystemEntryKind[FileSystemEntryKind["Directory"] = 1] = "Directory";
              })(FileSystemEntryKind || (FileSystemEntryKind = {}));
              function fileSystemEntryExists(path, entryKind) {
                  try {
                      var stat = _fs.statSync(path);
                      switch (entryKind) {
                          case 0 /* File */: return stat.isFile();
                          case 1 /* Directory */: return stat.isDirectory();
                      }
                  }
                  catch (e) {
                      return false;
                  }
              }
              function fileExists(path) {
                  return fileSystemEntryExists(path, 0 /* File */);
              }
              function directoryExists(path) {
                  return fileSystemEntryExists(path, 1 /* Directory */);
              }
              function getDirectories(path) {
                  return ts.filter(_fs.readdirSync(path), function (dir) { return fileSystemEntryExists(ts.combinePaths(path, dir), 1 /* Directory */); });
              }
              var noOpFileWatcher = { close: ts.noop };
              var nodeSystem = {
                  args: process.argv.slice(2),
                  newLine: _os.EOL,
                  useCaseSensitiveFileNames: useCaseSensitiveFileNames,
                  write: function (s) {
                      process.stdout.write(s);
                  },
                  readFile: readFile,
                  writeFile: writeFile,
                  watchFile: function (fileName, callback, pollingInterval) {
                      if (useNonPollingWatchers) {
                          var watchedFile_1 = watchedFileSet.addFile(fileName, callback);
                          return {
                              close: function () { return watchedFileSet.removeFile(watchedFile_1); }
                          };
                      }
                      else {
                          _fs.watchFile(fileName, { persistent: true, interval: pollingInterval || 250 }, fileChanged);
                          return {
                              close: function () { return _fs.unwatchFile(fileName, fileChanged); }
                          };
                      }
                      function fileChanged(curr, prev) {
                          if (+curr.mtime <= +prev.mtime) {
                              return;
                          }
                          callback(fileName);
                      }
                  },
                  watchDirectory: function (directoryName, callback, recursive) {
                      // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows
                      // (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643)
                      var options;
                      if (!directoryExists(directoryName)) {
                          // do nothing if target folder does not exist
                          return noOpFileWatcher;
                      }
                      if (isNode4OrLater && (process.platform === "win32" || process.platform === "darwin")) {
                          options = { persistent: true, recursive: !!recursive };
                      }
                      else {
                          options = { persistent: true };
                      }
                      return _fs.watch(directoryName, options, function (eventName, relativeFileName) {
                          // In watchDirectory we only care about adding and removing files (when event name is
                          // "rename"); changes made within files are handled by corresponding fileWatchers (when
                          // event name is "change")
                          if (eventName === "rename") {
                              // When deleting a file, the passed baseFileName is null
                              callback(!relativeFileName ? relativeFileName : ts.normalizePath(ts.combinePaths(directoryName, relativeFileName)));
                          }
                          ;
                      });
                  },
                  resolvePath: function (path) {
                      return _path.resolve(path);
                  },
                  fileExists: fileExists,
                  directoryExists: directoryExists,
                  createDirectory: function (directoryName) {
                      if (!nodeSystem.directoryExists(directoryName)) {
                          _fs.mkdirSync(directoryName);
                      }
                  },
                  getExecutingFilePath: function () {
                      return __filename;
                  },
                  getCurrentDirectory: function () {
                      return process.cwd();
                  },
                  getDirectories: getDirectories,
                  getEnvironmentVariable: function (name) {
                      return process.env[name] || "";
                  },
                  readDirectory: readDirectory,
                  getModifiedTime: function (path) {
                      try {
                          return _fs.statSync(path).mtime;
                      }
                      catch (e) {
                          return undefined;
                      }
                  },
                  createHash: function (data) {
                      var hash = _crypto.createHash("md5");
                      hash.update(data);
                      return hash.digest("hex");
                  },
                  getMemoryUsage: function () {
                      if (global.gc) {
                          global.gc();
                      }
                      return process.memoryUsage().heapUsed;
                  },
                  getFileSize: function (path) {
                      try {
                          var stat = _fs.statSync(path);
                          if (stat.isFile()) {
                              return stat.size;
                          }
                      }
                      catch (e) { }
                      return 0;
                  },
                  exit: function (exitCode) {
                      process.exit(exitCode);
                  },
                  realpath: function (path) {
                      return _fs.realpathSync(path);
                  },
                  tryEnableSourceMapsForHost: function () {
                      try {
                          require("source-map-support").install();
                      }
                      catch (e) {
                          // Could not enable source maps.
                      }
                  },
                  setTimeout: setTimeout,
                  clearTimeout: clearTimeout
              };
              return nodeSystem;
          }
          function getHiggsSystem() {
              var _console = require("lib/console");
              var _stdio = require("lib/stdio");
              var _dir = require("lib/dir");
              var writeStr = "";
              var higgsSystem = {
                  args: higgsArguments,
                  newLine: "\n",
                  useCaseSensitiveFileNames: true,
                  write: function (str) {
                      writeStr += str;
                      if (writeStr.match(/\n$/)) {
                          str = writeStr.replace(/\n$/, "");
                          _console.log(str);
                          writeStr = "";
                      }
                  },
                  readFile: function (path) {
                      return _stdio.readFile(path);
                  },
                  writeFile: function (path, data) {
                      var f = _stdio.fopen(path, "w");
                      f.write(data);
                      f.close();
                  },
                  resolvePath: function (path) { return path; },
                  fileExists: function (path) {
                      try {
                          var f = _stdio.fopen(path, "r");
                          f.close();
                      }
                      catch (ex) {
                          return false;
                      }
                      return true;
                  },
                  directoryExists: function (path) {
                      try {
                          var d = _dir.dir(path);
                          d.range.end();
                      }
                      catch (ex) {
                          return false;
                      }
                      return true;
                  },
                  getExecutingFilePath: function () {
                      // FIXME
                      return "built/local/tsc.js";
                  },
                  getCurrentDirectory: _dir.getcwd,
                  getDirectories: function (path) {
                      return _dir.dir(path).getDirNames();
                  },
                  exit: function (exitCode) {
                      throw exitCode;
                  }
              };
              return higgsSystem;
          }
          function getChakraSystem() {
              var realpath = ChakraHost.realpath && (function (path) { return ChakraHost.realpath(path); });
              return {
                  newLine: ChakraHost.newLine || "\r\n",
                  args: ChakraHost.args,
                  useCaseSensitiveFileNames: !!ChakraHost.useCaseSensitiveFileNames,
                  write: ChakraHost.echo,
                  readFile: function (path, _encoding) {
                      // encoding is automatically handled by the implementation in ChakraHost
                      return ChakraHost.readFile(path);
                  },
                  writeFile: function (path, data, writeByteOrderMark) {
                      // If a BOM is required, emit one
                      if (writeByteOrderMark) {
                          data = "\uFEFF" + data;
                      }
                      ChakraHost.writeFile(path, data);
                  },
                  resolvePath: ChakraHost.resolvePath,
                  fileExists: ChakraHost.fileExists,
                  directoryExists: ChakraHost.directoryExists,
                  createDirectory: ChakraHost.createDirectory,
                  getExecutingFilePath: function () { return ChakraHost.executingFile; },
                  getCurrentDirectory: function () { return ChakraHost.currentDirectory; },
                  getDirectories: ChakraHost.getDirectories,
                  getEnvironmentVariable: ChakraHost.getEnvironmentVariable || (function () { return ""; }),
                  readDirectory: function (path, extensions, excludes, includes) {
                      var pattern = ts.getFileMatcherPatterns(path, excludes, includes, !!ChakraHost.useCaseSensitiveFileNames, ChakraHost.currentDirectory);
                      return ChakraHost.readDirectory(path, extensions, pattern.basePaths, pattern.excludePattern, pattern.includeFilePattern, pattern.includeDirectoryPattern);
                  },
                  exit: ChakraHost.quit,
                  realpath: realpath
              };
          }
          function recursiveCreateDirectory(directoryPath, sys) {
              var basePath = ts.getDirectoryPath(directoryPath);
              var shouldCreateParent = directoryPath !== basePath && !sys.directoryExists(basePath);
              if (shouldCreateParent) {
                  recursiveCreateDirectory(basePath, sys);
              }
              if (shouldCreateParent || !sys.directoryExists(directoryPath)) {
                  sys.createDirectory(directoryPath);
              }
          }
          var sys;
          if (typeof ChakraHost !== "undefined") {
              sys = getChakraSystem();
          }
          else if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") {
              sys = getWScriptSystem();
          }
          else if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof require !== "undefined") {
              // process and process.nextTick checks if current environment is node-like
              // process.browser check excludes webpack and browserify
              sys = getNodeSystem();
          }
          else if (typeof $rt_in !== "undefined" && typeof require !== "undefined") {
              sys = getHiggsSystem();
          }
          if (sys) {
              // patch writefile to create folder before writing the file
              var originalWriteFile_1 = sys.writeFile;
              sys.writeFile = function (path, data, writeBom) {
                  var directoryPath = ts.getDirectoryPath(ts.normalizeSlashes(path));
                  if (directoryPath && !sys.directoryExists(directoryPath)) {
                      recursiveCreateDirectory(directoryPath, sys);
                  }
                  originalWriteFile_1.call(sys, path, data, writeBom);
              };
          }
          return sys;
      })();
      if (ts.sys && ts.sys.getEnvironmentVariable) {
          ts.Debug.currentAssertionLevel = /^development$/i.test(ts.sys.getEnvironmentVariable("NODE_ENV"))
              ? 1 /* Normal */
              : 0 /* None */;
      }
  })(ts || (ts = {}));
  // <auto-generated />
  /// <reference path="types.ts" />
  /* @internal */
  var ts;
  (function (ts) {
      ts.Diagnostics = {
          Unterminated_string_literal: { code: 1002, category: ts.DiagnosticCategory.Error, key: "Unterminated_string_literal_1002", message: "Unterminated string literal." },
          Identifier_expected: { code: 1003, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_1003", message: "Identifier expected." },
          _0_expected: { code: 1005, category: ts.DiagnosticCategory.Error, key: "_0_expected_1005", message: "'{0}' expected." },
          A_file_cannot_have_a_reference_to_itself: { code: 1006, category: ts.DiagnosticCategory.Error, key: "A_file_cannot_have_a_reference_to_itself_1006", message: "A file cannot have a reference to itself." },
          Trailing_comma_not_allowed: { code: 1009, category: ts.DiagnosticCategory.Error, key: "Trailing_comma_not_allowed_1009", message: "Trailing comma not allowed." },
          Asterisk_Slash_expected: { code: 1010, category: ts.DiagnosticCategory.Error, key: "Asterisk_Slash_expected_1010", message: "'*/' expected." },
          Unexpected_token: { code: 1012, category: ts.DiagnosticCategory.Error, key: "Unexpected_token_1012", message: "Unexpected token." },
          A_rest_parameter_must_be_last_in_a_parameter_list: { code: 1014, category: ts.DiagnosticCategory.Error, key: "A_rest_parameter_must_be_last_in_a_parameter_list_1014", message: "A rest parameter must be last in a parameter list." },
          Parameter_cannot_have_question_mark_and_initializer: { code: 1015, category: ts.DiagnosticCategory.Error, key: "Parameter_cannot_have_question_mark_and_initializer_1015", message: "Parameter cannot have question mark and initializer." },
          A_required_parameter_cannot_follow_an_optional_parameter: { code: 1016, category: ts.DiagnosticCategory.Error, key: "A_required_parameter_cannot_follow_an_optional_parameter_1016", message: "A required parameter cannot follow an optional parameter." },
          An_index_signature_cannot_have_a_rest_parameter: { code: 1017, category: ts.DiagnosticCategory.Error, key: "An_index_signature_cannot_have_a_rest_parameter_1017", message: "An index signature cannot have a rest parameter." },
          An_index_signature_parameter_cannot_have_an_accessibility_modifier: { code: 1018, category: ts.DiagnosticCategory.Error, key: "An_index_signature_parameter_cannot_have_an_accessibility_modifier_1018", message: "An index signature parameter cannot have an accessibility modifier." },
          An_index_signature_parameter_cannot_have_a_question_mark: { code: 1019, category: ts.DiagnosticCategory.Error, key: "An_index_signature_parameter_cannot_have_a_question_mark_1019", message: "An index signature parameter cannot have a question mark." },
          An_index_signature_parameter_cannot_have_an_initializer: { code: 1020, category: ts.DiagnosticCategory.Error, key: "An_index_signature_parameter_cannot_have_an_initializer_1020", message: "An index signature parameter cannot have an initializer." },
          An_index_signature_must_have_a_type_annotation: { code: 1021, category: ts.DiagnosticCategory.Error, key: "An_index_signature_must_have_a_type_annotation_1021", message: "An index signature must have a type annotation." },
          An_index_signature_parameter_must_have_a_type_annotation: { code: 1022, category: ts.DiagnosticCategory.Error, key: "An_index_signature_parameter_must_have_a_type_annotation_1022", message: "An index signature parameter must have a type annotation." },
          An_index_signature_parameter_type_must_be_string_or_number: { code: 1023, category: ts.DiagnosticCategory.Error, key: "An_index_signature_parameter_type_must_be_string_or_number_1023", message: "An index signature parameter type must be 'string' or 'number'." },
          readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature: { code: 1024, category: ts.DiagnosticCategory.Error, key: "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024", message: "'readonly' modifier can only appear on a property declaration or index signature." },
          Accessibility_modifier_already_seen: { code: 1028, category: ts.DiagnosticCategory.Error, key: "Accessibility_modifier_already_seen_1028", message: "Accessibility modifier already seen." },
          _0_modifier_must_precede_1_modifier: { code: 1029, category: ts.DiagnosticCategory.Error, key: "_0_modifier_must_precede_1_modifier_1029", message: "'{0}' modifier must precede '{1}' modifier." },
          _0_modifier_already_seen: { code: 1030, category: ts.DiagnosticCategory.Error, key: "_0_modifier_already_seen_1030", message: "'{0}' modifier already seen." },
          _0_modifier_cannot_appear_on_a_class_element: { code: 1031, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_appear_on_a_class_element_1031", message: "'{0}' modifier cannot appear on a class element." },
          super_must_be_followed_by_an_argument_list_or_member_access: { code: 1034, category: ts.DiagnosticCategory.Error, key: "super_must_be_followed_by_an_argument_list_or_member_access_1034", message: "'super' must be followed by an argument list or member access." },
          Only_ambient_modules_can_use_quoted_names: { code: 1035, category: ts.DiagnosticCategory.Error, key: "Only_ambient_modules_can_use_quoted_names_1035", message: "Only ambient modules can use quoted names." },
          Statements_are_not_allowed_in_ambient_contexts: { code: 1036, category: ts.DiagnosticCategory.Error, key: "Statements_are_not_allowed_in_ambient_contexts_1036", message: "Statements are not allowed in ambient contexts." },
          A_declare_modifier_cannot_be_used_in_an_already_ambient_context: { code: 1038, category: ts.DiagnosticCategory.Error, key: "A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038", message: "A 'declare' modifier cannot be used in an already ambient context." },
          Initializers_are_not_allowed_in_ambient_contexts: { code: 1039, category: ts.DiagnosticCategory.Error, key: "Initializers_are_not_allowed_in_ambient_contexts_1039", message: "Initializers are not allowed in ambient contexts." },
          _0_modifier_cannot_be_used_in_an_ambient_context: { code: 1040, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_be_used_in_an_ambient_context_1040", message: "'{0}' modifier cannot be used in an ambient context." },
          _0_modifier_cannot_be_used_with_a_class_declaration: { code: 1041, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_be_used_with_a_class_declaration_1041", message: "'{0}' modifier cannot be used with a class declaration." },
          _0_modifier_cannot_be_used_here: { code: 1042, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_be_used_here_1042", message: "'{0}' modifier cannot be used here." },
          _0_modifier_cannot_appear_on_a_data_property: { code: 1043, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_appear_on_a_data_property_1043", message: "'{0}' modifier cannot appear on a data property." },
          _0_modifier_cannot_appear_on_a_module_or_namespace_element: { code: 1044, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044", message: "'{0}' modifier cannot appear on a module or namespace element." },
          A_0_modifier_cannot_be_used_with_an_interface_declaration: { code: 1045, category: ts.DiagnosticCategory.Error, key: "A_0_modifier_cannot_be_used_with_an_interface_declaration_1045", message: "A '{0}' modifier cannot be used with an interface declaration." },
          A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file: { code: 1046, category: ts.DiagnosticCategory.Error, key: "A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file_1046", message: "A 'declare' modifier is required for a top level declaration in a .d.ts file." },
          A_rest_parameter_cannot_be_optional: { code: 1047, category: ts.DiagnosticCategory.Error, key: "A_rest_parameter_cannot_be_optional_1047", message: "A rest parameter cannot be optional." },
          A_rest_parameter_cannot_have_an_initializer: { code: 1048, category: ts.DiagnosticCategory.Error, key: "A_rest_parameter_cannot_have_an_initializer_1048", message: "A rest parameter cannot have an initializer." },
          A_set_accessor_must_have_exactly_one_parameter: { code: 1049, category: ts.DiagnosticCategory.Error, key: "A_set_accessor_must_have_exactly_one_parameter_1049", message: "A 'set' accessor must have exactly one parameter." },
          A_set_accessor_cannot_have_an_optional_parameter: { code: 1051, category: ts.DiagnosticCategory.Error, key: "A_set_accessor_cannot_have_an_optional_parameter_1051", message: "A 'set' accessor cannot have an optional parameter." },
          A_set_accessor_parameter_cannot_have_an_initializer: { code: 1052, category: ts.DiagnosticCategory.Error, key: "A_set_accessor_parameter_cannot_have_an_initializer_1052", message: "A 'set' accessor parameter cannot have an initializer." },
          A_set_accessor_cannot_have_rest_parameter: { code: 1053, category: ts.DiagnosticCategory.Error, key: "A_set_accessor_cannot_have_rest_parameter_1053", message: "A 'set' accessor cannot have rest parameter." },
          A_get_accessor_cannot_have_parameters: { code: 1054, category: ts.DiagnosticCategory.Error, key: "A_get_accessor_cannot_have_parameters_1054", message: "A 'get' accessor cannot have parameters." },
          Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value: { code: 1055, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055", message: "Type '{0}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value." },
          Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: { code: 1056, category: ts.DiagnosticCategory.Error, key: "Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056", message: "Accessors are only available when targeting ECMAScript 5 and higher." },
          An_async_function_or_method_must_have_a_valid_awaitable_return_type: { code: 1057, category: ts.DiagnosticCategory.Error, key: "An_async_function_or_method_must_have_a_valid_awaitable_return_type_1057", message: "An async function or method must have a valid awaitable return type." },
          Operand_for_await_does_not_have_a_valid_callable_then_member: { code: 1058, category: ts.DiagnosticCategory.Error, key: "Operand_for_await_does_not_have_a_valid_callable_then_member_1058", message: "Operand for 'await' does not have a valid callable 'then' member." },
          Return_expression_in_async_function_does_not_have_a_valid_callable_then_member: { code: 1059, category: ts.DiagnosticCategory.Error, key: "Return_expression_in_async_function_does_not_have_a_valid_callable_then_member_1059", message: "Return expression in async function does not have a valid callable 'then' member." },
          Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member: { code: 1060, category: ts.DiagnosticCategory.Error, key: "Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member_1060", message: "Expression body for async arrow function does not have a valid callable 'then' member." },
          Enum_member_must_have_initializer: { code: 1061, category: ts.DiagnosticCategory.Error, key: "Enum_member_must_have_initializer_1061", message: "Enum member must have initializer." },
          _0_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: { code: 1062, category: ts.DiagnosticCategory.Error, key: "_0_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062", message: "{0} is referenced directly or indirectly in the fulfillment callback of its own 'then' method." },
          An_export_assignment_cannot_be_used_in_a_namespace: { code: 1063, category: ts.DiagnosticCategory.Error, key: "An_export_assignment_cannot_be_used_in_a_namespace_1063", message: "An export assignment cannot be used in a namespace." },
          The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type: { code: 1064, category: ts.DiagnosticCategory.Error, key: "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1064", message: "The return type of an async function or method must be the global Promise<T> type." },
          In_ambient_enum_declarations_member_initializer_must_be_constant_expression: { code: 1066, category: ts.DiagnosticCategory.Error, key: "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066", message: "In ambient enum declarations member initializer must be constant expression." },
          Unexpected_token_A_constructor_method_accessor_or_property_was_expected: { code: 1068, category: ts.DiagnosticCategory.Error, key: "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068", message: "Unexpected token. A constructor, method, accessor, or property was expected." },
          _0_modifier_cannot_appear_on_a_type_member: { code: 1070, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_appear_on_a_type_member_1070", message: "'{0}' modifier cannot appear on a type member." },
          _0_modifier_cannot_appear_on_an_index_signature: { code: 1071, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_appear_on_an_index_signature_1071", message: "'{0}' modifier cannot appear on an index signature." },
          A_0_modifier_cannot_be_used_with_an_import_declaration: { code: 1079, category: ts.DiagnosticCategory.Error, key: "A_0_modifier_cannot_be_used_with_an_import_declaration_1079", message: "A '{0}' modifier cannot be used with an import declaration." },
          Invalid_reference_directive_syntax: { code: 1084, category: ts.DiagnosticCategory.Error, key: "Invalid_reference_directive_syntax_1084", message: "Invalid 'reference' directive syntax." },
          Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0: { code: 1085, category: ts.DiagnosticCategory.Error, key: "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085", message: "Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '{0}'." },
          An_accessor_cannot_be_declared_in_an_ambient_context: { code: 1086, category: ts.DiagnosticCategory.Error, key: "An_accessor_cannot_be_declared_in_an_ambient_context_1086", message: "An accessor cannot be declared in an ambient context." },
          _0_modifier_cannot_appear_on_a_constructor_declaration: { code: 1089, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_appear_on_a_constructor_declaration_1089", message: "'{0}' modifier cannot appear on a constructor declaration." },
          _0_modifier_cannot_appear_on_a_parameter: { code: 1090, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_appear_on_a_parameter_1090", message: "'{0}' modifier cannot appear on a parameter." },
          Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement: { code: 1091, category: ts.DiagnosticCategory.Error, key: "Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091", message: "Only a single variable declaration is allowed in a 'for...in' statement." },
          Type_parameters_cannot_appear_on_a_constructor_declaration: { code: 1092, category: ts.DiagnosticCategory.Error, key: "Type_parameters_cannot_appear_on_a_constructor_declaration_1092", message: "Type parameters cannot appear on a constructor declaration." },
          Type_annotation_cannot_appear_on_a_constructor_declaration: { code: 1093, category: ts.DiagnosticCategory.Error, key: "Type_annotation_cannot_appear_on_a_constructor_declaration_1093", message: "Type annotation cannot appear on a constructor declaration." },
          An_accessor_cannot_have_type_parameters: { code: 1094, category: ts.DiagnosticCategory.Error, key: "An_accessor_cannot_have_type_parameters_1094", message: "An accessor cannot have type parameters." },
          A_set_accessor_cannot_have_a_return_type_annotation: { code: 1095, category: ts.DiagnosticCategory.Error, key: "A_set_accessor_cannot_have_a_return_type_annotation_1095", message: "A 'set' accessor cannot have a return type annotation." },
          An_index_signature_must_have_exactly_one_parameter: { code: 1096, category: ts.DiagnosticCategory.Error, key: "An_index_signature_must_have_exactly_one_parameter_1096", message: "An index signature must have exactly one parameter." },
          _0_list_cannot_be_empty: { code: 1097, category: ts.DiagnosticCategory.Error, key: "_0_list_cannot_be_empty_1097", message: "'{0}' list cannot be empty." },
          Type_parameter_list_cannot_be_empty: { code: 1098, category: ts.DiagnosticCategory.Error, key: "Type_parameter_list_cannot_be_empty_1098", message: "Type parameter list cannot be empty." },
          Type_argument_list_cannot_be_empty: { code: 1099, category: ts.DiagnosticCategory.Error, key: "Type_argument_list_cannot_be_empty_1099", message: "Type argument list cannot be empty." },
          Invalid_use_of_0_in_strict_mode: { code: 1100, category: ts.DiagnosticCategory.Error, key: "Invalid_use_of_0_in_strict_mode_1100", message: "Invalid use of '{0}' in strict mode." },
          with_statements_are_not_allowed_in_strict_mode: { code: 1101, category: ts.DiagnosticCategory.Error, key: "with_statements_are_not_allowed_in_strict_mode_1101", message: "'with' statements are not allowed in strict mode." },
          delete_cannot_be_called_on_an_identifier_in_strict_mode: { code: 1102, category: ts.DiagnosticCategory.Error, key: "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102", message: "'delete' cannot be called on an identifier in strict mode." },
          A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement: { code: 1104, category: ts.DiagnosticCategory.Error, key: "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104", message: "A 'continue' statement can only be used within an enclosing iteration statement." },
          A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement: { code: 1105, category: ts.DiagnosticCategory.Error, key: "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105", message: "A 'break' statement can only be used within an enclosing iteration or switch statement." },
          Jump_target_cannot_cross_function_boundary: { code: 1107, category: ts.DiagnosticCategory.Error, key: "Jump_target_cannot_cross_function_boundary_1107", message: "Jump target cannot cross function boundary." },
          A_return_statement_can_only_be_used_within_a_function_body: { code: 1108, category: ts.DiagnosticCategory.Error, key: "A_return_statement_can_only_be_used_within_a_function_body_1108", message: "A 'return' statement can only be used within a function body." },
          Expression_expected: { code: 1109, category: ts.DiagnosticCategory.Error, key: "Expression_expected_1109", message: "Expression expected." },
          Type_expected: { code: 1110, category: ts.DiagnosticCategory.Error, key: "Type_expected_1110", message: "Type expected." },
          A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: { code: 1113, category: ts.DiagnosticCategory.Error, key: "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113", message: "A 'default' clause cannot appear more than once in a 'switch' statement." },
          Duplicate_label_0: { code: 1114, category: ts.DiagnosticCategory.Error, key: "Duplicate_label_0_1114", message: "Duplicate label '{0}'" },
          A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: { code: 1115, category: ts.DiagnosticCategory.Error, key: "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115", message: "A 'continue' statement can only jump to a label of an enclosing iteration statement." },
          A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement: { code: 1116, category: ts.DiagnosticCategory.Error, key: "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116", message: "A 'break' statement can only jump to a label of an enclosing statement." },
          An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode: { code: 1117, category: ts.DiagnosticCategory.Error, key: "An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117", message: "An object literal cannot have multiple properties with the same name in strict mode." },
          An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name: { code: 1118, category: ts.DiagnosticCategory.Error, key: "An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118", message: "An object literal cannot have multiple get/set accessors with the same name." },
          An_object_literal_cannot_have_property_and_accessor_with_the_same_name: { code: 1119, category: ts.DiagnosticCategory.Error, key: "An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119", message: "An object literal cannot have property and accessor with the same name." },
          An_export_assignment_cannot_have_modifiers: { code: 1120, category: ts.DiagnosticCategory.Error, key: "An_export_assignment_cannot_have_modifiers_1120", message: "An export assignment cannot have modifiers." },
          Octal_literals_are_not_allowed_in_strict_mode: { code: 1121, category: ts.DiagnosticCategory.Error, key: "Octal_literals_are_not_allowed_in_strict_mode_1121", message: "Octal literals are not allowed in strict mode." },
          A_tuple_type_element_list_cannot_be_empty: { code: 1122, category: ts.DiagnosticCategory.Error, key: "A_tuple_type_element_list_cannot_be_empty_1122", message: "A tuple type element list cannot be empty." },
          Variable_declaration_list_cannot_be_empty: { code: 1123, category: ts.DiagnosticCategory.Error, key: "Variable_declaration_list_cannot_be_empty_1123", message: "Variable declaration list cannot be empty." },
          Digit_expected: { code: 1124, category: ts.DiagnosticCategory.Error, key: "Digit_expected_1124", message: "Digit expected." },
          Hexadecimal_digit_expected: { code: 1125, category: ts.DiagnosticCategory.Error, key: "Hexadecimal_digit_expected_1125", message: "Hexadecimal digit expected." },
          Unexpected_end_of_text: { code: 1126, category: ts.DiagnosticCategory.Error, key: "Unexpected_end_of_text_1126", message: "Unexpected end of text." },
          Invalid_character: { code: 1127, category: ts.DiagnosticCategory.Error, key: "Invalid_character_1127", message: "Invalid character." },
          Declaration_or_statement_expected: { code: 1128, category: ts.DiagnosticCategory.Error, key: "Declaration_or_statement_expected_1128", message: "Declaration or statement expected." },
          Statement_expected: { code: 1129, category: ts.DiagnosticCategory.Error, key: "Statement_expected_1129", message: "Statement expected." },
          case_or_default_expected: { code: 1130, category: ts.DiagnosticCategory.Error, key: "case_or_default_expected_1130", message: "'case' or 'default' expected." },
          Property_or_signature_expected: { code: 1131, category: ts.DiagnosticCategory.Error, key: "Property_or_signature_expected_1131", message: "Property or signature expected." },
          Enum_member_expected: { code: 1132, category: ts.DiagnosticCategory.Error, key: "Enum_member_expected_1132", message: "Enum member expected." },
          Variable_declaration_expected: { code: 1134, category: ts.DiagnosticCategory.Error, key: "Variable_declaration_expected_1134", message: "Variable declaration expected." },
          Argument_expression_expected: { code: 1135, category: ts.DiagnosticCategory.Error, key: "Argument_expression_expected_1135", message: "Argument expression expected." },
          Property_assignment_expected: { code: 1136, category: ts.DiagnosticCategory.Error, key: "Property_assignment_expected_1136", message: "Property assignment expected." },
          Expression_or_comma_expected: { code: 1137, category: ts.DiagnosticCategory.Error, key: "Expression_or_comma_expected_1137", message: "Expression or comma expected." },
          Parameter_declaration_expected: { code: 1138, category: ts.DiagnosticCategory.Error, key: "Parameter_declaration_expected_1138", message: "Parameter declaration expected." },
          Type_parameter_declaration_expected: { code: 1139, category: ts.DiagnosticCategory.Error, key: "Type_parameter_declaration_expected_1139", message: "Type parameter declaration expected." },
          Type_argument_expected: { code: 1140, category: ts.DiagnosticCategory.Error, key: "Type_argument_expected_1140", message: "Type argument expected." },
          String_literal_expected: { code: 1141, category: ts.DiagnosticCategory.Error, key: "String_literal_expected_1141", message: "String literal expected." },
          Line_break_not_permitted_here: { code: 1142, category: ts.DiagnosticCategory.Error, key: "Line_break_not_permitted_here_1142", message: "Line break not permitted here." },
          or_expected: { code: 1144, category: ts.DiagnosticCategory.Error, key: "or_expected_1144", message: "'{' or ';' expected." },
          Declaration_expected: { code: 1146, category: ts.DiagnosticCategory.Error, key: "Declaration_expected_1146", message: "Declaration expected." },
          Import_declarations_in_a_namespace_cannot_reference_a_module: { code: 1147, category: ts.DiagnosticCategory.Error, key: "Import_declarations_in_a_namespace_cannot_reference_a_module_1147", message: "Import declarations in a namespace cannot reference a module." },
          Cannot_use_imports_exports_or_module_augmentations_when_module_is_none: { code: 1148, category: ts.DiagnosticCategory.Error, key: "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148", message: "Cannot use imports, exports, or module augmentations when '--module' is 'none'." },
          File_name_0_differs_from_already_included_file_name_1_only_in_casing: { code: 1149, category: ts.DiagnosticCategory.Error, key: "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149", message: "File name '{0}' differs from already included file name '{1}' only in casing" },
          new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead: { code: 1150, category: ts.DiagnosticCategory.Error, key: "new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead_1150", message: "'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead." },
          const_declarations_must_be_initialized: { code: 1155, category: ts.DiagnosticCategory.Error, key: "const_declarations_must_be_initialized_1155", message: "'const' declarations must be initialized" },
          const_declarations_can_only_be_declared_inside_a_block: { code: 1156, category: ts.DiagnosticCategory.Error, key: "const_declarations_can_only_be_declared_inside_a_block_1156", message: "'const' declarations can only be declared inside a block." },
          let_declarations_can_only_be_declared_inside_a_block: { code: 1157, category: ts.DiagnosticCategory.Error, key: "let_declarations_can_only_be_declared_inside_a_block_1157", message: "'let' declarations can only be declared inside a block." },
          Unterminated_template_literal: { code: 1160, category: ts.DiagnosticCategory.Error, key: "Unterminated_template_literal_1160", message: "Unterminated template literal." },
          Unterminated_regular_expression_literal: { code: 1161, category: ts.DiagnosticCategory.Error, key: "Unterminated_regular_expression_literal_1161", message: "Unterminated regular expression literal." },
          An_object_member_cannot_be_declared_optional: { code: 1162, category: ts.DiagnosticCategory.Error, key: "An_object_member_cannot_be_declared_optional_1162", message: "An object member cannot be declared optional." },
          A_yield_expression_is_only_allowed_in_a_generator_body: { code: 1163, category: ts.DiagnosticCategory.Error, key: "A_yield_expression_is_only_allowed_in_a_generator_body_1163", message: "A 'yield' expression is only allowed in a generator body." },
          Computed_property_names_are_not_allowed_in_enums: { code: 1164, category: ts.DiagnosticCategory.Error, key: "Computed_property_names_are_not_allowed_in_enums_1164", message: "Computed property names are not allowed in enums." },
          A_computed_property_name_in_an_ambient_context_must_directly_refer_to_a_built_in_symbol: { code: 1165, category: ts.DiagnosticCategory.Error, key: "A_computed_property_name_in_an_ambient_context_must_directly_refer_to_a_built_in_symbol_1165", message: "A computed property name in an ambient context must directly refer to a built-in symbol." },
          A_computed_property_name_in_a_class_property_declaration_must_directly_refer_to_a_built_in_symbol: { code: 1166, category: ts.DiagnosticCategory.Error, key: "A_computed_property_name_in_a_class_property_declaration_must_directly_refer_to_a_built_in_symbol_1166", message: "A computed property name in a class property declaration must directly refer to a built-in symbol." },
          A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_symbol: { code: 1168, category: ts.DiagnosticCategory.Error, key: "A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_symbol_1168", message: "A computed property name in a method overload must directly refer to a built-in symbol." },
          A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol: { code: 1169, category: ts.DiagnosticCategory.Error, key: "A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol_1169", message: "A computed property name in an interface must directly refer to a built-in symbol." },
          A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol: { code: 1170, category: ts.DiagnosticCategory.Error, key: "A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol_1170", message: "A computed property name in a type literal must directly refer to a built-in symbol." },
          A_comma_expression_is_not_allowed_in_a_computed_property_name: { code: 1171, category: ts.DiagnosticCategory.Error, key: "A_comma_expression_is_not_allowed_in_a_computed_property_name_1171", message: "A comma expression is not allowed in a computed property name." },
          extends_clause_already_seen: { code: 1172, category: ts.DiagnosticCategory.Error, key: "extends_clause_already_seen_1172", message: "'extends' clause already seen." },
          extends_clause_must_precede_implements_clause: { code: 1173, category: ts.DiagnosticCategory.Error, key: "extends_clause_must_precede_implements_clause_1173", message: "'extends' clause must precede 'implements' clause." },
          Classes_can_only_extend_a_single_class: { code: 1174, category: ts.DiagnosticCategory.Error, key: "Classes_can_only_extend_a_single_class_1174", message: "Classes can only extend a single class." },
          implements_clause_already_seen: { code: 1175, category: ts.DiagnosticCategory.Error, key: "implements_clause_already_seen_1175", message: "'implements' clause already seen." },
          Interface_declaration_cannot_have_implements_clause: { code: 1176, category: ts.DiagnosticCategory.Error, key: "Interface_declaration_cannot_have_implements_clause_1176", message: "Interface declaration cannot have 'implements' clause." },
          Binary_digit_expected: { code: 1177, category: ts.DiagnosticCategory.Error, key: "Binary_digit_expected_1177", message: "Binary digit expected." },
          Octal_digit_expected: { code: 1178, category: ts.DiagnosticCategory.Error, key: "Octal_digit_expected_1178", message: "Octal digit expected." },
          Unexpected_token_expected: { code: 1179, category: ts.DiagnosticCategory.Error, key: "Unexpected_token_expected_1179", message: "Unexpected token. '{' expected." },
          Property_destructuring_pattern_expected: { code: 1180, category: ts.DiagnosticCategory.Error, key: "Property_destructuring_pattern_expected_1180", message: "Property destructuring pattern expected." },
          Array_element_destructuring_pattern_expected: { code: 1181, category: ts.DiagnosticCategory.Error, key: "Array_element_destructuring_pattern_expected_1181", message: "Array element destructuring pattern expected." },
          A_destructuring_declaration_must_have_an_initializer: { code: 1182, category: ts.DiagnosticCategory.Error, key: "A_destructuring_declaration_must_have_an_initializer_1182", message: "A destructuring declaration must have an initializer." },
          An_implementation_cannot_be_declared_in_ambient_contexts: { code: 1183, category: ts.DiagnosticCategory.Error, key: "An_implementation_cannot_be_declared_in_ambient_contexts_1183", message: "An implementation cannot be declared in ambient contexts." },
          Modifiers_cannot_appear_here: { code: 1184, category: ts.DiagnosticCategory.Error, key: "Modifiers_cannot_appear_here_1184", message: "Modifiers cannot appear here." },
          Merge_conflict_marker_encountered: { code: 1185, category: ts.DiagnosticCategory.Error, key: "Merge_conflict_marker_encountered_1185", message: "Merge conflict marker encountered." },
          A_rest_element_cannot_have_an_initializer: { code: 1186, category: ts.DiagnosticCategory.Error, key: "A_rest_element_cannot_have_an_initializer_1186", message: "A rest element cannot have an initializer." },
          A_parameter_property_may_not_be_declared_using_a_binding_pattern: { code: 1187, category: ts.DiagnosticCategory.Error, key: "A_parameter_property_may_not_be_declared_using_a_binding_pattern_1187", message: "A parameter property may not be declared using a binding pattern." },
          Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement: { code: 1188, category: ts.DiagnosticCategory.Error, key: "Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188", message: "Only a single variable declaration is allowed in a 'for...of' statement." },
          The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer: { code: 1189, category: ts.DiagnosticCategory.Error, key: "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189", message: "The variable declaration of a 'for...in' statement cannot have an initializer." },
          The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer: { code: 1190, category: ts.DiagnosticCategory.Error, key: "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190", message: "The variable declaration of a 'for...of' statement cannot have an initializer." },
          An_import_declaration_cannot_have_modifiers: { code: 1191, category: ts.DiagnosticCategory.Error, key: "An_import_declaration_cannot_have_modifiers_1191", message: "An import declaration cannot have modifiers." },
          Module_0_has_no_default_export: { code: 1192, category: ts.DiagnosticCategory.Error, key: "Module_0_has_no_default_export_1192", message: "Module '{0}' has no default export." },
          An_export_declaration_cannot_have_modifiers: { code: 1193, category: ts.DiagnosticCategory.Error, key: "An_export_declaration_cannot_have_modifiers_1193", message: "An export declaration cannot have modifiers." },
          Export_declarations_are_not_permitted_in_a_namespace: { code: 1194, category: ts.DiagnosticCategory.Error, key: "Export_declarations_are_not_permitted_in_a_namespace_1194", message: "Export declarations are not permitted in a namespace." },
          Catch_clause_variable_cannot_have_a_type_annotation: { code: 1196, category: ts.DiagnosticCategory.Error, key: "Catch_clause_variable_cannot_have_a_type_annotation_1196", message: "Catch clause variable cannot have a type annotation." },
          Catch_clause_variable_cannot_have_an_initializer: { code: 1197, category: ts.DiagnosticCategory.Error, key: "Catch_clause_variable_cannot_have_an_initializer_1197", message: "Catch clause variable cannot have an initializer." },
          An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive: { code: 1198, category: ts.DiagnosticCategory.Error, key: "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198", message: "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive." },
          Unterminated_Unicode_escape_sequence: { code: 1199, category: ts.DiagnosticCategory.Error, key: "Unterminated_Unicode_escape_sequence_1199", message: "Unterminated Unicode escape sequence." },
          Line_terminator_not_permitted_before_arrow: { code: 1200, category: ts.DiagnosticCategory.Error, key: "Line_terminator_not_permitted_before_arrow_1200", message: "Line terminator not permitted before arrow." },
          Import_assignment_cannot_be_used_when_targeting_ECMAScript_2015_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead: { code: 1202, category: ts.DiagnosticCategory.Error, key: "Import_assignment_cannot_be_used_when_targeting_ECMAScript_2015_modules_Consider_using_import_Asteri_1202", message: "Import assignment cannot be used when targeting ECMAScript 2015 modules. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"', or another module format instead." },
          Export_assignment_cannot_be_used_when_targeting_ECMAScript_2015_modules_Consider_using_export_default_or_another_module_format_instead: { code: 1203, category: ts.DiagnosticCategory.Error, key: "Export_assignment_cannot_be_used_when_targeting_ECMAScript_2015_modules_Consider_using_export_defaul_1203", message: "Export assignment cannot be used when targeting ECMAScript 2015 modules. Consider using 'export default' or another module format instead." },
          Decorators_are_not_valid_here: { code: 1206, category: ts.DiagnosticCategory.Error, key: "Decorators_are_not_valid_here_1206", message: "Decorators are not valid here." },
          Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name: { code: 1207, category: ts.DiagnosticCategory.Error, key: "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207", message: "Decorators cannot be applied to multiple get/set accessors of the same name." },
          Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided: { code: 1208, category: ts.DiagnosticCategory.Error, key: "Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided_1208", message: "Cannot compile namespaces when the '--isolatedModules' flag is provided." },
          Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided: { code: 1209, category: ts.DiagnosticCategory.Error, key: "Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided_1209", message: "Ambient const enums are not allowed when the '--isolatedModules' flag is provided." },
          Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode: { code: 1210, category: ts.DiagnosticCategory.Error, key: "Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode_1210", message: "Invalid use of '{0}'. Class definitions are automatically in strict mode." },
          A_class_declaration_without_the_default_modifier_must_have_a_name: { code: 1211, category: ts.DiagnosticCategory.Error, key: "A_class_declaration_without_the_default_modifier_must_have_a_name_1211", message: "A class declaration without the 'default' modifier must have a name" },
          Identifier_expected_0_is_a_reserved_word_in_strict_mode: { code: 1212, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212", message: "Identifier expected. '{0}' is a reserved word in strict mode" },
          Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: { code: 1213, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213", message: "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode." },
          Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode: { code: 1214, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214", message: "Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode." },
          Invalid_use_of_0_Modules_are_automatically_in_strict_mode: { code: 1215, category: ts.DiagnosticCategory.Error, key: "Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215", message: "Invalid use of '{0}'. Modules are automatically in strict mode." },
          Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules: { code: 1216, category: ts.DiagnosticCategory.Error, key: "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216", message: "Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules." },
          Export_assignment_is_not_supported_when_module_flag_is_system: { code: 1218, category: ts.DiagnosticCategory.Error, key: "Export_assignment_is_not_supported_when_module_flag_is_system_1218", message: "Export assignment is not supported when '--module' flag is 'system'." },
          Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning: { code: 1219, category: ts.DiagnosticCategory.Error, key: "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219", message: "Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning." },
          Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher: { code: 1220, category: ts.DiagnosticCategory.Error, key: "Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220", message: "Generators are only available when targeting ECMAScript 2015 or higher." },
          Generators_are_not_allowed_in_an_ambient_context: { code: 1221, category: ts.DiagnosticCategory.Error, key: "Generators_are_not_allowed_in_an_ambient_context_1221", message: "Generators are not allowed in an ambient context." },
          An_overload_signature_cannot_be_declared_as_a_generator: { code: 1222, category: ts.DiagnosticCategory.Error, key: "An_overload_signature_cannot_be_declared_as_a_generator_1222", message: "An overload signature cannot be declared as a generator." },
          _0_tag_already_specified: { code: 1223, category: ts.DiagnosticCategory.Error, key: "_0_tag_already_specified_1223", message: "'{0}' tag already specified." },
          Signature_0_must_have_a_type_predicate: { code: 1224, category: ts.DiagnosticCategory.Error, key: "Signature_0_must_have_a_type_predicate_1224", message: "Signature '{0}' must have a type predicate." },
          Cannot_find_parameter_0: { code: 1225, category: ts.DiagnosticCategory.Error, key: "Cannot_find_parameter_0_1225", message: "Cannot find parameter '{0}'." },
          Type_predicate_0_is_not_assignable_to_1: { code: 1226, category: ts.DiagnosticCategory.Error, key: "Type_predicate_0_is_not_assignable_to_1_1226", message: "Type predicate '{0}' is not assignable to '{1}'." },
          Parameter_0_is_not_in_the_same_position_as_parameter_1: { code: 1227, category: ts.DiagnosticCategory.Error, key: "Parameter_0_is_not_in_the_same_position_as_parameter_1_1227", message: "Parameter '{0}' is not in the same position as parameter '{1}'." },
          A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods: { code: 1228, category: ts.DiagnosticCategory.Error, key: "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228", message: "A type predicate is only allowed in return type position for functions and methods." },
          A_type_predicate_cannot_reference_a_rest_parameter: { code: 1229, category: ts.DiagnosticCategory.Error, key: "A_type_predicate_cannot_reference_a_rest_parameter_1229", message: "A type predicate cannot reference a rest parameter." },
          A_type_predicate_cannot_reference_element_0_in_a_binding_pattern: { code: 1230, category: ts.DiagnosticCategory.Error, key: "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230", message: "A type predicate cannot reference element '{0}' in a binding pattern." },
          An_export_assignment_can_only_be_used_in_a_module: { code: 1231, category: ts.DiagnosticCategory.Error, key: "An_export_assignment_can_only_be_used_in_a_module_1231", message: "An export assignment can only be used in a module." },
          An_import_declaration_can_only_be_used_in_a_namespace_or_module: { code: 1232, category: ts.DiagnosticCategory.Error, key: "An_import_declaration_can_only_be_used_in_a_namespace_or_module_1232", message: "An import declaration can only be used in a namespace or module." },
          An_export_declaration_can_only_be_used_in_a_module: { code: 1233, category: ts.DiagnosticCategory.Error, key: "An_export_declaration_can_only_be_used_in_a_module_1233", message: "An export declaration can only be used in a module." },
          An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file: { code: 1234, category: ts.DiagnosticCategory.Error, key: "An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234", message: "An ambient module declaration is only allowed at the top level in a file." },
          A_namespace_declaration_is_only_allowed_in_a_namespace_or_module: { code: 1235, category: ts.DiagnosticCategory.Error, key: "A_namespace_declaration_is_only_allowed_in_a_namespace_or_module_1235", message: "A namespace declaration is only allowed in a namespace or module." },
          The_return_type_of_a_property_decorator_function_must_be_either_void_or_any: { code: 1236, category: ts.DiagnosticCategory.Error, key: "The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236", message: "The return type of a property decorator function must be either 'void' or 'any'." },
          The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any: { code: 1237, category: ts.DiagnosticCategory.Error, key: "The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237", message: "The return type of a parameter decorator function must be either 'void' or 'any'." },
          Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression: { code: 1238, category: ts.DiagnosticCategory.Error, key: "Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression_1238", message: "Unable to resolve signature of class decorator when called as an expression." },
          Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression: { code: 1239, category: ts.DiagnosticCategory.Error, key: "Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression_1239", message: "Unable to resolve signature of parameter decorator when called as an expression." },
          Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression: { code: 1240, category: ts.DiagnosticCategory.Error, key: "Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression_1240", message: "Unable to resolve signature of property decorator when called as an expression." },
          Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression: { code: 1241, category: ts.DiagnosticCategory.Error, key: "Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression_1241", message: "Unable to resolve signature of method decorator when called as an expression." },
          abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration: { code: 1242, category: ts.DiagnosticCategory.Error, key: "abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242", message: "'abstract' modifier can only appear on a class, method, or property declaration." },
          _0_modifier_cannot_be_used_with_1_modifier: { code: 1243, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_be_used_with_1_modifier_1243", message: "'{0}' modifier cannot be used with '{1}' modifier." },
          Abstract_methods_can_only_appear_within_an_abstract_class: { code: 1244, category: ts.DiagnosticCategory.Error, key: "Abstract_methods_can_only_appear_within_an_abstract_class_1244", message: "Abstract methods can only appear within an abstract class." },
          Method_0_cannot_have_an_implementation_because_it_is_marked_abstract: { code: 1245, category: ts.DiagnosticCategory.Error, key: "Method_0_cannot_have_an_implementation_because_it_is_marked_abstract_1245", message: "Method '{0}' cannot have an implementation because it is marked abstract." },
          An_interface_property_cannot_have_an_initializer: { code: 1246, category: ts.DiagnosticCategory.Error, key: "An_interface_property_cannot_have_an_initializer_1246", message: "An interface property cannot have an initializer." },
          A_type_literal_property_cannot_have_an_initializer: { code: 1247, category: ts.DiagnosticCategory.Error, key: "A_type_literal_property_cannot_have_an_initializer_1247", message: "A type literal property cannot have an initializer." },
          A_class_member_cannot_have_the_0_keyword: { code: 1248, category: ts.DiagnosticCategory.Error, key: "A_class_member_cannot_have_the_0_keyword_1248", message: "A class member cannot have the '{0}' keyword." },
          A_decorator_can_only_decorate_a_method_implementation_not_an_overload: { code: 1249, category: ts.DiagnosticCategory.Error, key: "A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249", message: "A decorator can only decorate a method implementation, not an overload." },
          Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5: { code: 1250, category: ts.DiagnosticCategory.Error, key: "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250", message: "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'." },
          Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_definitions_are_automatically_in_strict_mode: { code: 1251, category: ts.DiagnosticCategory.Error, key: "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251", message: "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Class definitions are automatically in strict mode." },
          Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_are_automatically_in_strict_mode: { code: 1252, category: ts.DiagnosticCategory.Error, key: "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_1252", message: "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Modules are automatically in strict mode." },
          _0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag: { code: 1253, category: ts.DiagnosticCategory.Error, key: "_0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag_1253", message: "'{0}' tag cannot be used independently as a top level JSDoc tag." },
          A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal: { code: 1254, category: ts.DiagnosticCategory.Error, key: "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_1254", message: "A 'const' initializer in an ambient context must be a string or numeric literal." },
          with_statements_are_not_allowed_in_an_async_function_block: { code: 1300, category: ts.DiagnosticCategory.Error, key: "with_statements_are_not_allowed_in_an_async_function_block_1300", message: "'with' statements are not allowed in an async function block." },
          await_expression_is_only_allowed_within_an_async_function: { code: 1308, category: ts.DiagnosticCategory.Error, key: "await_expression_is_only_allowed_within_an_async_function_1308", message: "'await' expression is only allowed within an async function." },
          can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment: { code: 1312, category: ts.DiagnosticCategory.Error, key: "can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312", message: "'=' can only be used in an object literal property inside a destructuring assignment." },
          The_body_of_an_if_statement_cannot_be_the_empty_statement: { code: 1313, category: ts.DiagnosticCategory.Error, key: "The_body_of_an_if_statement_cannot_be_the_empty_statement_1313", message: "The body of an 'if' statement cannot be the empty statement." },
          Global_module_exports_may_only_appear_in_module_files: { code: 1314, category: ts.DiagnosticCategory.Error, key: "Global_module_exports_may_only_appear_in_module_files_1314", message: "Global module exports may only appear in module files." },
          Global_module_exports_may_only_appear_in_declaration_files: { code: 1315, category: ts.DiagnosticCategory.Error, key: "Global_module_exports_may_only_appear_in_declaration_files_1315", message: "Global module exports may only appear in declaration files." },
          Global_module_exports_may_only_appear_at_top_level: { code: 1316, category: ts.DiagnosticCategory.Error, key: "Global_module_exports_may_only_appear_at_top_level_1316", message: "Global module exports may only appear at top level." },
          A_parameter_property_cannot_be_declared_using_a_rest_parameter: { code: 1317, category: ts.DiagnosticCategory.Error, key: "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317", message: "A parameter property cannot be declared using a rest parameter." },
          An_abstract_accessor_cannot_have_an_implementation: { code: 1318, category: ts.DiagnosticCategory.Error, key: "An_abstract_accessor_cannot_have_an_implementation_1318", message: "An abstract accessor cannot have an implementation." },
          A_default_export_can_only_be_used_in_an_ECMAScript_style_module: { code: 1319, category: ts.DiagnosticCategory.Error, key: "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319", message: "A default export can only be used in an ECMAScript-style module." },
          Duplicate_identifier_0: { code: 2300, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_0_2300", message: "Duplicate identifier '{0}'." },
          Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: ts.DiagnosticCategory.Error, key: "Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301", message: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." },
          Static_members_cannot_reference_class_type_parameters: { code: 2302, category: ts.DiagnosticCategory.Error, key: "Static_members_cannot_reference_class_type_parameters_2302", message: "Static members cannot reference class type parameters." },
          Circular_definition_of_import_alias_0: { code: 2303, category: ts.DiagnosticCategory.Error, key: "Circular_definition_of_import_alias_0_2303", message: "Circular definition of import alias '{0}'." },
          Cannot_find_name_0: { code: 2304, category: ts.DiagnosticCategory.Error, key: "Cannot_find_name_0_2304", message: "Cannot find name '{0}'." },
          Module_0_has_no_exported_member_1: { code: 2305, category: ts.DiagnosticCategory.Error, key: "Module_0_has_no_exported_member_1_2305", message: "Module '{0}' has no exported member '{1}'." },
          File_0_is_not_a_module: { code: 2306, category: ts.DiagnosticCategory.Error, key: "File_0_is_not_a_module_2306", message: "File '{0}' is not a module." },
          Cannot_find_module_0: { code: 2307, category: ts.DiagnosticCategory.Error, key: "Cannot_find_module_0_2307", message: "Cannot find module '{0}'." },
          Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity: { code: 2308, category: ts.DiagnosticCategory.Error, key: "Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308", message: "Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity." },
          An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements: { code: 2309, category: ts.DiagnosticCategory.Error, key: "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309", message: "An export assignment cannot be used in a module with other exported elements." },
          Type_0_recursively_references_itself_as_a_base_type: { code: 2310, category: ts.DiagnosticCategory.Error, key: "Type_0_recursively_references_itself_as_a_base_type_2310", message: "Type '{0}' recursively references itself as a base type." },
          A_class_may_only_extend_another_class: { code: 2311, category: ts.DiagnosticCategory.Error, key: "A_class_may_only_extend_another_class_2311", message: "A class may only extend another class." },
          An_interface_may_only_extend_a_class_or_another_interface: { code: 2312, category: ts.DiagnosticCategory.Error, key: "An_interface_may_only_extend_a_class_or_another_interface_2312", message: "An interface may only extend a class or another interface." },
          Type_parameter_0_has_a_circular_constraint: { code: 2313, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_has_a_circular_constraint_2313", message: "Type parameter '{0}' has a circular constraint." },
          Generic_type_0_requires_1_type_argument_s: { code: 2314, category: ts.DiagnosticCategory.Error, key: "Generic_type_0_requires_1_type_argument_s_2314", message: "Generic type '{0}' requires {1} type argument(s)." },
          Type_0_is_not_generic: { code: 2315, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_generic_2315", message: "Type '{0}' is not generic." },
          Global_type_0_must_be_a_class_or_interface_type: { code: 2316, category: ts.DiagnosticCategory.Error, key: "Global_type_0_must_be_a_class_or_interface_type_2316", message: "Global type '{0}' must be a class or interface type." },
          Global_type_0_must_have_1_type_parameter_s: { code: 2317, category: ts.DiagnosticCategory.Error, key: "Global_type_0_must_have_1_type_parameter_s_2317", message: "Global type '{0}' must have {1} type parameter(s)." },
          Cannot_find_global_type_0: { code: 2318, category: ts.DiagnosticCategory.Error, key: "Cannot_find_global_type_0_2318", message: "Cannot find global type '{0}'." },
          Named_property_0_of_types_1_and_2_are_not_identical: { code: 2319, category: ts.DiagnosticCategory.Error, key: "Named_property_0_of_types_1_and_2_are_not_identical_2319", message: "Named property '{0}' of types '{1}' and '{2}' are not identical." },
          Interface_0_cannot_simultaneously_extend_types_1_and_2: { code: 2320, category: ts.DiagnosticCategory.Error, key: "Interface_0_cannot_simultaneously_extend_types_1_and_2_2320", message: "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'." },
          Excessive_stack_depth_comparing_types_0_and_1: { code: 2321, category: ts.DiagnosticCategory.Error, key: "Excessive_stack_depth_comparing_types_0_and_1_2321", message: "Excessive stack depth comparing types '{0}' and '{1}'." },
          Type_0_is_not_assignable_to_type_1: { code: 2322, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_assignable_to_type_1_2322", message: "Type '{0}' is not assignable to type '{1}'." },
          Cannot_redeclare_exported_variable_0: { code: 2323, category: ts.DiagnosticCategory.Error, key: "Cannot_redeclare_exported_variable_0_2323", message: "Cannot redeclare exported variable '{0}'." },
          Property_0_is_missing_in_type_1: { code: 2324, category: ts.DiagnosticCategory.Error, key: "Property_0_is_missing_in_type_1_2324", message: "Property '{0}' is missing in type '{1}'." },
          Property_0_is_private_in_type_1_but_not_in_type_2: { code: 2325, category: ts.DiagnosticCategory.Error, key: "Property_0_is_private_in_type_1_but_not_in_type_2_2325", message: "Property '{0}' is private in type '{1}' but not in type '{2}'." },
          Types_of_property_0_are_incompatible: { code: 2326, category: ts.DiagnosticCategory.Error, key: "Types_of_property_0_are_incompatible_2326", message: "Types of property '{0}' are incompatible." },
          Property_0_is_optional_in_type_1_but_required_in_type_2: { code: 2327, category: ts.DiagnosticCategory.Error, key: "Property_0_is_optional_in_type_1_but_required_in_type_2_2327", message: "Property '{0}' is optional in type '{1}' but required in type '{2}'." },
          Types_of_parameters_0_and_1_are_incompatible: { code: 2328, category: ts.DiagnosticCategory.Error, key: "Types_of_parameters_0_and_1_are_incompatible_2328", message: "Types of parameters '{0}' and '{1}' are incompatible." },
          Index_signature_is_missing_in_type_0: { code: 2329, category: ts.DiagnosticCategory.Error, key: "Index_signature_is_missing_in_type_0_2329", message: "Index signature is missing in type '{0}'." },
          Index_signatures_are_incompatible: { code: 2330, category: ts.DiagnosticCategory.Error, key: "Index_signatures_are_incompatible_2330", message: "Index signatures are incompatible." },
          this_cannot_be_referenced_in_a_module_or_namespace_body: { code: 2331, category: ts.DiagnosticCategory.Error, key: "this_cannot_be_referenced_in_a_module_or_namespace_body_2331", message: "'this' cannot be referenced in a module or namespace body." },
          this_cannot_be_referenced_in_current_location: { code: 2332, category: ts.DiagnosticCategory.Error, key: "this_cannot_be_referenced_in_current_location_2332", message: "'this' cannot be referenced in current location." },
          this_cannot_be_referenced_in_constructor_arguments: { code: 2333, category: ts.DiagnosticCategory.Error, key: "this_cannot_be_referenced_in_constructor_arguments_2333", message: "'this' cannot be referenced in constructor arguments." },
          this_cannot_be_referenced_in_a_static_property_initializer: { code: 2334, category: ts.DiagnosticCategory.Error, key: "this_cannot_be_referenced_in_a_static_property_initializer_2334", message: "'this' cannot be referenced in a static property initializer." },
          super_can_only_be_referenced_in_a_derived_class: { code: 2335, category: ts.DiagnosticCategory.Error, key: "super_can_only_be_referenced_in_a_derived_class_2335", message: "'super' can only be referenced in a derived class." },
          super_cannot_be_referenced_in_constructor_arguments: { code: 2336, category: ts.DiagnosticCategory.Error, key: "super_cannot_be_referenced_in_constructor_arguments_2336", message: "'super' cannot be referenced in constructor arguments." },
          Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors: { code: 2337, category: ts.DiagnosticCategory.Error, key: "Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors_2337", message: "Super calls are not permitted outside constructors or in nested functions inside constructors." },
          super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class: { code: 2338, category: ts.DiagnosticCategory.Error, key: "super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_der_2338", message: "'super' property access is permitted only in a constructor, member function, or member accessor of a derived class." },
          Property_0_does_not_exist_on_type_1: { code: 2339, category: ts.DiagnosticCategory.Error, key: "Property_0_does_not_exist_on_type_1_2339", message: "Property '{0}' does not exist on type '{1}'." },
          Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword: { code: 2340, category: ts.DiagnosticCategory.Error, key: "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340", message: "Only public and protected methods of the base class are accessible via the 'super' keyword." },
          Property_0_is_private_and_only_accessible_within_class_1: { code: 2341, category: ts.DiagnosticCategory.Error, key: "Property_0_is_private_and_only_accessible_within_class_1_2341", message: "Property '{0}' is private and only accessible within class '{1}'." },
          An_index_expression_argument_must_be_of_type_string_number_symbol_or_any: { code: 2342, category: ts.DiagnosticCategory.Error, key: "An_index_expression_argument_must_be_of_type_string_number_symbol_or_any_2342", message: "An index expression argument must be of type 'string', 'number', 'symbol', or 'any'." },
          This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1: { code: 2343, category: ts.DiagnosticCategory.Error, key: "This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1_2343", message: "This syntax requires an imported helper named '{1}', but module '{0}' has no exported member '{1}'." },
          Type_0_does_not_satisfy_the_constraint_1: { code: 2344, category: ts.DiagnosticCategory.Error, key: "Type_0_does_not_satisfy_the_constraint_1_2344", message: "Type '{0}' does not satisfy the constraint '{1}'." },
          Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: { code: 2345, category: ts.DiagnosticCategory.Error, key: "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345", message: "Argument of type '{0}' is not assignable to parameter of type '{1}'." },
          Supplied_parameters_do_not_match_any_signature_of_call_target: { code: 2346, category: ts.DiagnosticCategory.Error, key: "Supplied_parameters_do_not_match_any_signature_of_call_target_2346", message: "Supplied parameters do not match any signature of call target." },
          Untyped_function_calls_may_not_accept_type_arguments: { code: 2347, category: ts.DiagnosticCategory.Error, key: "Untyped_function_calls_may_not_accept_type_arguments_2347", message: "Untyped function calls may not accept type arguments." },
          Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: { code: 2348, category: ts.DiagnosticCategory.Error, key: "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348", message: "Value of type '{0}' is not callable. Did you mean to include 'new'?" },
          Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatures: { code: 2349, category: ts.DiagnosticCategory.Error, key: "Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatur_2349", message: "Cannot invoke an expression whose type lacks a call signature. Type '{0}' has no compatible call signatures." },
          Only_a_void_function_can_be_called_with_the_new_keyword: { code: 2350, category: ts.DiagnosticCategory.Error, key: "Only_a_void_function_can_be_called_with_the_new_keyword_2350", message: "Only a void function can be called with the 'new' keyword." },
          Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature: { code: 2351, category: ts.DiagnosticCategory.Error, key: "Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature_2351", message: "Cannot use 'new' with an expression whose type lacks a call or construct signature." },
          Type_0_cannot_be_converted_to_type_1: { code: 2352, category: ts.DiagnosticCategory.Error, key: "Type_0_cannot_be_converted_to_type_1_2352", message: "Type '{0}' cannot be converted to type '{1}'." },
          Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1: { code: 2353, category: ts.DiagnosticCategory.Error, key: "Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353", message: "Object literal may only specify known properties, and '{0}' does not exist in type '{1}'." },
          This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found: { code: 2354, category: ts.DiagnosticCategory.Error, key: "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354", message: "This syntax requires an imported helper but module '{0}' cannot be found." },
          A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value: { code: 2355, category: ts.DiagnosticCategory.Error, key: "A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_2355", message: "A function whose declared type is neither 'void' nor 'any' must return a value." },
          An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type: { code: 2356, category: ts.DiagnosticCategory.Error, key: "An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type_2356", message: "An arithmetic operand must be of type 'any', 'number' or an enum type." },
          The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access: { code: 2357, category: ts.DiagnosticCategory.Error, key: "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357", message: "The operand of an increment or decrement operator must be a variable or a property access." },
          The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2358, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358", message: "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter." },
          The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type: { code: 2359, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359", message: "The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type." },
          The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol: { code: 2360, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360", message: "The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'." },
          The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2361, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361", message: "The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter" },
          The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2362, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2362", message: "The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." },
          The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2363, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2363", message: "The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." },
          The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access: { code: 2364, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364", message: "The left-hand side of an assignment expression must be a variable or a property access." },
          Operator_0_cannot_be_applied_to_types_1_and_2: { code: 2365, category: ts.DiagnosticCategory.Error, key: "Operator_0_cannot_be_applied_to_types_1_and_2_2365", message: "Operator '{0}' cannot be applied to types '{1}' and '{2}'." },
          Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined: { code: 2366, category: ts.DiagnosticCategory.Error, key: "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366", message: "Function lacks ending return statement and return type does not include 'undefined'." },
          Type_parameter_name_cannot_be_0: { code: 2368, category: ts.DiagnosticCategory.Error, key: "Type_parameter_name_cannot_be_0_2368", message: "Type parameter name cannot be '{0}'" },
          A_parameter_property_is_only_allowed_in_a_constructor_implementation: { code: 2369, category: ts.DiagnosticCategory.Error, key: "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369", message: "A parameter property is only allowed in a constructor implementation." },
          A_rest_parameter_must_be_of_an_array_type: { code: 2370, category: ts.DiagnosticCategory.Error, key: "A_rest_parameter_must_be_of_an_array_type_2370", message: "A rest parameter must be of an array type." },
          A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation: { code: 2371, category: ts.DiagnosticCategory.Error, key: "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371", message: "A parameter initializer is only allowed in a function or constructor implementation." },
          Parameter_0_cannot_be_referenced_in_its_initializer: { code: 2372, category: ts.DiagnosticCategory.Error, key: "Parameter_0_cannot_be_referenced_in_its_initializer_2372", message: "Parameter '{0}' cannot be referenced in its initializer." },
          Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it: { code: 2373, category: ts.DiagnosticCategory.Error, key: "Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it_2373", message: "Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it." },
          Duplicate_string_index_signature: { code: 2374, category: ts.DiagnosticCategory.Error, key: "Duplicate_string_index_signature_2374", message: "Duplicate string index signature." },
          Duplicate_number_index_signature: { code: 2375, category: ts.DiagnosticCategory.Error, key: "Duplicate_number_index_signature_2375", message: "Duplicate number index signature." },
          A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties: { code: 2376, category: ts.DiagnosticCategory.Error, key: "A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376", message: "A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties." },
          Constructors_for_derived_classes_must_contain_a_super_call: { code: 2377, category: ts.DiagnosticCategory.Error, key: "Constructors_for_derived_classes_must_contain_a_super_call_2377", message: "Constructors for derived classes must contain a 'super' call." },
          A_get_accessor_must_return_a_value: { code: 2378, category: ts.DiagnosticCategory.Error, key: "A_get_accessor_must_return_a_value_2378", message: "A 'get' accessor must return a value." },
          Getter_and_setter_accessors_do_not_agree_in_visibility: { code: 2379, category: ts.DiagnosticCategory.Error, key: "Getter_and_setter_accessors_do_not_agree_in_visibility_2379", message: "Getter and setter accessors do not agree in visibility." },
          get_and_set_accessor_must_have_the_same_type: { code: 2380, category: ts.DiagnosticCategory.Error, key: "get_and_set_accessor_must_have_the_same_type_2380", message: "'get' and 'set' accessor must have the same type." },
          A_signature_with_an_implementation_cannot_use_a_string_literal_type: { code: 2381, category: ts.DiagnosticCategory.Error, key: "A_signature_with_an_implementation_cannot_use_a_string_literal_type_2381", message: "A signature with an implementation cannot use a string literal type." },
          Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature: { code: 2382, category: ts.DiagnosticCategory.Error, key: "Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature_2382", message: "Specialized overload signature is not assignable to any non-specialized signature." },
          Overload_signatures_must_all_be_exported_or_non_exported: { code: 2383, category: ts.DiagnosticCategory.Error, key: "Overload_signatures_must_all_be_exported_or_non_exported_2383", message: "Overload signatures must all be exported or non-exported." },
          Overload_signatures_must_all_be_ambient_or_non_ambient: { code: 2384, category: ts.DiagnosticCategory.Error, key: "Overload_signatures_must_all_be_ambient_or_non_ambient_2384", message: "Overload signatures must all be ambient or non-ambient." },
          Overload_signatures_must_all_be_public_private_or_protected: { code: 2385, category: ts.DiagnosticCategory.Error, key: "Overload_signatures_must_all_be_public_private_or_protected_2385", message: "Overload signatures must all be public, private or protected." },
          Overload_signatures_must_all_be_optional_or_required: { code: 2386, category: ts.DiagnosticCategory.Error, key: "Overload_signatures_must_all_be_optional_or_required_2386", message: "Overload signatures must all be optional or required." },
          Function_overload_must_be_static: { code: 2387, category: ts.DiagnosticCategory.Error, key: "Function_overload_must_be_static_2387", message: "Function overload must be static." },
          Function_overload_must_not_be_static: { code: 2388, category: ts.DiagnosticCategory.Error, key: "Function_overload_must_not_be_static_2388", message: "Function overload must not be static." },
          Function_implementation_name_must_be_0: { code: 2389, category: ts.DiagnosticCategory.Error, key: "Function_implementation_name_must_be_0_2389", message: "Function implementation name must be '{0}'." },
          Constructor_implementation_is_missing: { code: 2390, category: ts.DiagnosticCategory.Error, key: "Constructor_implementation_is_missing_2390", message: "Constructor implementation is missing." },
          Function_implementation_is_missing_or_not_immediately_following_the_declaration: { code: 2391, category: ts.DiagnosticCategory.Error, key: "Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391", message: "Function implementation is missing or not immediately following the declaration." },
          Multiple_constructor_implementations_are_not_allowed: { code: 2392, category: ts.DiagnosticCategory.Error, key: "Multiple_constructor_implementations_are_not_allowed_2392", message: "Multiple constructor implementations are not allowed." },
          Duplicate_function_implementation: { code: 2393, category: ts.DiagnosticCategory.Error, key: "Duplicate_function_implementation_2393", message: "Duplicate function implementation." },
          Overload_signature_is_not_compatible_with_function_implementation: { code: 2394, category: ts.DiagnosticCategory.Error, key: "Overload_signature_is_not_compatible_with_function_implementation_2394", message: "Overload signature is not compatible with function implementation." },
          Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local: { code: 2395, category: ts.DiagnosticCategory.Error, key: "Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395", message: "Individual declarations in merged declaration '{0}' must be all exported or all local." },
          Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters: { code: 2396, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters_2396", message: "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters." },
          Declaration_name_conflicts_with_built_in_global_identifier_0: { code: 2397, category: ts.DiagnosticCategory.Error, key: "Declaration_name_conflicts_with_built_in_global_identifier_0_2397", message: "Declaration name conflicts with built-in global identifier '{0}'." },
          Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference: { code: 2399, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399", message: "Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference." },
          Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference: { code: 2400, category: ts.DiagnosticCategory.Error, key: "Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference_2400", message: "Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference." },
          Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference: { code: 2401, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference_2401", message: "Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference." },
          Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference: { code: 2402, category: ts.DiagnosticCategory.Error, key: "Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402", message: "Expression resolves to '_super' that compiler uses to capture base class reference." },
          Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2: { code: 2403, category: ts.DiagnosticCategory.Error, key: "Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403", message: "Subsequent variable declarations must have the same type.  Variable '{0}' must be of type '{1}', but here has type '{2}'." },
          The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation: { code: 2404, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404", message: "The left-hand side of a 'for...in' statement cannot use a type annotation." },
          The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any: { code: 2405, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405", message: "The left-hand side of a 'for...in' statement must be of type 'string' or 'any'." },
          The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access: { code: 2406, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406", message: "The left-hand side of a 'for...in' statement must be a variable or a property access." },
          The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2407, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_2407", message: "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter." },
          Setters_cannot_return_a_value: { code: 2408, category: ts.DiagnosticCategory.Error, key: "Setters_cannot_return_a_value_2408", message: "Setters cannot return a value." },
          Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: { code: 2409, category: ts.DiagnosticCategory.Error, key: "Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409", message: "Return type of constructor signature must be assignable to the instance type of the class" },
          The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any: { code: 2410, category: ts.DiagnosticCategory.Error, key: "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410", message: "The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'." },
          Property_0_of_type_1_is_not_assignable_to_string_index_type_2: { code: 2411, category: ts.DiagnosticCategory.Error, key: "Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411", message: "Property '{0}' of type '{1}' is not assignable to string index type '{2}'." },
          Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2: { code: 2412, category: ts.DiagnosticCategory.Error, key: "Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412", message: "Property '{0}' of type '{1}' is not assignable to numeric index type '{2}'." },
          Numeric_index_type_0_is_not_assignable_to_string_index_type_1: { code: 2413, category: ts.DiagnosticCategory.Error, key: "Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413", message: "Numeric index type '{0}' is not assignable to string index type '{1}'." },
          Class_name_cannot_be_0: { code: 2414, category: ts.DiagnosticCategory.Error, key: "Class_name_cannot_be_0_2414", message: "Class name cannot be '{0}'" },
          Class_0_incorrectly_extends_base_class_1: { code: 2415, category: ts.DiagnosticCategory.Error, key: "Class_0_incorrectly_extends_base_class_1_2415", message: "Class '{0}' incorrectly extends base class '{1}'." },
          Class_static_side_0_incorrectly_extends_base_class_static_side_1: { code: 2417, category: ts.DiagnosticCategory.Error, key: "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417", message: "Class static side '{0}' incorrectly extends base class static side '{1}'." },
          Class_0_incorrectly_implements_interface_1: { code: 2420, category: ts.DiagnosticCategory.Error, key: "Class_0_incorrectly_implements_interface_1_2420", message: "Class '{0}' incorrectly implements interface '{1}'." },
          A_class_may_only_implement_another_class_or_interface: { code: 2422, category: ts.DiagnosticCategory.Error, key: "A_class_may_only_implement_another_class_or_interface_2422", message: "A class may only implement another class or interface." },
          Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor: { code: 2423, category: ts.DiagnosticCategory.Error, key: "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423", message: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor." },
          Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property: { code: 2424, category: ts.DiagnosticCategory.Error, key: "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424", message: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property." },
          Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2425, category: ts.DiagnosticCategory.Error, key: "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425", message: "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function." },
          Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2426, category: ts.DiagnosticCategory.Error, key: "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426", message: "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function." },
          Interface_name_cannot_be_0: { code: 2427, category: ts.DiagnosticCategory.Error, key: "Interface_name_cannot_be_0_2427", message: "Interface name cannot be '{0}'" },
          All_declarations_of_0_must_have_identical_type_parameters: { code: 2428, category: ts.DiagnosticCategory.Error, key: "All_declarations_of_0_must_have_identical_type_parameters_2428", message: "All declarations of '{0}' must have identical type parameters." },
          Interface_0_incorrectly_extends_interface_1: { code: 2430, category: ts.DiagnosticCategory.Error, key: "Interface_0_incorrectly_extends_interface_1_2430", message: "Interface '{0}' incorrectly extends interface '{1}'." },
          Enum_name_cannot_be_0: { code: 2431, category: ts.DiagnosticCategory.Error, key: "Enum_name_cannot_be_0_2431", message: "Enum name cannot be '{0}'" },
          In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: { code: 2432, category: ts.DiagnosticCategory.Error, key: "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432", message: "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element." },
          A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: { code: 2433, category: ts.DiagnosticCategory.Error, key: "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433", message: "A namespace declaration cannot be in a different file from a class or function with which it is merged" },
          A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: { code: 2434, category: ts.DiagnosticCategory.Error, key: "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434", message: "A namespace declaration cannot be located prior to a class or function with which it is merged" },
          Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces: { code: 2435, category: ts.DiagnosticCategory.Error, key: "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435", message: "Ambient modules cannot be nested in other modules or namespaces." },
          Ambient_module_declaration_cannot_specify_relative_module_name: { code: 2436, category: ts.DiagnosticCategory.Error, key: "Ambient_module_declaration_cannot_specify_relative_module_name_2436", message: "Ambient module declaration cannot specify relative module name." },
          Module_0_is_hidden_by_a_local_declaration_with_the_same_name: { code: 2437, category: ts.DiagnosticCategory.Error, key: "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437", message: "Module '{0}' is hidden by a local declaration with the same name" },
          Import_name_cannot_be_0: { code: 2438, category: ts.DiagnosticCategory.Error, key: "Import_name_cannot_be_0_2438", message: "Import name cannot be '{0}'" },
          Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name: { code: 2439, category: ts.DiagnosticCategory.Error, key: "Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439", message: "Import or export declaration in an ambient module declaration cannot reference module through relative module name." },
          Import_declaration_conflicts_with_local_declaration_of_0: { code: 2440, category: ts.DiagnosticCategory.Error, key: "Import_declaration_conflicts_with_local_declaration_of_0_2440", message: "Import declaration conflicts with local declaration of '{0}'" },
          Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module: { code: 2441, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441", message: "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module." },
          Types_have_separate_declarations_of_a_private_property_0: { code: 2442, category: ts.DiagnosticCategory.Error, key: "Types_have_separate_declarations_of_a_private_property_0_2442", message: "Types have separate declarations of a private property '{0}'." },
          Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2: { code: 2443, category: ts.DiagnosticCategory.Error, key: "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443", message: "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'." },
          Property_0_is_protected_in_type_1_but_public_in_type_2: { code: 2444, category: ts.DiagnosticCategory.Error, key: "Property_0_is_protected_in_type_1_but_public_in_type_2_2444", message: "Property '{0}' is protected in type '{1}' but public in type '{2}'." },
          Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses: { code: 2445, category: ts.DiagnosticCategory.Error, key: "Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses_2445", message: "Property '{0}' is protected and only accessible within class '{1}' and its subclasses." },
          Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1: { code: 2446, category: ts.DiagnosticCategory.Error, key: "Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_2446", message: "Property '{0}' is protected and only accessible through an instance of class '{1}'." },
          The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead: { code: 2447, category: ts.DiagnosticCategory.Error, key: "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447", message: "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead." },
          Block_scoped_variable_0_used_before_its_declaration: { code: 2448, category: ts.DiagnosticCategory.Error, key: "Block_scoped_variable_0_used_before_its_declaration_2448", message: "Block-scoped variable '{0}' used before its declaration." },
          Cannot_redeclare_block_scoped_variable_0: { code: 2451, category: ts.DiagnosticCategory.Error, key: "Cannot_redeclare_block_scoped_variable_0_2451", message: "Cannot redeclare block-scoped variable '{0}'." },
          An_enum_member_cannot_have_a_numeric_name: { code: 2452, category: ts.DiagnosticCategory.Error, key: "An_enum_member_cannot_have_a_numeric_name_2452", message: "An enum member cannot have a numeric name." },
          The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly: { code: 2453, category: ts.DiagnosticCategory.Error, key: "The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453", message: "The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly." },
          Variable_0_is_used_before_being_assigned: { code: 2454, category: ts.DiagnosticCategory.Error, key: "Variable_0_is_used_before_being_assigned_2454", message: "Variable '{0}' is used before being assigned." },
          Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0: { code: 2455, category: ts.DiagnosticCategory.Error, key: "Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_2455", message: "Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'." },
          Type_alias_0_circularly_references_itself: { code: 2456, category: ts.DiagnosticCategory.Error, key: "Type_alias_0_circularly_references_itself_2456", message: "Type alias '{0}' circularly references itself." },
          Type_alias_name_cannot_be_0: { code: 2457, category: ts.DiagnosticCategory.Error, key: "Type_alias_name_cannot_be_0_2457", message: "Type alias name cannot be '{0}'" },
          An_AMD_module_cannot_have_multiple_name_assignments: { code: 2458, category: ts.DiagnosticCategory.Error, key: "An_AMD_module_cannot_have_multiple_name_assignments_2458", message: "An AMD module cannot have multiple name assignments." },
          Type_0_has_no_property_1_and_no_string_index_signature: { code: 2459, category: ts.DiagnosticCategory.Error, key: "Type_0_has_no_property_1_and_no_string_index_signature_2459", message: "Type '{0}' has no property '{1}' and no string index signature." },
          Type_0_has_no_property_1: { code: 2460, category: ts.DiagnosticCategory.Error, key: "Type_0_has_no_property_1_2460", message: "Type '{0}' has no property '{1}'." },
          Type_0_is_not_an_array_type: { code: 2461, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_an_array_type_2461", message: "Type '{0}' is not an array type." },
          A_rest_element_must_be_last_in_a_destructuring_pattern: { code: 2462, category: ts.DiagnosticCategory.Error, key: "A_rest_element_must_be_last_in_a_destructuring_pattern_2462", message: "A rest element must be last in a destructuring pattern" },
          A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature: { code: 2463, category: ts.DiagnosticCategory.Error, key: "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463", message: "A binding pattern parameter cannot be optional in an implementation signature." },
          A_computed_property_name_must_be_of_type_string_number_symbol_or_any: { code: 2464, category: ts.DiagnosticCategory.Error, key: "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464", message: "A computed property name must be of type 'string', 'number', 'symbol', or 'any'." },
          this_cannot_be_referenced_in_a_computed_property_name: { code: 2465, category: ts.DiagnosticCategory.Error, key: "this_cannot_be_referenced_in_a_computed_property_name_2465", message: "'this' cannot be referenced in a computed property name." },
          super_cannot_be_referenced_in_a_computed_property_name: { code: 2466, category: ts.DiagnosticCategory.Error, key: "super_cannot_be_referenced_in_a_computed_property_name_2466", message: "'super' cannot be referenced in a computed property name." },
          A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type: { code: 2467, category: ts.DiagnosticCategory.Error, key: "A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467", message: "A computed property name cannot reference a type parameter from its containing type." },
          Cannot_find_global_value_0: { code: 2468, category: ts.DiagnosticCategory.Error, key: "Cannot_find_global_value_0_2468", message: "Cannot find global value '{0}'." },
          The_0_operator_cannot_be_applied_to_type_symbol: { code: 2469, category: ts.DiagnosticCategory.Error, key: "The_0_operator_cannot_be_applied_to_type_symbol_2469", message: "The '{0}' operator cannot be applied to type 'symbol'." },
          Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object: { code: 2470, category: ts.DiagnosticCategory.Error, key: "Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object_2470", message: "'Symbol' reference does not refer to the global Symbol constructor object." },
          A_computed_property_name_of_the_form_0_must_be_of_type_symbol: { code: 2471, category: ts.DiagnosticCategory.Error, key: "A_computed_property_name_of_the_form_0_must_be_of_type_symbol_2471", message: "A computed property name of the form '{0}' must be of type 'symbol'." },
          Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher: { code: 2472, category: ts.DiagnosticCategory.Error, key: "Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472", message: "Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher." },
          Enum_declarations_must_all_be_const_or_non_const: { code: 2473, category: ts.DiagnosticCategory.Error, key: "Enum_declarations_must_all_be_const_or_non_const_2473", message: "Enum declarations must all be const or non-const." },
          In_const_enum_declarations_member_initializer_must_be_constant_expression: { code: 2474, category: ts.DiagnosticCategory.Error, key: "In_const_enum_declarations_member_initializer_must_be_constant_expression_2474", message: "In 'const' enum declarations member initializer must be constant expression." },
          const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment: { code: 2475, category: ts.DiagnosticCategory.Error, key: "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475", message: "'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment." },
          A_const_enum_member_can_only_be_accessed_using_a_string_literal: { code: 2476, category: ts.DiagnosticCategory.Error, key: "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476", message: "A const enum member can only be accessed using a string literal." },
          const_enum_member_initializer_was_evaluated_to_a_non_finite_value: { code: 2477, category: ts.DiagnosticCategory.Error, key: "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477", message: "'const' enum member initializer was evaluated to a non-finite value." },
          const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN: { code: 2478, category: ts.DiagnosticCategory.Error, key: "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478", message: "'const' enum member initializer was evaluated to disallowed value 'NaN'." },
          Property_0_does_not_exist_on_const_enum_1: { code: 2479, category: ts.DiagnosticCategory.Error, key: "Property_0_does_not_exist_on_const_enum_1_2479", message: "Property '{0}' does not exist on 'const' enum '{1}'." },
          let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations: { code: 2480, category: ts.DiagnosticCategory.Error, key: "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480", message: "'let' is not allowed to be used as a name in 'let' or 'const' declarations." },
          Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1: { code: 2481, category: ts.DiagnosticCategory.Error, key: "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481", message: "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'." },
          The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation: { code: 2483, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483", message: "The left-hand side of a 'for...of' statement cannot use a type annotation." },
          Export_declaration_conflicts_with_exported_declaration_of_0: { code: 2484, category: ts.DiagnosticCategory.Error, key: "Export_declaration_conflicts_with_exported_declaration_of_0_2484", message: "Export declaration conflicts with exported declaration of '{0}'" },
          The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access: { code: 2487, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487", message: "The left-hand side of a 'for...of' statement must be a variable or a property access." },
          Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator: { code: 2488, category: ts.DiagnosticCategory.Error, key: "Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488", message: "Type must have a '[Symbol.iterator]()' method that returns an iterator." },
          An_iterator_must_have_a_next_method: { code: 2489, category: ts.DiagnosticCategory.Error, key: "An_iterator_must_have_a_next_method_2489", message: "An iterator must have a 'next()' method." },
          The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property: { code: 2490, category: ts.DiagnosticCategory.Error, key: "The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property_2490", message: "The type returned by the 'next()' method of an iterator must have a 'value' property." },
          The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern: { code: 2491, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491", message: "The left-hand side of a 'for...in' statement cannot be a destructuring pattern." },
          Cannot_redeclare_identifier_0_in_catch_clause: { code: 2492, category: ts.DiagnosticCategory.Error, key: "Cannot_redeclare_identifier_0_in_catch_clause_2492", message: "Cannot redeclare identifier '{0}' in catch clause" },
          Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2: { code: 2493, category: ts.DiagnosticCategory.Error, key: "Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2_2493", message: "Tuple type '{0}' with length '{1}' cannot be assigned to tuple with length '{2}'." },
          Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher: { code: 2494, category: ts.DiagnosticCategory.Error, key: "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494", message: "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher." },
          Type_0_is_not_an_array_type_or_a_string_type: { code: 2495, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_an_array_type_or_a_string_type_2495", message: "Type '{0}' is not an array type or a string type." },
          The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression: { code: 2496, category: ts.DiagnosticCategory.Error, key: "The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_stand_2496", message: "The 'arguments' object cannot be referenced in an arrow function in ES3 and ES5. Consider using a standard function expression." },
          Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct: { code: 2497, category: ts.DiagnosticCategory.Error, key: "Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct_2497", message: "Module '{0}' resolves to a non-module entity and cannot be imported using this construct." },
          Module_0_uses_export_and_cannot_be_used_with_export_Asterisk: { code: 2498, category: ts.DiagnosticCategory.Error, key: "Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498", message: "Module '{0}' uses 'export =' and cannot be used with 'export *'." },
          An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments: { code: 2499, category: ts.DiagnosticCategory.Error, key: "An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499", message: "An interface can only extend an identifier/qualified-name with optional type arguments." },
          A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments: { code: 2500, category: ts.DiagnosticCategory.Error, key: "A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500", message: "A class can only implement an identifier/qualified-name with optional type arguments." },
          A_rest_element_cannot_contain_a_binding_pattern: { code: 2501, category: ts.DiagnosticCategory.Error, key: "A_rest_element_cannot_contain_a_binding_pattern_2501", message: "A rest element cannot contain a binding pattern." },
          _0_is_referenced_directly_or_indirectly_in_its_own_type_annotation: { code: 2502, category: ts.DiagnosticCategory.Error, key: "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502", message: "'{0}' is referenced directly or indirectly in its own type annotation." },
          Cannot_find_namespace_0: { code: 2503, category: ts.DiagnosticCategory.Error, key: "Cannot_find_namespace_0_2503", message: "Cannot find namespace '{0}'." },
          A_generator_cannot_have_a_void_type_annotation: { code: 2505, category: ts.DiagnosticCategory.Error, key: "A_generator_cannot_have_a_void_type_annotation_2505", message: "A generator cannot have a 'void' type annotation." },
          _0_is_referenced_directly_or_indirectly_in_its_own_base_expression: { code: 2506, category: ts.DiagnosticCategory.Error, key: "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506", message: "'{0}' is referenced directly or indirectly in its own base expression." },
          Type_0_is_not_a_constructor_function_type: { code: 2507, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_a_constructor_function_type_2507", message: "Type '{0}' is not a constructor function type." },
          No_base_constructor_has_the_specified_number_of_type_arguments: { code: 2508, category: ts.DiagnosticCategory.Error, key: "No_base_constructor_has_the_specified_number_of_type_arguments_2508", message: "No base constructor has the specified number of type arguments." },
          Base_constructor_return_type_0_is_not_a_class_or_interface_type: { code: 2509, category: ts.DiagnosticCategory.Error, key: "Base_constructor_return_type_0_is_not_a_class_or_interface_type_2509", message: "Base constructor return type '{0}' is not a class or interface type." },
          Base_constructors_must_all_have_the_same_return_type: { code: 2510, category: ts.DiagnosticCategory.Error, key: "Base_constructors_must_all_have_the_same_return_type_2510", message: "Base constructors must all have the same return type." },
          Cannot_create_an_instance_of_the_abstract_class_0: { code: 2511, category: ts.DiagnosticCategory.Error, key: "Cannot_create_an_instance_of_the_abstract_class_0_2511", message: "Cannot create an instance of the abstract class '{0}'." },
          Overload_signatures_must_all_be_abstract_or_non_abstract: { code: 2512, category: ts.DiagnosticCategory.Error, key: "Overload_signatures_must_all_be_abstract_or_non_abstract_2512", message: "Overload signatures must all be abstract or non-abstract." },
          Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression: { code: 2513, category: ts.DiagnosticCategory.Error, key: "Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513", message: "Abstract method '{0}' in class '{1}' cannot be accessed via super expression." },
          Classes_containing_abstract_methods_must_be_marked_abstract: { code: 2514, category: ts.DiagnosticCategory.Error, key: "Classes_containing_abstract_methods_must_be_marked_abstract_2514", message: "Classes containing abstract methods must be marked abstract." },
          Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2: { code: 2515, category: ts.DiagnosticCategory.Error, key: "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515", message: "Non-abstract class '{0}' does not implement inherited abstract member '{1}' from class '{2}'." },
          All_declarations_of_an_abstract_method_must_be_consecutive: { code: 2516, category: ts.DiagnosticCategory.Error, key: "All_declarations_of_an_abstract_method_must_be_consecutive_2516", message: "All declarations of an abstract method must be consecutive." },
          Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type: { code: 2517, category: ts.DiagnosticCategory.Error, key: "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517", message: "Cannot assign an abstract constructor type to a non-abstract constructor type." },
          A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard: { code: 2518, category: ts.DiagnosticCategory.Error, key: "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518", message: "A 'this'-based type guard is not compatible with a parameter-based type guard." },
          Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions: { code: 2520, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520", message: "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions." },
          Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions: { code: 2521, category: ts.DiagnosticCategory.Error, key: "Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521", message: "Expression resolves to variable declaration '{0}' that compiler uses to support async functions." },
          The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method: { code: 2522, category: ts.DiagnosticCategory.Error, key: "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522", message: "The 'arguments' object cannot be referenced in an async function or method in ES3 and ES5. Consider using a standard function or method." },
          yield_expressions_cannot_be_used_in_a_parameter_initializer: { code: 2523, category: ts.DiagnosticCategory.Error, key: "yield_expressions_cannot_be_used_in_a_parameter_initializer_2523", message: "'yield' expressions cannot be used in a parameter initializer." },
          await_expressions_cannot_be_used_in_a_parameter_initializer: { code: 2524, category: ts.DiagnosticCategory.Error, key: "await_expressions_cannot_be_used_in_a_parameter_initializer_2524", message: "'await' expressions cannot be used in a parameter initializer." },
          Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value: { code: 2525, category: ts.DiagnosticCategory.Error, key: "Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525", message: "Initializer provides no value for this binding element and the binding element has no default value." },
          A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface: { code: 2526, category: ts.DiagnosticCategory.Error, key: "A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526", message: "A 'this' type is available only in a non-static member of a class or interface." },
          The_inferred_type_of_0_references_an_inaccessible_this_type_A_type_annotation_is_necessary: { code: 2527, category: ts.DiagnosticCategory.Error, key: "The_inferred_type_of_0_references_an_inaccessible_this_type_A_type_annotation_is_necessary_2527", message: "The inferred type of '{0}' references an inaccessible 'this' type. A type annotation is necessary." },
          A_module_cannot_have_multiple_default_exports: { code: 2528, category: ts.DiagnosticCategory.Error, key: "A_module_cannot_have_multiple_default_exports_2528", message: "A module cannot have multiple default exports." },
          Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions: { code: 2529, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_func_2529", message: "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions." },
          Property_0_is_incompatible_with_index_signature: { code: 2530, category: ts.DiagnosticCategory.Error, key: "Property_0_is_incompatible_with_index_signature_2530", message: "Property '{0}' is incompatible with index signature." },
          Object_is_possibly_null: { code: 2531, category: ts.DiagnosticCategory.Error, key: "Object_is_possibly_null_2531", message: "Object is possibly 'null'." },
          Object_is_possibly_undefined: { code: 2532, category: ts.DiagnosticCategory.Error, key: "Object_is_possibly_undefined_2532", message: "Object is possibly 'undefined'." },
          Object_is_possibly_null_or_undefined: { code: 2533, category: ts.DiagnosticCategory.Error, key: "Object_is_possibly_null_or_undefined_2533", message: "Object is possibly 'null' or 'undefined'." },
          A_function_returning_never_cannot_have_a_reachable_end_point: { code: 2534, category: ts.DiagnosticCategory.Error, key: "A_function_returning_never_cannot_have_a_reachable_end_point_2534", message: "A function returning 'never' cannot have a reachable end point." },
          Enum_type_0_has_members_with_initializers_that_are_not_literals: { code: 2535, category: ts.DiagnosticCategory.Error, key: "Enum_type_0_has_members_with_initializers_that_are_not_literals_2535", message: "Enum type '{0}' has members with initializers that are not literals." },
          Type_0_cannot_be_used_to_index_type_1: { code: 2536, category: ts.DiagnosticCategory.Error, key: "Type_0_cannot_be_used_to_index_type_1_2536", message: "Type '{0}' cannot be used to index type '{1}'." },
          Type_0_has_no_matching_index_signature_for_type_1: { code: 2537, category: ts.DiagnosticCategory.Error, key: "Type_0_has_no_matching_index_signature_for_type_1_2537", message: "Type '{0}' has no matching index signature for type '{1}'." },
          Type_0_cannot_be_used_as_an_index_type: { code: 2538, category: ts.DiagnosticCategory.Error, key: "Type_0_cannot_be_used_as_an_index_type_2538", message: "Type '{0}' cannot be used as an index type." },
          Cannot_assign_to_0_because_it_is_not_a_variable: { code: 2539, category: ts.DiagnosticCategory.Error, key: "Cannot_assign_to_0_because_it_is_not_a_variable_2539", message: "Cannot assign to '{0}' because it is not a variable." },
          Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property: { code: 2540, category: ts.DiagnosticCategory.Error, key: "Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property_2540", message: "Cannot assign to '{0}' because it is a constant or a read-only property." },
          The_target_of_an_assignment_must_be_a_variable_or_a_property_access: { code: 2541, category: ts.DiagnosticCategory.Error, key: "The_target_of_an_assignment_must_be_a_variable_or_a_property_access_2541", message: "The target of an assignment must be a variable or a property access." },
          Index_signature_in_type_0_only_permits_reading: { code: 2542, category: ts.DiagnosticCategory.Error, key: "Index_signature_in_type_0_only_permits_reading_2542", message: "Index signature in type '{0}' only permits reading." },
          Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference: { code: 2543, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543", message: "Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference." },
          Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference: { code: 2544, category: ts.DiagnosticCategory.Error, key: "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544", message: "Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference." },
          A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any: { code: 2545, category: ts.DiagnosticCategory.Error, key: "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545", message: "A mixin class must have a constructor with a single rest parameter of type 'any[]'." },
          Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1: { code: 2546, category: ts.DiagnosticCategory.Error, key: "Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546", message: "Property '{0}' has conflicting declarations and is inaccessible in type '{1}'." },
          JSX_element_attributes_type_0_may_not_be_a_union_type: { code: 2600, category: ts.DiagnosticCategory.Error, key: "JSX_element_attributes_type_0_may_not_be_a_union_type_2600", message: "JSX element attributes type '{0}' may not be a union type." },
          The_return_type_of_a_JSX_element_constructor_must_return_an_object_type: { code: 2601, category: ts.DiagnosticCategory.Error, key: "The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601", message: "The return type of a JSX element constructor must return an object type." },
          JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist: { code: 2602, category: ts.DiagnosticCategory.Error, key: "JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602", message: "JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist." },
          Property_0_in_type_1_is_not_assignable_to_type_2: { code: 2603, category: ts.DiagnosticCategory.Error, key: "Property_0_in_type_1_is_not_assignable_to_type_2_2603", message: "Property '{0}' in type '{1}' is not assignable to type '{2}'" },
          JSX_element_type_0_does_not_have_any_construct_or_call_signatures: { code: 2604, category: ts.DiagnosticCategory.Error, key: "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604", message: "JSX element type '{0}' does not have any construct or call signatures." },
          JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements: { code: 2605, category: ts.DiagnosticCategory.Error, key: "JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements_2605", message: "JSX element type '{0}' is not a constructor function for JSX elements." },
          Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property: { code: 2606, category: ts.DiagnosticCategory.Error, key: "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606", message: "Property '{0}' of JSX spread attribute is not assignable to target property." },
          JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: { code: 2607, category: ts.DiagnosticCategory.Error, key: "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", message: "JSX element class does not support attributes because it does not have a '{0}' property" },
          The_global_type_JSX_0_may_not_have_more_than_one_property: { code: 2608, category: ts.DiagnosticCategory.Error, key: "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", message: "The global type 'JSX.{0}' may not have more than one property" },
          JSX_spread_child_must_be_an_array_type: { code: 2609, category: ts.DiagnosticCategory.Error, key: "JSX_spread_child_must_be_an_array_type_2609", message: "JSX spread child must be an array type." },
          Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity: { code: 2649, category: ts.DiagnosticCategory.Error, key: "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649", message: "Cannot augment module '{0}' with value exports because it resolves to a non-module entity." },
          Cannot_emit_namespaced_JSX_elements_in_React: { code: 2650, category: ts.DiagnosticCategory.Error, key: "Cannot_emit_namespaced_JSX_elements_in_React_2650", message: "Cannot emit namespaced JSX elements in React" },
          A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums: { code: 2651, category: ts.DiagnosticCategory.Error, key: "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651", message: "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums." },
          Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead: { code: 2652, category: ts.DiagnosticCategory.Error, key: "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652", message: "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead." },
          Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1: { code: 2653, category: ts.DiagnosticCategory.Error, key: "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653", message: "Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'." },
          Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_package_author_to_update_the_package_definition: { code: 2654, category: ts.DiagnosticCategory.Error, key: "Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_pack_2654", message: "Exported external package typings file cannot contain tripleslash references. Please contact the package author to update the package definition." },
          Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_the_package_definition: { code: 2656, category: ts.DiagnosticCategory.Error, key: "Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_2656", message: "Exported external package typings file '{0}' is not a module. Please contact the package author to update the package definition." },
          JSX_expressions_must_have_one_parent_element: { code: 2657, category: ts.DiagnosticCategory.Error, key: "JSX_expressions_must_have_one_parent_element_2657", message: "JSX expressions must have one parent element" },
          Type_0_provides_no_match_for_the_signature_1: { code: 2658, category: ts.DiagnosticCategory.Error, key: "Type_0_provides_no_match_for_the_signature_1_2658", message: "Type '{0}' provides no match for the signature '{1}'" },
          super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher: { code: 2659, category: ts.DiagnosticCategory.Error, key: "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659", message: "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher." },
          super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions: { code: 2660, category: ts.DiagnosticCategory.Error, key: "super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660", message: "'super' can only be referenced in members of derived classes or object literal expressions." },
          Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module: { code: 2661, category: ts.DiagnosticCategory.Error, key: "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661", message: "Cannot export '{0}'. Only local declarations can be exported from a module." },
          Cannot_find_name_0_Did_you_mean_the_static_member_1_0: { code: 2662, category: ts.DiagnosticCategory.Error, key: "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662", message: "Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?" },
          Cannot_find_name_0_Did_you_mean_the_instance_member_this_0: { code: 2663, category: ts.DiagnosticCategory.Error, key: "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663", message: "Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?" },
          Invalid_module_name_in_augmentation_module_0_cannot_be_found: { code: 2664, category: ts.DiagnosticCategory.Error, key: "Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664", message: "Invalid module name in augmentation, module '{0}' cannot be found." },
          Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented: { code: 2665, category: ts.DiagnosticCategory.Error, key: "Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augm_2665", message: "Invalid module name in augmentation. Module '{0}' resolves to an untyped module at '{1}', which cannot be augmented." },
          Exports_and_export_assignments_are_not_permitted_in_module_augmentations: { code: 2666, category: ts.DiagnosticCategory.Error, key: "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666", message: "Exports and export assignments are not permitted in module augmentations." },
          Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module: { code: 2667, category: ts.DiagnosticCategory.Error, key: "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667", message: "Imports are not permitted in module augmentations. Consider moving them to the enclosing external module." },
          export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible: { code: 2668, category: ts.DiagnosticCategory.Error, key: "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668", message: "'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible." },
          Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations: { code: 2669, category: ts.DiagnosticCategory.Error, key: "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669", message: "Augmentations for the global scope can only be directly nested in external modules or ambient module declarations." },
          Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context: { code: 2670, category: ts.DiagnosticCategory.Error, key: "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670", message: "Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context." },
          Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity: { code: 2671, category: ts.DiagnosticCategory.Error, key: "Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671", message: "Cannot augment module '{0}' because it resolves to a non-module entity." },
          Cannot_assign_a_0_constructor_type_to_a_1_constructor_type: { code: 2672, category: ts.DiagnosticCategory.Error, key: "Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672", message: "Cannot assign a '{0}' constructor type to a '{1}' constructor type." },
          Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration: { code: 2673, category: ts.DiagnosticCategory.Error, key: "Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673", message: "Constructor of class '{0}' is private and only accessible within the class declaration." },
          Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration: { code: 2674, category: ts.DiagnosticCategory.Error, key: "Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674", message: "Constructor of class '{0}' is protected and only accessible within the class declaration." },
          Cannot_extend_a_class_0_Class_constructor_is_marked_as_private: { code: 2675, category: ts.DiagnosticCategory.Error, key: "Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675", message: "Cannot extend a class '{0}'. Class constructor is marked as private." },
          Accessors_must_both_be_abstract_or_non_abstract: { code: 2676, category: ts.DiagnosticCategory.Error, key: "Accessors_must_both_be_abstract_or_non_abstract_2676", message: "Accessors must both be abstract or non-abstract." },
          A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type: { code: 2677, category: ts.DiagnosticCategory.Error, key: "A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type_2677", message: "A type predicate's type must be assignable to its parameter's type." },
          Type_0_is_not_comparable_to_type_1: { code: 2678, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_comparable_to_type_1_2678", message: "Type '{0}' is not comparable to type '{1}'." },
          A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void: { code: 2679, category: ts.DiagnosticCategory.Error, key: "A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void_2679", message: "A function that is called with the 'new' keyword cannot have a 'this' type that is 'void'." },
          A_this_parameter_must_be_the_first_parameter: { code: 2680, category: ts.DiagnosticCategory.Error, key: "A_this_parameter_must_be_the_first_parameter_2680", message: "A 'this' parameter must be the first parameter." },
          A_constructor_cannot_have_a_this_parameter: { code: 2681, category: ts.DiagnosticCategory.Error, key: "A_constructor_cannot_have_a_this_parameter_2681", message: "A constructor cannot have a 'this' parameter." },
          get_and_set_accessor_must_have_the_same_this_type: { code: 2682, category: ts.DiagnosticCategory.Error, key: "get_and_set_accessor_must_have_the_same_this_type_2682", message: "'get' and 'set' accessor must have the same 'this' type." },
          this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation: { code: 2683, category: ts.DiagnosticCategory.Error, key: "this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683", message: "'this' implicitly has type 'any' because it does not have a type annotation." },
          The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1: { code: 2684, category: ts.DiagnosticCategory.Error, key: "The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684", message: "The 'this' context of type '{0}' is not assignable to method's 'this' of type '{1}'." },
          The_this_types_of_each_signature_are_incompatible: { code: 2685, category: ts.DiagnosticCategory.Error, key: "The_this_types_of_each_signature_are_incompatible_2685", message: "The 'this' types of each signature are incompatible." },
          _0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead: { code: 2686, category: ts.DiagnosticCategory.Error, key: "_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686", message: "'{0}' refers to a UMD global, but the current file is a module. Consider adding an import instead." },
          All_declarations_of_0_must_have_identical_modifiers: { code: 2687, category: ts.DiagnosticCategory.Error, key: "All_declarations_of_0_must_have_identical_modifiers_2687", message: "All declarations of '{0}' must have identical modifiers." },
          Cannot_find_type_definition_file_for_0: { code: 2688, category: ts.DiagnosticCategory.Error, key: "Cannot_find_type_definition_file_for_0_2688", message: "Cannot find type definition file for '{0}'." },
          Cannot_extend_an_interface_0_Did_you_mean_implements: { code: 2689, category: ts.DiagnosticCategory.Error, key: "Cannot_extend_an_interface_0_Did_you_mean_implements_2689", message: "Cannot extend an interface '{0}'. Did you mean 'implements'?" },
          A_class_must_be_declared_after_its_base_class: { code: 2690, category: ts.DiagnosticCategory.Error, key: "A_class_must_be_declared_after_its_base_class_2690", message: "A class must be declared after its base class." },
          An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead: { code: 2691, category: ts.DiagnosticCategory.Error, key: "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691", message: "An import path cannot end with a '{0}' extension. Consider importing '{1}' instead." },
          _0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible: { code: 2692, category: ts.DiagnosticCategory.Error, key: "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692", message: "'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible." },
          _0_only_refers_to_a_type_but_is_being_used_as_a_value_here: { code: 2693, category: ts.DiagnosticCategory.Error, key: "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693", message: "'{0}' only refers to a type, but is being used as a value here." },
          Namespace_0_has_no_exported_member_1: { code: 2694, category: ts.DiagnosticCategory.Error, key: "Namespace_0_has_no_exported_member_1_2694", message: "Namespace '{0}' has no exported member '{1}'." },
          Left_side_of_comma_operator_is_unused_and_has_no_side_effects: { code: 2695, category: ts.DiagnosticCategory.Error, key: "Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695", message: "Left side of comma operator is unused and has no side effects." },
          The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead: { code: 2696, category: ts.DiagnosticCategory.Error, key: "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696", message: "The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?" },
          An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: { code: 2697, category: ts.DiagnosticCategory.Error, key: "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697", message: "An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option." },
          Spread_types_may_only_be_created_from_object_types: { code: 2698, category: ts.DiagnosticCategory.Error, key: "Spread_types_may_only_be_created_from_object_types_2698", message: "Spread types may only be created from object types." },
          Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1: { code: 2699, category: ts.DiagnosticCategory.Error, key: "Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699", message: "Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'." },
          Rest_types_may_only_be_created_from_object_types: { code: 2700, category: ts.DiagnosticCategory.Error, key: "Rest_types_may_only_be_created_from_object_types_2700", message: "Rest types may only be created from object types." },
          The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access: { code: 2701, category: ts.DiagnosticCategory.Error, key: "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701", message: "The target of an object rest assignment must be a variable or a property access." },
          _0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here: { code: 2702, category: ts.DiagnosticCategory.Error, key: "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702", message: "'{0}' only refers to a type, but is being used as a namespace here." },
          The_operand_of_a_delete_operator_must_be_a_property_reference: { code: 2703, category: ts.DiagnosticCategory.Error, key: "The_operand_of_a_delete_operator_must_be_a_property_reference_2703", message: "The operand of a delete operator must be a property reference" },
          The_operand_of_a_delete_operator_cannot_be_a_read_only_property: { code: 2704, category: ts.DiagnosticCategory.Error, key: "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704", message: "The operand of a delete operator cannot be a read-only property" },
          An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: { code: 2705, category: ts.DiagnosticCategory.Error, key: "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705", message: "An async function or method in ES5/ES3 requires the 'Promise' constructor.  Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option." },
          Import_declaration_0_is_using_private_name_1: { code: 4000, category: ts.DiagnosticCategory.Error, key: "Import_declaration_0_is_using_private_name_1_4000", message: "Import declaration '{0}' is using private name '{1}'." },
          Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", message: "Type parameter '{0}' of exported class has or is using private name '{1}'." },
          Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", message: "Type parameter '{0}' of exported interface has or is using private name '{1}'." },
          Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4006, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4006", message: "Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'." },
          Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4008, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008", message: "Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'." },
          Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: { code: 4010, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010", message: "Type parameter '{0}' of public static method from exported class has or is using private name '{1}'." },
          Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: { code: 4012, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012", message: "Type parameter '{0}' of public method from exported class has or is using private name '{1}'." },
          Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: { code: 4014, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014", message: "Type parameter '{0}' of method from exported interface has or is using private name '{1}'." },
          Type_parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4016, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016", message: "Type parameter '{0}' of exported function has or is using private name '{1}'." },
          Implements_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4019, category: ts.DiagnosticCategory.Error, key: "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019", message: "Implements clause of exported class '{0}' has or is using private name '{1}'." },
          extends_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4020, category: ts.DiagnosticCategory.Error, key: "extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020", message: "'extends' clause of exported class '{0}' has or is using private name '{1}'." },
          extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: { code: 4022, category: ts.DiagnosticCategory.Error, key: "extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022", message: "'extends' clause of exported interface '{0}' has or is using private name '{1}'." },
          Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4023, category: ts.DiagnosticCategory.Error, key: "Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023", message: "Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named." },
          Exported_variable_0_has_or_is_using_name_1_from_private_module_2: { code: 4024, category: ts.DiagnosticCategory.Error, key: "Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024", message: "Exported variable '{0}' has or is using name '{1}' from private module '{2}'." },
          Exported_variable_0_has_or_is_using_private_name_1: { code: 4025, category: ts.DiagnosticCategory.Error, key: "Exported_variable_0_has_or_is_using_private_name_1_4025", message: "Exported variable '{0}' has or is using private name '{1}'." },
          Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4026, category: ts.DiagnosticCategory.Error, key: "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026", message: "Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named." },
          Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4027, category: ts.DiagnosticCategory.Error, key: "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027", message: "Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'." },
          Public_static_property_0_of_exported_class_has_or_is_using_private_name_1: { code: 4028, category: ts.DiagnosticCategory.Error, key: "Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028", message: "Public static property '{0}' of exported class has or is using private name '{1}'." },
          Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4029, category: ts.DiagnosticCategory.Error, key: "Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_name_4029", message: "Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named." },
          Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4030, category: ts.DiagnosticCategory.Error, key: "Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4030", message: "Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'." },
          Public_property_0_of_exported_class_has_or_is_using_private_name_1: { code: 4031, category: ts.DiagnosticCategory.Error, key: "Public_property_0_of_exported_class_has_or_is_using_private_name_1_4031", message: "Public property '{0}' of exported class has or is using private name '{1}'." },
          Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4032, category: ts.DiagnosticCategory.Error, key: "Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032", message: "Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'." },
          Property_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4033, category: ts.DiagnosticCategory.Error, key: "Property_0_of_exported_interface_has_or_is_using_private_name_1_4033", message: "Property '{0}' of exported interface has or is using private name '{1}'." },
          Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4034, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_4034", message: "Parameter '{0}' of public static property setter from exported class has or is using name '{1}' from private module '{2}'." },
          Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_name_1: { code: 4035, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_name_1_4035", message: "Parameter '{0}' of public static property setter from exported class has or is using private name '{1}'." },
          Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4036, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_4036", message: "Parameter '{0}' of public property setter from exported class has or is using name '{1}' from private module '{2}'." },
          Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_name_1: { code: 4037, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_name_1_4037", message: "Parameter '{0}' of public property setter from exported class has or is using private name '{1}'." },
          Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4038, category: ts.DiagnosticCategory.Error, key: "Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_externa_4038", message: "Return type of public static property getter from exported class has or is using name '{0}' from external module {1} but cannot be named." },
          Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4039, category: ts.DiagnosticCategory.Error, key: "Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_private_4039", message: "Return type of public static property getter from exported class has or is using name '{0}' from private module '{1}'." },
          Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_name_0: { code: 4040, category: ts.DiagnosticCategory.Error, key: "Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_name_0_4040", message: "Return type of public static property getter from exported class has or is using private name '{0}'." },
          Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4041, category: ts.DiagnosticCategory.Error, key: "Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_external_modul_4041", message: "Return type of public property getter from exported class has or is using name '{0}' from external module {1} but cannot be named." },
          Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4042, category: ts.DiagnosticCategory.Error, key: "Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_4042", message: "Return type of public property getter from exported class has or is using name '{0}' from private module '{1}'." },
          Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_name_0: { code: 4043, category: ts.DiagnosticCategory.Error, key: "Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_name_0_4043", message: "Return type of public property getter from exported class has or is using private name '{0}'." },
          Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4044, category: ts.DiagnosticCategory.Error, key: "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044", message: "Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'." },
          Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0: { code: 4045, category: ts.DiagnosticCategory.Error, key: "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0_4045", message: "Return type of constructor signature from exported interface has or is using private name '{0}'." },
          Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4046, category: ts.DiagnosticCategory.Error, key: "Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046", message: "Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'." },
          Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0: { code: 4047, category: ts.DiagnosticCategory.Error, key: "Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047", message: "Return type of call signature from exported interface has or is using private name '{0}'." },
          Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4048, category: ts.DiagnosticCategory.Error, key: "Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4048", message: "Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'." },
          Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0: { code: 4049, category: ts.DiagnosticCategory.Error, key: "Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0_4049", message: "Return type of index signature from exported interface has or is using private name '{0}'." },
          Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4050, category: ts.DiagnosticCategory.Error, key: "Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module__4050", message: "Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named." },
          Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4051, category: ts.DiagnosticCategory.Error, key: "Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4051", message: "Return type of public static method from exported class has or is using name '{0}' from private module '{1}'." },
          Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0: { code: 4052, category: ts.DiagnosticCategory.Error, key: "Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0_4052", message: "Return type of public static method from exported class has or is using private name '{0}'." },
          Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4053, category: ts.DiagnosticCategory.Error, key: "Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_c_4053", message: "Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named." },
          Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4054, category: ts.DiagnosticCategory.Error, key: "Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4054", message: "Return type of public method from exported class has or is using name '{0}' from private module '{1}'." },
          Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0: { code: 4055, category: ts.DiagnosticCategory.Error, key: "Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0_4055", message: "Return type of public method from exported class has or is using private name '{0}'." },
          Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4056, category: ts.DiagnosticCategory.Error, key: "Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4056", message: "Return type of method from exported interface has or is using name '{0}' from private module '{1}'." },
          Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0: { code: 4057, category: ts.DiagnosticCategory.Error, key: "Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0_4057", message: "Return type of method from exported interface has or is using private name '{0}'." },
          Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4058, category: ts.DiagnosticCategory.Error, key: "Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named_4058", message: "Return type of exported function has or is using name '{0}' from external module {1} but cannot be named." },
          Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1: { code: 4059, category: ts.DiagnosticCategory.Error, key: "Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1_4059", message: "Return type of exported function has or is using name '{0}' from private module '{1}'." },
          Return_type_of_exported_function_has_or_is_using_private_name_0: { code: 4060, category: ts.DiagnosticCategory.Error, key: "Return_type_of_exported_function_has_or_is_using_private_name_0_4060", message: "Return type of exported function has or is using private name '{0}'." },
          Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4061, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061", message: "Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named." },
          Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4062, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2_4062", message: "Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'." },
          Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1: { code: 4063, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1_4063", message: "Parameter '{0}' of constructor from exported class has or is using private name '{1}'." },
          Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4064, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_mod_4064", message: "Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'." },
          Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4065, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4065", message: "Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'." },
          Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4066, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066", message: "Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'." },
          Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4067, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067", message: "Parameter '{0}' of call signature from exported interface has or is using private name '{1}'." },
          Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4068, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module__4068", message: "Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named." },
          Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4069, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4069", message: "Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'." },
          Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: { code: 4070, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070", message: "Parameter '{0}' of public static method from exported class has or is using private name '{1}'." },
          Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4071, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_c_4071", message: "Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named." },
          Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4072, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4072", message: "Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'." },
          Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: { code: 4073, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4073", message: "Parameter '{0}' of public method from exported class has or is using private name '{1}'." },
          Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4074, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4074", message: "Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'." },
          Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: { code: 4075, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4075", message: "Parameter '{0}' of method from exported interface has or is using private name '{1}'." },
          Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4076, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4076", message: "Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named." },
          Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: { code: 4077, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2_4077", message: "Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'." },
          Parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4078, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_exported_function_has_or_is_using_private_name_1_4078", message: "Parameter '{0}' of exported function has or is using private name '{1}'." },
          Exported_type_alias_0_has_or_is_using_private_name_1: { code: 4081, category: ts.DiagnosticCategory.Error, key: "Exported_type_alias_0_has_or_is_using_private_name_1_4081", message: "Exported type alias '{0}' has or is using private name '{1}'." },
          Default_export_of_the_module_has_or_is_using_private_name_0: { code: 4082, category: ts.DiagnosticCategory.Error, key: "Default_export_of_the_module_has_or_is_using_private_name_0_4082", message: "Default export of the module has or is using private name '{0}'." },
          Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1: { code: 4083, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083", message: "Type parameter '{0}' of exported type alias has or is using private name '{1}'." },
          Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_library_to_resolve_the_conflict: { code: 4090, category: ts.DiagnosticCategory.Message, key: "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090", message: "Conflicting definitions for '{0}' found at '{1}' and '{2}'. Consider installing a specific version of this library to resolve the conflict." },
          Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4091, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091", message: "Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'." },
          Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4092, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092", message: "Parameter '{0}' of index signature from exported interface has or is using private name '{1}'." },
          extends_clause_of_exported_class_0_refers_to_a_type_whose_name_cannot_be_referenced: { code: 4093, category: ts.DiagnosticCategory.Error, key: "extends_clause_of_exported_class_0_refers_to_a_type_whose_name_cannot_be_referenced_4093", message: "'extends' clause of exported class '{0}' refers to a type whose name cannot be referenced." },
          The_current_host_does_not_support_the_0_option: { code: 5001, category: ts.DiagnosticCategory.Error, key: "The_current_host_does_not_support_the_0_option_5001", message: "The current host does not support the '{0}' option." },
          Cannot_find_the_common_subdirectory_path_for_the_input_files: { code: 5009, category: ts.DiagnosticCategory.Error, key: "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", message: "Cannot find the common subdirectory path for the input files." },
          File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: { code: 5010, category: ts.DiagnosticCategory.Error, key: "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", message: "File specification cannot end in a recursive directory wildcard ('**'): '{0}'." },
          File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0: { code: 5011, category: ts.DiagnosticCategory.Error, key: "File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0_5011", message: "File specification cannot contain multiple recursive directory wildcards ('**'): '{0}'." },
          Cannot_read_file_0_Colon_1: { code: 5012, category: ts.DiagnosticCategory.Error, key: "Cannot_read_file_0_Colon_1_5012", message: "Cannot read file '{0}': {1}" },
          Unsupported_file_encoding: { code: 5013, category: ts.DiagnosticCategory.Error, key: "Unsupported_file_encoding_5013", message: "Unsupported file encoding." },
          Failed_to_parse_file_0_Colon_1: { code: 5014, category: ts.DiagnosticCategory.Error, key: "Failed_to_parse_file_0_Colon_1_5014", message: "Failed to parse file '{0}': {1}." },
          Unknown_compiler_option_0: { code: 5023, category: ts.DiagnosticCategory.Error, key: "Unknown_compiler_option_0_5023", message: "Unknown compiler option '{0}'." },
          Compiler_option_0_requires_a_value_of_type_1: { code: 5024, category: ts.DiagnosticCategory.Error, key: "Compiler_option_0_requires_a_value_of_type_1_5024", message: "Compiler option '{0}' requires a value of type {1}." },
          Could_not_write_file_0_Colon_1: { code: 5033, category: ts.DiagnosticCategory.Error, key: "Could_not_write_file_0_Colon_1_5033", message: "Could not write file '{0}': {1}" },
          Option_project_cannot_be_mixed_with_source_files_on_a_command_line: { code: 5042, category: ts.DiagnosticCategory.Error, key: "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042", message: "Option 'project' cannot be mixed with source files on a command line." },
          Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher: { code: 5047, category: ts.DiagnosticCategory.Error, key: "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047", message: "Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher." },
          Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided: { code: 5051, category: ts.DiagnosticCategory.Error, key: "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051", message: "Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided." },
          Option_0_cannot_be_specified_without_specifying_option_1: { code: 5052, category: ts.DiagnosticCategory.Error, key: "Option_0_cannot_be_specified_without_specifying_option_1_5052", message: "Option '{0}' cannot be specified without specifying option '{1}'." },
          Option_0_cannot_be_specified_with_option_1: { code: 5053, category: ts.DiagnosticCategory.Error, key: "Option_0_cannot_be_specified_with_option_1_5053", message: "Option '{0}' cannot be specified with option '{1}'." },
          A_tsconfig_json_file_is_already_defined_at_Colon_0: { code: 5054, category: ts.DiagnosticCategory.Error, key: "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054", message: "A 'tsconfig.json' file is already defined at: '{0}'." },
          Cannot_write_file_0_because_it_would_overwrite_input_file: { code: 5055, category: ts.DiagnosticCategory.Error, key: "Cannot_write_file_0_because_it_would_overwrite_input_file_5055", message: "Cannot write file '{0}' because it would overwrite input file." },
          Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files: { code: 5056, category: ts.DiagnosticCategory.Error, key: "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056", message: "Cannot write file '{0}' because it would be overwritten by multiple input files." },
          Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0: { code: 5057, category: ts.DiagnosticCategory.Error, key: "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057", message: "Cannot find a tsconfig.json file at the specified directory: '{0}'" },
          The_specified_path_does_not_exist_Colon_0: { code: 5058, category: ts.DiagnosticCategory.Error, key: "The_specified_path_does_not_exist_Colon_0_5058", message: "The specified path does not exist: '{0}'" },
          Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier: { code: 5059, category: ts.DiagnosticCategory.Error, key: "Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059", message: "Invalid value for '--reactNamespace'. '{0}' is not a valid identifier." },
          Option_paths_cannot_be_used_without_specifying_baseUrl_option: { code: 5060, category: ts.DiagnosticCategory.Error, key: "Option_paths_cannot_be_used_without_specifying_baseUrl_option_5060", message: "Option 'paths' cannot be used without specifying '--baseUrl' option." },
          Pattern_0_can_have_at_most_one_Asterisk_character: { code: 5061, category: ts.DiagnosticCategory.Error, key: "Pattern_0_can_have_at_most_one_Asterisk_character_5061", message: "Pattern '{0}' can have at most one '*' character" },
          Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character: { code: 5062, category: ts.DiagnosticCategory.Error, key: "Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062", message: "Substitution '{0}' in pattern '{1}' in can have at most one '*' character" },
          Substitutions_for_pattern_0_should_be_an_array: { code: 5063, category: ts.DiagnosticCategory.Error, key: "Substitutions_for_pattern_0_should_be_an_array_5063", message: "Substitutions for pattern '{0}' should be an array." },
          Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2: { code: 5064, category: ts.DiagnosticCategory.Error, key: "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064", message: "Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'." },
          File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: { code: 5065, category: ts.DiagnosticCategory.Error, key: "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065", message: "File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'." },
          Substitutions_for_pattern_0_shouldn_t_be_an_empty_array: { code: 5066, category: ts.DiagnosticCategory.Error, key: "Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066", message: "Substitutions for pattern '{0}' shouldn't be an empty array." },
          Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name: { code: 5067, category: ts.DiagnosticCategory.Error, key: "Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name_5067", message: "Invalid value for 'jsxFactory'. '{0}' is not a valid identifier or qualified-name." },
          Concatenate_and_emit_output_to_single_file: { code: 6001, category: ts.DiagnosticCategory.Message, key: "Concatenate_and_emit_output_to_single_file_6001", message: "Concatenate and emit output to single file." },
          Generates_corresponding_d_ts_file: { code: 6002, category: ts.DiagnosticCategory.Message, key: "Generates_corresponding_d_ts_file_6002", message: "Generates corresponding '.d.ts' file." },
          Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: { code: 6003, category: ts.DiagnosticCategory.Message, key: "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6003", message: "Specify the location where debugger should locate map files instead of generated locations." },
          Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations: { code: 6004, category: ts.DiagnosticCategory.Message, key: "Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004", message: "Specify the location where debugger should locate TypeScript files instead of source locations." },
          Watch_input_files: { code: 6005, category: ts.DiagnosticCategory.Message, key: "Watch_input_files_6005", message: "Watch input files." },
          Redirect_output_structure_to_the_directory: { code: 6006, category: ts.DiagnosticCategory.Message, key: "Redirect_output_structure_to_the_directory_6006", message: "Redirect output structure to the directory." },
          Do_not_erase_const_enum_declarations_in_generated_code: { code: 6007, category: ts.DiagnosticCategory.Message, key: "Do_not_erase_const_enum_declarations_in_generated_code_6007", message: "Do not erase const enum declarations in generated code." },
          Do_not_emit_outputs_if_any_errors_were_reported: { code: 6008, category: ts.DiagnosticCategory.Message, key: "Do_not_emit_outputs_if_any_errors_were_reported_6008", message: "Do not emit outputs if any errors were reported." },
          Do_not_emit_comments_to_output: { code: 6009, category: ts.DiagnosticCategory.Message, key: "Do_not_emit_comments_to_output_6009", message: "Do not emit comments to output." },
          Do_not_emit_outputs: { code: 6010, category: ts.DiagnosticCategory.Message, key: "Do_not_emit_outputs_6010", message: "Do not emit outputs." },
          Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking: { code: 6011, category: ts.DiagnosticCategory.Message, key: "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011", message: "Allow default imports from modules with no default export. This does not affect code emit, just typechecking." },
          Skip_type_checking_of_declaration_files: { code: 6012, category: ts.DiagnosticCategory.Message, key: "Skip_type_checking_of_declaration_files_6012", message: "Skip type checking of declaration files." },
          Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_or_ESNEXT: { code: 6015, category: ts.DiagnosticCategory.Message, key: "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_or_ESNEXT_6015", message: "Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'" },
          Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015: { code: 6016, category: ts.DiagnosticCategory.Message, key: "Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015_6016", message: "Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'" },
          Print_this_message: { code: 6017, category: ts.DiagnosticCategory.Message, key: "Print_this_message_6017", message: "Print this message." },
          Print_the_compiler_s_version: { code: 6019, category: ts.DiagnosticCategory.Message, key: "Print_the_compiler_s_version_6019", message: "Print the compiler's version." },
          Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json: { code: 6020, category: ts.DiagnosticCategory.Message, key: "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020", message: "Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'" },
          Syntax_Colon_0: { code: 6023, category: ts.DiagnosticCategory.Message, key: "Syntax_Colon_0_6023", message: "Syntax: {0}" },
          options: { code: 6024, category: ts.DiagnosticCategory.Message, key: "options_6024", message: "options" },
          file: { code: 6025, category: ts.DiagnosticCategory.Message, key: "file_6025", message: "file" },
          Examples_Colon_0: { code: 6026, category: ts.DiagnosticCategory.Message, key: "Examples_Colon_0_6026", message: "Examples: {0}" },
          Options_Colon: { code: 6027, category: ts.DiagnosticCategory.Message, key: "Options_Colon_6027", message: "Options:" },
          Version_0: { code: 6029, category: ts.DiagnosticCategory.Message, key: "Version_0_6029", message: "Version {0}" },
          Insert_command_line_options_and_files_from_a_file: { code: 6030, category: ts.DiagnosticCategory.Message, key: "Insert_command_line_options_and_files_from_a_file_6030", message: "Insert command line options and files from a file." },
          File_change_detected_Starting_incremental_compilation: { code: 6032, category: ts.DiagnosticCategory.Message, key: "File_change_detected_Starting_incremental_compilation_6032", message: "File change detected. Starting incremental compilation..." },
          KIND: { code: 6034, category: ts.DiagnosticCategory.Message, key: "KIND_6034", message: "KIND" },
          FILE: { code: 6035, category: ts.DiagnosticCategory.Message, key: "FILE_6035", message: "FILE" },
          VERSION: { code: 6036, category: ts.DiagnosticCategory.Message, key: "VERSION_6036", message: "VERSION" },
          LOCATION: { code: 6037, category: ts.DiagnosticCategory.Message, key: "LOCATION_6037", message: "LOCATION" },
          DIRECTORY: { code: 6038, category: ts.DiagnosticCategory.Message, key: "DIRECTORY_6038", message: "DIRECTORY" },
          STRATEGY: { code: 6039, category: ts.DiagnosticCategory.Message, key: "STRATEGY_6039", message: "STRATEGY" },
          FILE_OR_DIRECTORY: { code: 6040, category: ts.DiagnosticCategory.Message, key: "FILE_OR_DIRECTORY_6040", message: "FILE OR DIRECTORY" },
          Compilation_complete_Watching_for_file_changes: { code: 6042, category: ts.DiagnosticCategory.Message, key: "Compilation_complete_Watching_for_file_changes_6042", message: "Compilation complete. Watching for file changes." },
          Generates_corresponding_map_file: { code: 6043, category: ts.DiagnosticCategory.Message, key: "Generates_corresponding_map_file_6043", message: "Generates corresponding '.map' file." },
          Compiler_option_0_expects_an_argument: { code: 6044, category: ts.DiagnosticCategory.Error, key: "Compiler_option_0_expects_an_argument_6044", message: "Compiler option '{0}' expects an argument." },
          Unterminated_quoted_string_in_response_file_0: { code: 6045, category: ts.DiagnosticCategory.Error, key: "Unterminated_quoted_string_in_response_file_0_6045", message: "Unterminated quoted string in response file '{0}'." },
          Argument_for_0_option_must_be_Colon_1: { code: 6046, category: ts.DiagnosticCategory.Error, key: "Argument_for_0_option_must_be_Colon_1_6046", message: "Argument for '{0}' option must be: {1}" },
          Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: { code: 6048, category: ts.DiagnosticCategory.Error, key: "Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048", message: "Locale must be of the form <language> or <language>-<territory>. For example '{0}' or '{1}'." },
          Unsupported_locale_0: { code: 6049, category: ts.DiagnosticCategory.Error, key: "Unsupported_locale_0_6049", message: "Unsupported locale '{0}'." },
          Unable_to_open_file_0: { code: 6050, category: ts.DiagnosticCategory.Error, key: "Unable_to_open_file_0_6050", message: "Unable to open file '{0}'." },
          Corrupted_locale_file_0: { code: 6051, category: ts.DiagnosticCategory.Error, key: "Corrupted_locale_file_0_6051", message: "Corrupted locale file {0}." },
          Raise_error_on_expressions_and_declarations_with_an_implied_any_type: { code: 6052, category: ts.DiagnosticCategory.Message, key: "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052", message: "Raise error on expressions and declarations with an implied 'any' type." },
          File_0_not_found: { code: 6053, category: ts.DiagnosticCategory.Error, key: "File_0_not_found_6053", message: "File '{0}' not found." },
          File_0_has_unsupported_extension_The_only_supported_extensions_are_1: { code: 6054, category: ts.DiagnosticCategory.Error, key: "File_0_has_unsupported_extension_The_only_supported_extensions_are_1_6054", message: "File '{0}' has unsupported extension. The only supported extensions are {1}." },
          Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: { code: 6055, category: ts.DiagnosticCategory.Message, key: "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055", message: "Suppress noImplicitAny errors for indexing objects lacking index signatures." },
          Do_not_emit_declarations_for_code_that_has_an_internal_annotation: { code: 6056, category: ts.DiagnosticCategory.Message, key: "Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056", message: "Do not emit declarations for code that has an '@internal' annotation." },
          Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir: { code: 6058, category: ts.DiagnosticCategory.Message, key: "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058", message: "Specify the root directory of input files. Use to control the output directory structure with --outDir." },
          File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files: { code: 6059, category: ts.DiagnosticCategory.Error, key: "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059", message: "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files." },
          Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix: { code: 6060, category: ts.DiagnosticCategory.Message, key: "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060", message: "Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)." },
          NEWLINE: { code: 6061, category: ts.DiagnosticCategory.Message, key: "NEWLINE_6061", message: "NEWLINE" },
          Option_0_can_only_be_specified_in_tsconfig_json_file: { code: 6064, category: ts.DiagnosticCategory.Error, key: "Option_0_can_only_be_specified_in_tsconfig_json_file_6064", message: "Option '{0}' can only be specified in 'tsconfig.json' file." },
          Enables_experimental_support_for_ES7_decorators: { code: 6065, category: ts.DiagnosticCategory.Message, key: "Enables_experimental_support_for_ES7_decorators_6065", message: "Enables experimental support for ES7 decorators." },
          Enables_experimental_support_for_emitting_type_metadata_for_decorators: { code: 6066, category: ts.DiagnosticCategory.Message, key: "Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066", message: "Enables experimental support for emitting type metadata for decorators." },
          Enables_experimental_support_for_ES7_async_functions: { code: 6068, category: ts.DiagnosticCategory.Message, key: "Enables_experimental_support_for_ES7_async_functions_6068", message: "Enables experimental support for ES7 async functions." },
          Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6: { code: 6069, category: ts.DiagnosticCategory.Message, key: "Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069", message: "Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6)." },
          Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file: { code: 6070, category: ts.DiagnosticCategory.Message, key: "Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070", message: "Initializes a TypeScript project and creates a tsconfig.json file." },
          Successfully_created_a_tsconfig_json_file: { code: 6071, category: ts.DiagnosticCategory.Message, key: "Successfully_created_a_tsconfig_json_file_6071", message: "Successfully created a tsconfig.json file." },
          Suppress_excess_property_checks_for_object_literals: { code: 6072, category: ts.DiagnosticCategory.Message, key: "Suppress_excess_property_checks_for_object_literals_6072", message: "Suppress excess property checks for object literals." },
          Stylize_errors_and_messages_using_color_and_context_experimental: { code: 6073, category: ts.DiagnosticCategory.Message, key: "Stylize_errors_and_messages_using_color_and_context_experimental_6073", message: "Stylize errors and messages using color and context. (experimental)" },
          Do_not_report_errors_on_unused_labels: { code: 6074, category: ts.DiagnosticCategory.Message, key: "Do_not_report_errors_on_unused_labels_6074", message: "Do not report errors on unused labels." },
          Report_error_when_not_all_code_paths_in_function_return_a_value: { code: 6075, category: ts.DiagnosticCategory.Message, key: "Report_error_when_not_all_code_paths_in_function_return_a_value_6075", message: "Report error when not all code paths in function return a value." },
          Report_errors_for_fallthrough_cases_in_switch_statement: { code: 6076, category: ts.DiagnosticCategory.Message, key: "Report_errors_for_fallthrough_cases_in_switch_statement_6076", message: "Report errors for fallthrough cases in switch statement." },
          Do_not_report_errors_on_unreachable_code: { code: 6077, category: ts.DiagnosticCategory.Message, key: "Do_not_report_errors_on_unreachable_code_6077", message: "Do not report errors on unreachable code." },
          Disallow_inconsistently_cased_references_to_the_same_file: { code: 6078, category: ts.DiagnosticCategory.Message, key: "Disallow_inconsistently_cased_references_to_the_same_file_6078", message: "Disallow inconsistently-cased references to the same file." },
          Specify_library_files_to_be_included_in_the_compilation_Colon: { code: 6079, category: ts.DiagnosticCategory.Message, key: "Specify_library_files_to_be_included_in_the_compilation_Colon_6079", message: "Specify library files to be included in the compilation: " },
          Specify_JSX_code_generation_Colon_preserve_react_native_or_react: { code: 6080, category: ts.DiagnosticCategory.Message, key: "Specify_JSX_code_generation_Colon_preserve_react_native_or_react_6080", message: "Specify JSX code generation: 'preserve', 'react-native', or 'react'" },
          File_0_has_an_unsupported_extension_so_skipping_it: { code: 6081, category: ts.DiagnosticCategory.Message, key: "File_0_has_an_unsupported_extension_so_skipping_it_6081", message: "File '{0}' has an unsupported extension, so skipping it." },
          Only_amd_and_system_modules_are_supported_alongside_0: { code: 6082, category: ts.DiagnosticCategory.Error, key: "Only_amd_and_system_modules_are_supported_alongside_0_6082", message: "Only 'amd' and 'system' modules are supported alongside --{0}." },
          Base_directory_to_resolve_non_absolute_module_names: { code: 6083, category: ts.DiagnosticCategory.Message, key: "Base_directory_to_resolve_non_absolute_module_names_6083", message: "Base directory to resolve non-absolute module names." },
          Specify_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit: { code: 6084, category: ts.DiagnosticCategory.Message, key: "Specify_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit_6084", message: "Specify the object invoked for createElement and __spread when targeting 'react' JSX emit" },
          Enable_tracing_of_the_name_resolution_process: { code: 6085, category: ts.DiagnosticCategory.Message, key: "Enable_tracing_of_the_name_resolution_process_6085", message: "Enable tracing of the name resolution process." },
          Resolving_module_0_from_1: { code: 6086, category: ts.DiagnosticCategory.Message, key: "Resolving_module_0_from_1_6086", message: "======== Resolving module '{0}' from '{1}'. ========" },
          Explicitly_specified_module_resolution_kind_Colon_0: { code: 6087, category: ts.DiagnosticCategory.Message, key: "Explicitly_specified_module_resolution_kind_Colon_0_6087", message: "Explicitly specified module resolution kind: '{0}'." },
          Module_resolution_kind_is_not_specified_using_0: { code: 6088, category: ts.DiagnosticCategory.Message, key: "Module_resolution_kind_is_not_specified_using_0_6088", message: "Module resolution kind is not specified, using '{0}'." },
          Module_name_0_was_successfully_resolved_to_1: { code: 6089, category: ts.DiagnosticCategory.Message, key: "Module_name_0_was_successfully_resolved_to_1_6089", message: "======== Module name '{0}' was successfully resolved to '{1}'. ========" },
          Module_name_0_was_not_resolved: { code: 6090, category: ts.DiagnosticCategory.Message, key: "Module_name_0_was_not_resolved_6090", message: "======== Module name '{0}' was not resolved. ========" },
          paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0: { code: 6091, category: ts.DiagnosticCategory.Message, key: "paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091", message: "'paths' option is specified, looking for a pattern to match module name '{0}'." },
          Module_name_0_matched_pattern_1: { code: 6092, category: ts.DiagnosticCategory.Message, key: "Module_name_0_matched_pattern_1_6092", message: "Module name '{0}', matched pattern '{1}'." },
          Trying_substitution_0_candidate_module_location_Colon_1: { code: 6093, category: ts.DiagnosticCategory.Message, key: "Trying_substitution_0_candidate_module_location_Colon_1_6093", message: "Trying substitution '{0}', candidate module location: '{1}'." },
          Resolving_module_name_0_relative_to_base_url_1_2: { code: 6094, category: ts.DiagnosticCategory.Message, key: "Resolving_module_name_0_relative_to_base_url_1_2_6094", message: "Resolving module name '{0}' relative to base url '{1}' - '{2}'." },
          Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1: { code: 6095, category: ts.DiagnosticCategory.Message, key: "Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1_6095", message: "Loading module as file / folder, candidate module location '{0}', target file type '{1}'." },
          File_0_does_not_exist: { code: 6096, category: ts.DiagnosticCategory.Message, key: "File_0_does_not_exist_6096", message: "File '{0}' does not exist." },
          File_0_exist_use_it_as_a_name_resolution_result: { code: 6097, category: ts.DiagnosticCategory.Message, key: "File_0_exist_use_it_as_a_name_resolution_result_6097", message: "File '{0}' exist - use it as a name resolution result." },
          Loading_module_0_from_node_modules_folder_target_file_type_1: { code: 6098, category: ts.DiagnosticCategory.Message, key: "Loading_module_0_from_node_modules_folder_target_file_type_1_6098", message: "Loading module '{0}' from 'node_modules' folder, target file type '{1}'." },
          Found_package_json_at_0: { code: 6099, category: ts.DiagnosticCategory.Message, key: "Found_package_json_at_0_6099", message: "Found 'package.json' at '{0}'." },
          package_json_does_not_have_a_0_field: { code: 6100, category: ts.DiagnosticCategory.Message, key: "package_json_does_not_have_a_0_field_6100", message: "'package.json' does not have a '{0}' field." },
          package_json_has_0_field_1_that_references_2: { code: 6101, category: ts.DiagnosticCategory.Message, key: "package_json_has_0_field_1_that_references_2_6101", message: "'package.json' has '{0}' field '{1}' that references '{2}'." },
          Allow_javascript_files_to_be_compiled: { code: 6102, category: ts.DiagnosticCategory.Message, key: "Allow_javascript_files_to_be_compiled_6102", message: "Allow javascript files to be compiled." },
          Option_0_should_have_array_of_strings_as_a_value: { code: 6103, category: ts.DiagnosticCategory.Error, key: "Option_0_should_have_array_of_strings_as_a_value_6103", message: "Option '{0}' should have array of strings as a value." },
          Checking_if_0_is_the_longest_matching_prefix_for_1_2: { code: 6104, category: ts.DiagnosticCategory.Message, key: "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104", message: "Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'." },
          Expected_type_of_0_field_in_package_json_to_be_string_got_1: { code: 6105, category: ts.DiagnosticCategory.Message, key: "Expected_type_of_0_field_in_package_json_to_be_string_got_1_6105", message: "Expected type of '{0}' field in 'package.json' to be 'string', got '{1}'." },
          baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1: { code: 6106, category: ts.DiagnosticCategory.Message, key: "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106", message: "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'" },
          rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0: { code: 6107, category: ts.DiagnosticCategory.Message, key: "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107", message: "'rootDirs' option is set, using it to resolve relative module name '{0}'" },
          Longest_matching_prefix_for_0_is_1: { code: 6108, category: ts.DiagnosticCategory.Message, key: "Longest_matching_prefix_for_0_is_1_6108", message: "Longest matching prefix for '{0}' is '{1}'" },
          Loading_0_from_the_root_dir_1_candidate_location_2: { code: 6109, category: ts.DiagnosticCategory.Message, key: "Loading_0_from_the_root_dir_1_candidate_location_2_6109", message: "Loading '{0}' from the root dir '{1}', candidate location '{2}'" },
          Trying_other_entries_in_rootDirs: { code: 6110, category: ts.DiagnosticCategory.Message, key: "Trying_other_entries_in_rootDirs_6110", message: "Trying other entries in 'rootDirs'" },
          Module_resolution_using_rootDirs_has_failed: { code: 6111, category: ts.DiagnosticCategory.Message, key: "Module_resolution_using_rootDirs_has_failed_6111", message: "Module resolution using 'rootDirs' has failed" },
          Do_not_emit_use_strict_directives_in_module_output: { code: 6112, category: ts.DiagnosticCategory.Message, key: "Do_not_emit_use_strict_directives_in_module_output_6112", message: "Do not emit 'use strict' directives in module output." },
          Enable_strict_null_checks: { code: 6113, category: ts.DiagnosticCategory.Message, key: "Enable_strict_null_checks_6113", message: "Enable strict null checks." },
          Unknown_option_excludes_Did_you_mean_exclude: { code: 6114, category: ts.DiagnosticCategory.Error, key: "Unknown_option_excludes_Did_you_mean_exclude_6114", message: "Unknown option 'excludes'. Did you mean 'exclude'?" },
          Raise_error_on_this_expressions_with_an_implied_any_type: { code: 6115, category: ts.DiagnosticCategory.Message, key: "Raise_error_on_this_expressions_with_an_implied_any_type_6115", message: "Raise error on 'this' expressions with an implied 'any' type." },
          Resolving_type_reference_directive_0_containing_file_1_root_directory_2: { code: 6116, category: ts.DiagnosticCategory.Message, key: "Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116", message: "======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========" },
          Resolving_using_primary_search_paths: { code: 6117, category: ts.DiagnosticCategory.Message, key: "Resolving_using_primary_search_paths_6117", message: "Resolving using primary search paths..." },
          Resolving_from_node_modules_folder: { code: 6118, category: ts.DiagnosticCategory.Message, key: "Resolving_from_node_modules_folder_6118", message: "Resolving from node_modules folder..." },
          Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2: { code: 6119, category: ts.DiagnosticCategory.Message, key: "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119", message: "======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========" },
          Type_reference_directive_0_was_not_resolved: { code: 6120, category: ts.DiagnosticCategory.Message, key: "Type_reference_directive_0_was_not_resolved_6120", message: "======== Type reference directive '{0}' was not resolved. ========" },
          Resolving_with_primary_search_path_0: { code: 6121, category: ts.DiagnosticCategory.Message, key: "Resolving_with_primary_search_path_0_6121", message: "Resolving with primary search path '{0}'" },
          Root_directory_cannot_be_determined_skipping_primary_search_paths: { code: 6122, category: ts.DiagnosticCategory.Message, key: "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122", message: "Root directory cannot be determined, skipping primary search paths." },
          Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set: { code: 6123, category: ts.DiagnosticCategory.Message, key: "Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123", message: "======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========" },
          Type_declaration_files_to_be_included_in_compilation: { code: 6124, category: ts.DiagnosticCategory.Message, key: "Type_declaration_files_to_be_included_in_compilation_6124", message: "Type declaration files to be included in compilation." },
          Looking_up_in_node_modules_folder_initial_location_0: { code: 6125, category: ts.DiagnosticCategory.Message, key: "Looking_up_in_node_modules_folder_initial_location_0_6125", message: "Looking up in 'node_modules' folder, initial location '{0}'" },
          Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder: { code: 6126, category: ts.DiagnosticCategory.Message, key: "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126", message: "Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder." },
          Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1: { code: 6127, category: ts.DiagnosticCategory.Message, key: "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127", message: "======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========" },
          Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set: { code: 6128, category: ts.DiagnosticCategory.Message, key: "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128", message: "======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========" },
          The_config_file_0_found_doesn_t_contain_any_source_files: { code: 6129, category: ts.DiagnosticCategory.Error, key: "The_config_file_0_found_doesn_t_contain_any_source_files_6129", message: "The config file '{0}' found doesn't contain any source files." },
          Resolving_real_path_for_0_result_1: { code: 6130, category: ts.DiagnosticCategory.Message, key: "Resolving_real_path_for_0_result_1_6130", message: "Resolving real path for '{0}', result '{1}'" },
          Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system: { code: 6131, category: ts.DiagnosticCategory.Error, key: "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131", message: "Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'." },
          File_name_0_has_a_1_extension_stripping_it: { code: 6132, category: ts.DiagnosticCategory.Message, key: "File_name_0_has_a_1_extension_stripping_it_6132", message: "File name '{0}' has a '{1}' extension - stripping it" },
          _0_is_declared_but_never_used: { code: 6133, category: ts.DiagnosticCategory.Error, key: "_0_is_declared_but_never_used_6133", message: "'{0}' is declared but never used." },
          Report_errors_on_unused_locals: { code: 6134, category: ts.DiagnosticCategory.Message, key: "Report_errors_on_unused_locals_6134", message: "Report errors on unused locals." },
          Report_errors_on_unused_parameters: { code: 6135, category: ts.DiagnosticCategory.Message, key: "Report_errors_on_unused_parameters_6135", message: "Report errors on unused parameters." },
          The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files: { code: 6136, category: ts.DiagnosticCategory.Message, key: "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136", message: "The maximum dependency depth to search under node_modules and load JavaScript files" },
          Property_0_is_declared_but_never_used: { code: 6138, category: ts.DiagnosticCategory.Error, key: "Property_0_is_declared_but_never_used_6138", message: "Property '{0}' is declared but never used." },
          Import_emit_helpers_from_tslib: { code: 6139, category: ts.DiagnosticCategory.Message, key: "Import_emit_helpers_from_tslib_6139", message: "Import emit helpers from 'tslib'." },
          Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2: { code: 6140, category: ts.DiagnosticCategory.Error, key: "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140", message: "Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'." },
          Parse_in_strict_mode_and_emit_use_strict_for_each_source_file: { code: 6141, category: ts.DiagnosticCategory.Message, key: "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141", message: "Parse in strict mode and emit \"use strict\" for each source file" },
          Module_0_was_resolved_to_1_but_jsx_is_not_set: { code: 6142, category: ts.DiagnosticCategory.Error, key: "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142", message: "Module '{0}' was resolved to '{1}', but '--jsx' is not set." },
          Module_0_was_resolved_to_1_but_allowJs_is_not_set: { code: 6143, category: ts.DiagnosticCategory.Error, key: "Module_0_was_resolved_to_1_but_allowJs_is_not_set_6143", message: "Module '{0}' was resolved to '{1}', but '--allowJs' is not set." },
          Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1: { code: 6144, category: ts.DiagnosticCategory.Message, key: "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144", message: "Module '{0}' was resolved as locally declared ambient module in file '{1}'." },
          Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified: { code: 6145, category: ts.DiagnosticCategory.Message, key: "Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145", message: "Module '{0}' was resolved as ambient module declared in '{1}' since this file was not modified." },
          Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h: { code: 6146, category: ts.DiagnosticCategory.Message, key: "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146", message: "Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'." },
          Resolution_for_module_0_was_found_in_cache: { code: 6147, category: ts.DiagnosticCategory.Message, key: "Resolution_for_module_0_was_found_in_cache_6147", message: "Resolution for module '{0}' was found in cache." },
          Directory_0_does_not_exist_skipping_all_lookups_in_it: { code: 6148, category: ts.DiagnosticCategory.Message, key: "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148", message: "Directory '{0}' does not exist, skipping all lookups in it." },
          Variable_0_implicitly_has_an_1_type: { code: 7005, category: ts.DiagnosticCategory.Error, key: "Variable_0_implicitly_has_an_1_type_7005", message: "Variable '{0}' implicitly has an '{1}' type." },
          Parameter_0_implicitly_has_an_1_type: { code: 7006, category: ts.DiagnosticCategory.Error, key: "Parameter_0_implicitly_has_an_1_type_7006", message: "Parameter '{0}' implicitly has an '{1}' type." },
          Member_0_implicitly_has_an_1_type: { code: 7008, category: ts.DiagnosticCategory.Error, key: "Member_0_implicitly_has_an_1_type_7008", message: "Member '{0}' implicitly has an '{1}' type." },
          new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type: { code: 7009, category: ts.DiagnosticCategory.Error, key: "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009", message: "'new' expression, whose target lacks a construct signature, implicitly has an 'any' type." },
          _0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type: { code: 7010, category: ts.DiagnosticCategory.Error, key: "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010", message: "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type." },
          Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: { code: 7011, category: ts.DiagnosticCategory.Error, key: "Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011", message: "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type." },
          Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: { code: 7013, category: ts.DiagnosticCategory.Error, key: "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013", message: "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type." },
          Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number: { code: 7015, category: ts.DiagnosticCategory.Error, key: "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015", message: "Element implicitly has an 'any' type because index expression is not of type 'number'." },
          Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type: { code: 7016, category: ts.DiagnosticCategory.Error, key: "Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016", message: "Could not find a declaration file for module '{0}'. '{1}' implicitly has an 'any' type." },
          Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature: { code: 7017, category: ts.DiagnosticCategory.Error, key: "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017", message: "Element implicitly has an 'any' type because type '{0}' has no index signature." },
          Object_literal_s_property_0_implicitly_has_an_1_type: { code: 7018, category: ts.DiagnosticCategory.Error, key: "Object_literal_s_property_0_implicitly_has_an_1_type_7018", message: "Object literal's property '{0}' implicitly has an '{1}' type." },
          Rest_parameter_0_implicitly_has_an_any_type: { code: 7019, category: ts.DiagnosticCategory.Error, key: "Rest_parameter_0_implicitly_has_an_any_type_7019", message: "Rest parameter '{0}' implicitly has an 'any[]' type." },
          Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: { code: 7020, category: ts.DiagnosticCategory.Error, key: "Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020", message: "Call signature, which lacks return-type annotation, implicitly has an 'any' return type." },
          _0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer: { code: 7022, category: ts.DiagnosticCategory.Error, key: "_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022", message: "'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer." },
          _0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7023, category: ts.DiagnosticCategory.Error, key: "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023", message: "'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." },
          Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7024, category: ts.DiagnosticCategory.Error, key: "Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024", message: "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." },
          Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type: { code: 7025, category: ts.DiagnosticCategory.Error, key: "Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_typ_7025", message: "Generator implicitly has type '{0}' because it does not yield any values. Consider supplying a return type." },
          JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists: { code: 7026, category: ts.DiagnosticCategory.Error, key: "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026", message: "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists" },
          Unreachable_code_detected: { code: 7027, category: ts.DiagnosticCategory.Error, key: "Unreachable_code_detected_7027", message: "Unreachable code detected." },
          Unused_label: { code: 7028, category: ts.DiagnosticCategory.Error, key: "Unused_label_7028", message: "Unused label." },
          Fallthrough_case_in_switch: { code: 7029, category: ts.DiagnosticCategory.Error, key: "Fallthrough_case_in_switch_7029", message: "Fallthrough case in switch." },
          Not_all_code_paths_return_a_value: { code: 7030, category: ts.DiagnosticCategory.Error, key: "Not_all_code_paths_return_a_value_7030", message: "Not all code paths return a value." },
          Binding_element_0_implicitly_has_an_1_type: { code: 7031, category: ts.DiagnosticCategory.Error, key: "Binding_element_0_implicitly_has_an_1_type_7031", message: "Binding element '{0}' implicitly has an '{1}' type." },
          Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation: { code: 7032, category: ts.DiagnosticCategory.Error, key: "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032", message: "Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation." },
          Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation: { code: 7033, category: ts.DiagnosticCategory.Error, key: "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033", message: "Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation." },
          Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined: { code: 7034, category: ts.DiagnosticCategory.Error, key: "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034", message: "Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined." },
          You_cannot_rename_this_element: { code: 8000, category: ts.DiagnosticCategory.Error, key: "You_cannot_rename_this_element_8000", message: "You cannot rename this element." },
          You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: { code: 8001, category: ts.DiagnosticCategory.Error, key: "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", message: "You cannot rename elements that are defined in the standard TypeScript library." },
          import_can_only_be_used_in_a_ts_file: { code: 8002, category: ts.DiagnosticCategory.Error, key: "import_can_only_be_used_in_a_ts_file_8002", message: "'import ... =' can only be used in a .ts file." },
          export_can_only_be_used_in_a_ts_file: { code: 8003, category: ts.DiagnosticCategory.Error, key: "export_can_only_be_used_in_a_ts_file_8003", message: "'export=' can only be used in a .ts file." },
          type_parameter_declarations_can_only_be_used_in_a_ts_file: { code: 8004, category: ts.DiagnosticCategory.Error, key: "type_parameter_declarations_can_only_be_used_in_a_ts_file_8004", message: "'type parameter declarations' can only be used in a .ts file." },
          implements_clauses_can_only_be_used_in_a_ts_file: { code: 8005, category: ts.DiagnosticCategory.Error, key: "implements_clauses_can_only_be_used_in_a_ts_file_8005", message: "'implements clauses' can only be used in a .ts file." },
          interface_declarations_can_only_be_used_in_a_ts_file: { code: 8006, category: ts.DiagnosticCategory.Error, key: "interface_declarations_can_only_be_used_in_a_ts_file_8006", message: "'interface declarations' can only be used in a .ts file." },
          module_declarations_can_only_be_used_in_a_ts_file: { code: 8007, category: ts.DiagnosticCategory.Error, key: "module_declarations_can_only_be_used_in_a_ts_file_8007", message: "'module declarations' can only be used in a .ts file." },
          type_aliases_can_only_be_used_in_a_ts_file: { code: 8008, category: ts.DiagnosticCategory.Error, key: "type_aliases_can_only_be_used_in_a_ts_file_8008", message: "'type aliases' can only be used in a .ts file." },
          _0_can_only_be_used_in_a_ts_file: { code: 8009, category: ts.DiagnosticCategory.Error, key: "_0_can_only_be_used_in_a_ts_file_8009", message: "'{0}' can only be used in a .ts file." },
          types_can_only_be_used_in_a_ts_file: { code: 8010, category: ts.DiagnosticCategory.Error, key: "types_can_only_be_used_in_a_ts_file_8010", message: "'types' can only be used in a .ts file." },
          type_arguments_can_only_be_used_in_a_ts_file: { code: 8011, category: ts.DiagnosticCategory.Error, key: "type_arguments_can_only_be_used_in_a_ts_file_8011", message: "'type arguments' can only be used in a .ts file." },
          parameter_modifiers_can_only_be_used_in_a_ts_file: { code: 8012, category: ts.DiagnosticCategory.Error, key: "parameter_modifiers_can_only_be_used_in_a_ts_file_8012", message: "'parameter modifiers' can only be used in a .ts file." },
          enum_declarations_can_only_be_used_in_a_ts_file: { code: 8015, category: ts.DiagnosticCategory.Error, key: "enum_declarations_can_only_be_used_in_a_ts_file_8015", message: "'enum declarations' can only be used in a .ts file." },
          type_assertion_expressions_can_only_be_used_in_a_ts_file: { code: 8016, category: ts.DiagnosticCategory.Error, key: "type_assertion_expressions_can_only_be_used_in_a_ts_file_8016", message: "'type assertion expressions' can only be used in a .ts file." },
          Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clause: { code: 9002, category: ts.DiagnosticCategory.Error, key: "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002", message: "Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clause." },
          class_expressions_are_not_currently_supported: { code: 9003, category: ts.DiagnosticCategory.Error, key: "class_expressions_are_not_currently_supported_9003", message: "'class' expressions are not currently supported." },
          Language_service_is_disabled: { code: 9004, category: ts.DiagnosticCategory.Error, key: "Language_service_is_disabled_9004", message: "Language service is disabled." },
          JSX_attributes_must_only_be_assigned_a_non_empty_expression: { code: 17000, category: ts.DiagnosticCategory.Error, key: "JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000", message: "JSX attributes must only be assigned a non-empty 'expression'." },
          JSX_elements_cannot_have_multiple_attributes_with_the_same_name: { code: 17001, category: ts.DiagnosticCategory.Error, key: "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001", message: "JSX elements cannot have multiple attributes with the same name." },
          Expected_corresponding_JSX_closing_tag_for_0: { code: 17002, category: ts.DiagnosticCategory.Error, key: "Expected_corresponding_JSX_closing_tag_for_0_17002", message: "Expected corresponding JSX closing tag for '{0}'." },
          JSX_attribute_expected: { code: 17003, category: ts.DiagnosticCategory.Error, key: "JSX_attribute_expected_17003", message: "JSX attribute expected." },
          Cannot_use_JSX_unless_the_jsx_flag_is_provided: { code: 17004, category: ts.DiagnosticCategory.Error, key: "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004", message: "Cannot use JSX unless the '--jsx' flag is provided." },
          A_constructor_cannot_contain_a_super_call_when_its_class_extends_null: { code: 17005, category: ts.DiagnosticCategory.Error, key: "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005", message: "A constructor cannot contain a 'super' call when its class extends 'null'" },
          An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: { code: 17006, category: ts.DiagnosticCategory.Error, key: "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006", message: "An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses." },
          A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: { code: 17007, category: ts.DiagnosticCategory.Error, key: "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007", message: "A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses." },
          JSX_element_0_has_no_corresponding_closing_tag: { code: 17008, category: ts.DiagnosticCategory.Error, key: "JSX_element_0_has_no_corresponding_closing_tag_17008", message: "JSX element '{0}' has no corresponding closing tag." },
          super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class: { code: 17009, category: ts.DiagnosticCategory.Error, key: "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009", message: "'super' must be called before accessing 'this' in the constructor of a derived class." },
          Unknown_type_acquisition_option_0: { code: 17010, category: ts.DiagnosticCategory.Error, key: "Unknown_type_acquisition_option_0_17010", message: "Unknown type acquisition option '{0}'." },
          super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class: { code: 17011, category: ts.DiagnosticCategory.Error, key: "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011", message: "'super' must be called before accessing a property of 'super' in the constructor of a derived class." },
          _0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_0: { code: 17012, category: ts.DiagnosticCategory.Error, key: "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_0_17012", message: "'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{0}'?" },
          Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor: { code: 17013, category: ts.DiagnosticCategory.Error, key: "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013", message: "Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor." },
          Circularity_detected_while_resolving_configuration_Colon_0: { code: 18000, category: ts.DiagnosticCategory.Error, key: "Circularity_detected_while_resolving_configuration_Colon_0_18000", message: "Circularity detected while resolving configuration: {0}" },
          A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not: { code: 18001, category: ts.DiagnosticCategory.Error, key: "A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not_18001", message: "A path in an 'extends' option must be relative or rooted, but '{0}' is not." },
          The_files_list_in_config_file_0_is_empty: { code: 18002, category: ts.DiagnosticCategory.Error, key: "The_files_list_in_config_file_0_is_empty_18002", message: "The 'files' list in config file '{0}' is empty." },
          No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2: { code: 18003, category: ts.DiagnosticCategory.Error, key: "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003", message: "No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'." },
          Add_missing_super_call: { code: 90001, category: ts.DiagnosticCategory.Message, key: "Add_missing_super_call_90001", message: "Add missing 'super()' call." },
          Make_super_call_the_first_statement_in_the_constructor: { code: 90002, category: ts.DiagnosticCategory.Message, key: "Make_super_call_the_first_statement_in_the_constructor_90002", message: "Make 'super()' call the first statement in the constructor." },
          Change_extends_to_implements: { code: 90003, category: ts.DiagnosticCategory.Message, key: "Change_extends_to_implements_90003", message: "Change 'extends' to 'implements'." },
          Remove_declaration_for_Colon_0: { code: 90004, category: ts.DiagnosticCategory.Message, key: "Remove_declaration_for_Colon_0_90004", message: "Remove declaration for: {0}" },
          Implement_interface_0: { code: 90006, category: ts.DiagnosticCategory.Message, key: "Implement_interface_0_90006", message: "Implement interface '{0}'." },
          Implement_inherited_abstract_class: { code: 90007, category: ts.DiagnosticCategory.Message, key: "Implement_inherited_abstract_class_90007", message: "Implement inherited abstract class." },
          Add_this_to_unresolved_variable: { code: 90008, category: ts.DiagnosticCategory.Message, key: "Add_this_to_unresolved_variable_90008", message: "Add 'this.' to unresolved variable." },
          Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig: { code: 90009, category: ts.DiagnosticCategory.Error, key: "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__90009", message: "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig" },
          Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated: { code: 90010, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_90010", message: "Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated." },
          Import_0_from_1: { code: 90013, category: ts.DiagnosticCategory.Message, key: "Import_0_from_1_90013", message: "Import {0} from {1}" },
          Change_0_to_1: { code: 90014, category: ts.DiagnosticCategory.Message, key: "Change_0_to_1_90014", message: "Change {0} to {1}" },
          Add_0_to_existing_import_declaration_from_1: { code: 90015, category: ts.DiagnosticCategory.Message, key: "Add_0_to_existing_import_declaration_from_1_90015", message: "Add {0} to existing import declaration from {1}." },
          Add_declaration_for_missing_property_0: { code: 90016, category: ts.DiagnosticCategory.Message, key: "Add_declaration_for_missing_property_0_90016", message: "Add declaration for missing property '{0}'." },
          Add_index_signature_for_missing_property_0: { code: 90017, category: ts.DiagnosticCategory.Message, key: "Add_index_signature_for_missing_property_0_90017", message: "Add index signature for missing property '{0}'" },
          Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0: { code: 8017, category: ts.DiagnosticCategory.Error, key: "Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0_8017", message: "Octal literal types must use ES2015 syntax. Use the syntax '{0}'." },
          Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0: { code: 8018, category: ts.DiagnosticCategory.Error, key: "Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018", message: "Octal literals are not allowed in enums members initializer. Use the syntax '{0}'." },
          Generate_HiggsCheck_contracts: { code: 584001, category: ts.DiagnosticCategory.Message, key: "Generate_HiggsCheck_contracts_584001", message: "Generate HiggsCheck contracts." },
      };
  })(ts || (ts = {}));
  /// <reference path="core.ts"/>
  /// <reference path="diagnosticInformationMap.generated.ts"/>
  var ts;
  (function (ts) {
      /* @internal */
      function tokenIsIdentifierOrKeyword(token) {
          return token >= 70 /* Identifier */;
      }
      ts.tokenIsIdentifierOrKeyword = tokenIsIdentifierOrKeyword;
      var textToToken = ts.createMapFromTemplate({
          "abstract": 116 /* AbstractKeyword */,
          "any": 118 /* AnyKeyword */,
          "as": 117 /* AsKeyword */,
          "boolean": 121 /* BooleanKeyword */,
          "break": 71 /* BreakKeyword */,
          "case": 72 /* CaseKeyword */,
          "catch": 73 /* CatchKeyword */,
          "class": 74 /* ClassKeyword */,
          "continue": 76 /* ContinueKeyword */,
          "const": 75 /* ConstKeyword */,
          "constructor": 122 /* ConstructorKeyword */,
          "debugger": 77 /* DebuggerKeyword */,
          "declare": 123 /* DeclareKeyword */,
          "default": 78 /* DefaultKeyword */,
          "delete": 79 /* DeleteKeyword */,
          "do": 80 /* DoKeyword */,
          "else": 81 /* ElseKeyword */,
          "enum": 82 /* EnumKeyword */,
          "export": 83 /* ExportKeyword */,
          "extends": 84 /* ExtendsKeyword */,
          "false": 85 /* FalseKeyword */,
          "finally": 86 /* FinallyKeyword */,
          "for": 87 /* ForKeyword */,
          "from": 139 /* FromKeyword */,
          "function": 88 /* FunctionKeyword */,
          "get": 124 /* GetKeyword */,
          "if": 89 /* IfKeyword */,
          "implements": 107 /* ImplementsKeyword */,
          "import": 90 /* ImportKeyword */,
          "in": 91 /* InKeyword */,
          "instanceof": 92 /* InstanceOfKeyword */,
          "interface": 108 /* InterfaceKeyword */,
          "is": 125 /* IsKeyword */,
          "keyof": 126 /* KeyOfKeyword */,
          "let": 109 /* LetKeyword */,
          "module": 127 /* ModuleKeyword */,
          "namespace": 128 /* NamespaceKeyword */,
          "never": 129 /* NeverKeyword */,
          "new": 93 /* NewKeyword */,
          "null": 94 /* NullKeyword */,
          "number": 132 /* NumberKeyword */,
          "object": 133 /* ObjectKeyword */,
          "package": 110 /* PackageKeyword */,
          "private": 111 /* PrivateKeyword */,
          "protected": 112 /* ProtectedKeyword */,
          "public": 113 /* PublicKeyword */,
          "readonly": 130 /* ReadonlyKeyword */,
          "require": 131 /* RequireKeyword */,
          "global": 140 /* GlobalKeyword */,
          "return": 95 /* ReturnKeyword */,
          "set": 134 /* SetKeyword */,
          "static": 114 /* StaticKeyword */,
          "string": 135 /* StringKeyword */,
          "super": 96 /* SuperKeyword */,
          "switch": 97 /* SwitchKeyword */,
          "symbol": 136 /* SymbolKeyword */,
          "this": 98 /* ThisKeyword */,
          "throw": 99 /* ThrowKeyword */,
          "true": 100 /* TrueKeyword */,
          "try": 101 /* TryKeyword */,
          "type": 137 /* TypeKeyword */,
          "typeof": 102 /* TypeOfKeyword */,
          "undefined": 138 /* UndefinedKeyword */,
          "var": 103 /* VarKeyword */,
          "void": 104 /* VoidKeyword */,
          "while": 105 /* WhileKeyword */,
          "with": 106 /* WithKeyword */,
          "yield": 115 /* YieldKeyword */,
          "async": 119 /* AsyncKeyword */,
          "await": 120 /* AwaitKeyword */,
          "of": 141 /* OfKeyword */,
          "{": 16 /* OpenBraceToken */,
          "}": 17 /* CloseBraceToken */,
          "(": 18 /* OpenParenToken */,
          ")": 19 /* CloseParenToken */,
          "[": 20 /* OpenBracketToken */,
          "]": 21 /* CloseBracketToken */,
          ".": 22 /* DotToken */,
          "...": 23 /* DotDotDotToken */,
          ";": 24 /* SemicolonToken */,
          ",": 25 /* CommaToken */,
          "<": 26 /* LessThanToken */,
          ">": 28 /* GreaterThanToken */,
          "<=": 29 /* LessThanEqualsToken */,
          ">=": 30 /* GreaterThanEqualsToken */,
          "==": 31 /* EqualsEqualsToken */,
          "!=": 32 /* ExclamationEqualsToken */,
          "===": 33 /* EqualsEqualsEqualsToken */,
          "!==": 34 /* ExclamationEqualsEqualsToken */,
          "=>": 35 /* EqualsGreaterThanToken */,
          "+": 36 /* PlusToken */,
          "-": 37 /* MinusToken */,
          "**": 39 /* AsteriskAsteriskToken */,
          "*": 38 /* AsteriskToken */,
          "/": 40 /* SlashToken */,
          "%": 41 /* PercentToken */,
          "++": 42 /* PlusPlusToken */,
          "--": 43 /* MinusMinusToken */,
          "<<": 44 /* LessThanLessThanToken */,
          "</": 27 /* LessThanSlashToken */,
          ">>": 45 /* GreaterThanGreaterThanToken */,
          ">>>": 46 /* GreaterThanGreaterThanGreaterThanToken */,
          "&": 47 /* AmpersandToken */,
          "|": 48 /* BarToken */,
          "^": 49 /* CaretToken */,
          "!": 50 /* ExclamationToken */,
          "~": 51 /* TildeToken */,
          "&&": 52 /* AmpersandAmpersandToken */,
          "||": 53 /* BarBarToken */,
          "?": 54 /* QuestionToken */,
          ":": 55 /* ColonToken */,
          "=": 57 /* EqualsToken */,
          "+=": 58 /* PlusEqualsToken */,
          "-=": 59 /* MinusEqualsToken */,
          "*=": 60 /* AsteriskEqualsToken */,
          "**=": 61 /* AsteriskAsteriskEqualsToken */,
          "/=": 62 /* SlashEqualsToken */,
          "%=": 63 /* PercentEqualsToken */,
          "<<=": 64 /* LessThanLessThanEqualsToken */,
          ">>=": 65 /* GreaterThanGreaterThanEqualsToken */,
          ">>>=": 66 /* GreaterThanGreaterThanGreaterThanEqualsToken */,
          "&=": 67 /* AmpersandEqualsToken */,
          "|=": 68 /* BarEqualsToken */,
          "^=": 69 /* CaretEqualsToken */,
          "@": 56 /* AtToken */,
      });
      /*
          As per ECMAScript Language Specification 3th Edition, Section 7.6: Identifiers
          IdentifierStart ::
              Can contain Unicode 3.0.0  categories:
              Uppercase letter (Lu),
              Lowercase letter (Ll),
              Titlecase letter (Lt),
              Modifier letter (Lm),
              Other letter (Lo), or
              Letter number (Nl).
          IdentifierPart :: =
              Can contain IdentifierStart + Unicode 3.0.0  categories:
              Non-spacing mark (Mn),
              Combining spacing mark (Mc),
              Decimal number (Nd), or
              Connector punctuation (Pc).
  
          Codepoint ranges for ES3 Identifiers are extracted from the Unicode 3.0.0 specification at:
          http://www.unicode.org/Public/3.0-Update/UnicodeData-3.0.0.txt
      */
      var unicodeES3IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1610, 1649, 1747, 1749, 1749, 1765, 1766, 1786, 1788, 1808, 1808, 1810, 1836, 1920, 1957, 2309, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2784, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3294, 3294, 3296, 3297, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3424, 3425, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3805, 3840, 3840, 3904, 3911, 3913, 3946, 3976, 3979, 4096, 4129, 4131, 4135, 4137, 4138, 4176, 4181, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6067, 6176, 6263, 6272, 6312, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8319, 8319, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12346, 12353, 12436, 12445, 12446, 12449, 12538, 12540, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65138, 65140, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,];
      var unicodeES3IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 768, 846, 864, 866, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1155, 1158, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1441, 1443, 1465, 1467, 1469, 1471, 1471, 1473, 1474, 1476, 1476, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1621, 1632, 1641, 1648, 1747, 1749, 1756, 1759, 1768, 1770, 1773, 1776, 1788, 1808, 1836, 1840, 1866, 1920, 1968, 2305, 2307, 2309, 2361, 2364, 2381, 2384, 2388, 2392, 2403, 2406, 2415, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2492, 2494, 2500, 2503, 2504, 2507, 2509, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2562, 2562, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2649, 2652, 2654, 2654, 2662, 2676, 2689, 2691, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2784, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2876, 2883, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2913, 2918, 2927, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3031, 3031, 3047, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3168, 3169, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3262, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3297, 3302, 3311, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3390, 3395, 3398, 3400, 3402, 3405, 3415, 3415, 3424, 3425, 3430, 3439, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3805, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3946, 3953, 3972, 3974, 3979, 3984, 3991, 3993, 4028, 4038, 4038, 4096, 4129, 4131, 4135, 4137, 4138, 4140, 4146, 4150, 4153, 4160, 4169, 4176, 4185, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 4969, 4977, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6099, 6112, 6121, 6160, 6169, 6176, 6263, 6272, 6313, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8255, 8256, 8319, 8319, 8400, 8412, 8417, 8417, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12346, 12353, 12436, 12441, 12442, 12445, 12446, 12449, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65056, 65059, 65075, 65076, 65101, 65103, 65136, 65138, 65140, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65381, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,];
      /*
          As per ECMAScript Language Specification 5th Edition, Section 7.6: ISyntaxToken Names and Identifiers
          IdentifierStart ::
              Can contain Unicode 6.2  categories:
              Uppercase letter (Lu),
              Lowercase letter (Ll),
              Titlecase letter (Lt),
              Modifier letter (Lm),
              Other letter (Lo), or
              Letter number (Nl).
          IdentifierPart ::
              Can contain IdentifierStart + Unicode 6.2  categories:
              Non-spacing mark (Mn),
              Combining spacing mark (Mc),
              Decimal number (Nd),
              Connector punctuation (Pc),
              <ZWNJ>, or
              <ZWJ>.
  
          Codepoint ranges for ES5 Identifiers are extracted from the Unicode 6.2 specification at:
          http://www.unicode.org/Public/6.2.0/ucd/UnicodeData.txt
      */
      var unicodeES5IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2208, 2208, 2210, 2220, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2423, 2425, 2431, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3133, 3160, 3161, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6000, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6428, 6480, 6509, 6512, 6516, 6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7401, 7404, 7406, 7409, 7413, 7414, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42647, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43648, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,];
      var unicodeES5IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1520, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2048, 2093, 2112, 2139, 2208, 2208, 2210, 2220, 2276, 2302, 2304, 2403, 2406, 2415, 2417, 2423, 2425, 2431, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3161, 3168, 3171, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3396, 3398, 3400, 3402, 3406, 3415, 3415, 3424, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5908, 5920, 5940, 5952, 5971, 5984, 5996, 5998, 6000, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6176, 6263, 6272, 6314, 6320, 6389, 6400, 6428, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6617, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7376, 7378, 7380, 7414, 7424, 7654, 7676, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8205, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 11823, 11823, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12442, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42647, 42655, 42737, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43047, 43072, 43123, 43136, 43204, 43216, 43225, 43232, 43255, 43259, 43259, 43264, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43643, 43648, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65062, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,];
      function lookupInUnicodeMap(code, map) {
          // Bail out quickly if it couldn't possibly be in the map.
          if (code < map[0]) {
              return false;
          }
          // Perform binary search in one of the Unicode range maps
          var lo = 0;
          var hi = map.length;
          var mid;
          while (lo + 1 < hi) {
              mid = lo + (hi - lo) / 2;
              // mid has to be even to catch a range's beginning
              mid -= mid % 2;
              if (map[mid] <= code && code <= map[mid + 1]) {
                  return true;
              }
              if (code < map[mid]) {
                  hi = mid;
              }
              else {
                  lo = mid + 2;
              }
          }
          return false;
      }
      /* @internal */ function isUnicodeIdentifierStart(code, languageVersion) {
          return languageVersion >= 1 /* ES5 */ ?
              lookupInUnicodeMap(code, unicodeES5IdentifierStart) :
              lookupInUnicodeMap(code, unicodeES3IdentifierStart);
      }
      ts.isUnicodeIdentifierStart = isUnicodeIdentifierStart;
      function isUnicodeIdentifierPart(code, languageVersion) {
          return languageVersion >= 1 /* ES5 */ ?
              lookupInUnicodeMap(code, unicodeES5IdentifierPart) :
              lookupInUnicodeMap(code, unicodeES3IdentifierPart);
      }
      function makeReverseMap(source) {
          var result = [];
          source.forEach(function (value, name) {
              result[value] = name;
          });
          return result;
      }
      var tokenStrings = makeReverseMap(textToToken);
      function tokenToString(t) {
          return tokenStrings[t];
      }
      ts.tokenToString = tokenToString;
      /* @internal */
      function stringToToken(s) {
          return textToToken.get(s);
      }
      ts.stringToToken = stringToToken;
      /* @internal */
      function computeLineStarts(text) {
          var result = new Array();
          var pos = 0;
          var lineStart = 0;
          while (pos < text.length) {
              var ch = text.charCodeAt(pos);
              pos++;
              switch (ch) {
                  case 13 /* carriageReturn */:
                      if (text.charCodeAt(pos) === 10 /* lineFeed */) {
                          pos++;
                      }
                  case 10 /* lineFeed */:
                      result.push(lineStart);
                      lineStart = pos;
                      break;
                  default:
                      if (ch > 127 /* maxAsciiCharacter */ && isLineBreak(ch)) {
                          result.push(lineStart);
                          lineStart = pos;
                      }
                      break;
              }
          }
          result.push(lineStart);
          return result;
      }
      ts.computeLineStarts = computeLineStarts;
      function getPositionOfLineAndCharacter(sourceFile, line, character) {
          return computePositionOfLineAndCharacter(getLineStarts(sourceFile), line, character);
      }
      ts.getPositionOfLineAndCharacter = getPositionOfLineAndCharacter;
      /* @internal */
      function computePositionOfLineAndCharacter(lineStarts, line, character) {
          ts.Debug.assert(line >= 0 && line < lineStarts.length);
          return lineStarts[line] + character;
      }
      ts.computePositionOfLineAndCharacter = computePositionOfLineAndCharacter;
      /* @internal */
      function getLineStarts(sourceFile) {
          return sourceFile.lineMap || (sourceFile.lineMap = computeLineStarts(sourceFile.text));
      }
      ts.getLineStarts = getLineStarts;
      /* @internal */
      /**
       * We assume the first line starts at position 0 and 'position' is non-negative.
       */
      function computeLineAndCharacterOfPosition(lineStarts, position) {
          var lineNumber = ts.binarySearch(lineStarts, position);
          if (lineNumber < 0) {
              // If the actual position was not found,
              // the binary search returns the 2's-complement of the next line start
              // e.g. if the line starts at [5, 10, 23, 80] and the position requested was 20
              // then the search will return -2.
              //
              // We want the index of the previous line start, so we subtract 1.
              // Review 2's-complement if this is confusing.
              lineNumber = ~lineNumber - 1;
              ts.Debug.assert(lineNumber !== -1, "position cannot precede the beginning of the file");
          }
          return {
              line: lineNumber,
              character: position - lineStarts[lineNumber]
          };
      }
      ts.computeLineAndCharacterOfPosition = computeLineAndCharacterOfPosition;
      function getLineAndCharacterOfPosition(sourceFile, position) {
          return computeLineAndCharacterOfPosition(getLineStarts(sourceFile), position);
      }
      ts.getLineAndCharacterOfPosition = getLineAndCharacterOfPosition;
      function isWhiteSpace(ch) {
          return isWhiteSpaceSingleLine(ch) || isLineBreak(ch);
      }
      ts.isWhiteSpace = isWhiteSpace;
      /** Does not include line breaks. For that, see isWhiteSpaceLike. */
      function isWhiteSpaceSingleLine(ch) {
          // Note: nextLine is in the Zs space, and should be considered to be a whitespace.
          // It is explicitly not a line-break as it isn't in the exact set specified by EcmaScript.
          return ch === 32 /* space */ ||
              ch === 9 /* tab */ ||
              ch === 11 /* verticalTab */ ||
              ch === 12 /* formFeed */ ||
              ch === 160 /* nonBreakingSpace */ ||
              ch === 133 /* nextLine */ ||
              ch === 5760 /* ogham */ ||
              ch >= 8192 /* enQuad */ && ch <= 8203 /* zeroWidthSpace */ ||
              ch === 8239 /* narrowNoBreakSpace */ ||
              ch === 8287 /* mathematicalSpace */ ||
              ch === 12288 /* ideographicSpace */ ||
              ch === 65279 /* byteOrderMark */;
      }
      ts.isWhiteSpaceSingleLine = isWhiteSpaceSingleLine;
      function isLineBreak(ch) {
          // ES5 7.3:
          // The ECMAScript line terminator characters are listed in Table 3.
          //     Table 3: Line Terminator Characters
          //     Code Unit Value     Name                    Formal Name
          //     \u000A              Line Feed               <LF>
          //     \u000D              Carriage Return         <CR>
          //     \u2028              Line separator          <LS>
          //     \u2029              Paragraph separator     <PS>
          // Only the characters in Table 3 are treated as line terminators. Other new line or line
          // breaking characters are treated as white space but not as line terminators.
          return ch === 10 /* lineFeed */ ||
              ch === 13 /* carriageReturn */ ||
              ch === 8232 /* lineSeparator */ ||
              ch === 8233 /* paragraphSeparator */;
      }
      ts.isLineBreak = isLineBreak;
      function isDigit(ch) {
          return ch >= 48 /* _0 */ && ch <= 57 /* _9 */;
      }
      /* @internal */
      function isOctalDigit(ch) {
          return ch >= 48 /* _0 */ && ch <= 55 /* _7 */;
      }
      ts.isOctalDigit = isOctalDigit;
      function couldStartTrivia(text, pos) {
          // Keep in sync with skipTrivia
          var ch = text.charCodeAt(pos);
          switch (ch) {
              case 13 /* carriageReturn */:
              case 10 /* lineFeed */:
              case 9 /* tab */:
              case 11 /* verticalTab */:
              case 12 /* formFeed */:
              case 32 /* space */:
              case 47 /* slash */:
              // starts of normal trivia
              case 60 /* lessThan */:
              case 61 /* equals */:
              case 62 /* greaterThan */:
                  // Starts of conflict marker trivia
                  return true;
              case 35 /* hash */:
                  // Only if its the beginning can we have #! trivia
                  return pos === 0;
              default:
                  return ch > 127 /* maxAsciiCharacter */;
          }
      }
      ts.couldStartTrivia = couldStartTrivia;
      /* @internal */
      function skipTrivia(text, pos, stopAfterLineBreak, stopAtComments) {
          if (stopAtComments === void 0) { stopAtComments = false; }
          if (ts.positionIsSynthesized(pos)) {
              return pos;
          }
          // Keep in sync with couldStartTrivia
          while (true) {
              var ch = text.charCodeAt(pos);
              switch (ch) {
                  case 13 /* carriageReturn */:
                      if (text.charCodeAt(pos + 1) === 10 /* lineFeed */) {
                          pos++;
                      }
                  case 10 /* lineFeed */:
                      pos++;
                      if (stopAfterLineBreak) {
                          return pos;
                      }
                      continue;
                  case 9 /* tab */:
                  case 11 /* verticalTab */:
                  case 12 /* formFeed */:
                  case 32 /* space */:
                      pos++;
                      continue;
                  case 47 /* slash */:
                      if (stopAtComments) {
                          break;
                      }
                      if (text.charCodeAt(pos + 1) === 47 /* slash */) {
                          pos += 2;
                          while (pos < text.length) {
                              if (isLineBreak(text.charCodeAt(pos))) {
                                  break;
                              }
                              pos++;
                          }
                          continue;
                      }
                      if (text.charCodeAt(pos + 1) === 42 /* asterisk */) {
                          pos += 2;
                          while (pos < text.length) {
                              if (text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) {
                                  pos += 2;
                                  break;
                              }
                              pos++;
                          }
                          continue;
                      }
                      break;
                  case 60 /* lessThan */:
                  case 61 /* equals */:
                  case 62 /* greaterThan */:
                      if (isConflictMarkerTrivia(text, pos)) {
                          pos = scanConflictMarkerTrivia(text, pos);
                          continue;
                      }
                      break;
                  case 35 /* hash */:
                      if (pos === 0 && isShebangTrivia(text, pos)) {
                          pos = scanShebangTrivia(text, pos);
                          continue;
                      }
                      break;
                  default:
                      if (ch > 127 /* maxAsciiCharacter */ && (isWhiteSpace(ch))) {
                          pos++;
                          continue;
                      }
                      break;
              }
              return pos;
          }
      }
      ts.skipTrivia = skipTrivia;
      // All conflict markers consist of the same character repeated seven times.  If it is
      // a <<<<<<< or >>>>>>> marker then it is also followed by a space.
      var mergeConflictMarkerLength = "<<<<<<<".length;
      function isConflictMarkerTrivia(text, pos) {
          ts.Debug.assert(pos >= 0);
          // Conflict markers must be at the start of a line.
          if (pos === 0 || isLineBreak(text.charCodeAt(pos - 1))) {
              var ch = text.charCodeAt(pos);
              if ((pos + mergeConflictMarkerLength) < text.length) {
                  for (var i = 0; i < mergeConflictMarkerLength; i++) {
                      if (text.charCodeAt(pos + i) !== ch) {
                          return false;
                      }
                  }
                  return ch === 61 /* equals */ ||
                      text.charCodeAt(pos + mergeConflictMarkerLength) === 32 /* space */;
              }
          }
          return false;
      }
      function scanConflictMarkerTrivia(text, pos, error) {
          if (error) {
              error(ts.Diagnostics.Merge_conflict_marker_encountered, mergeConflictMarkerLength);
          }
          var ch = text.charCodeAt(pos);
          var len = text.length;
          if (ch === 60 /* lessThan */ || ch === 62 /* greaterThan */) {
              while (pos < len && !isLineBreak(text.charCodeAt(pos))) {
                  pos++;
              }
          }
          else {
              ts.Debug.assert(ch === 61 /* equals */);
              // Consume everything from the start of the mid-conflict marker to the start of the next
              // end-conflict marker.
              while (pos < len) {
                  var ch_1 = text.charCodeAt(pos);
                  if (ch_1 === 62 /* greaterThan */ && isConflictMarkerTrivia(text, pos)) {
                      break;
                  }
                  pos++;
              }
          }
          return pos;
      }
      var shebangTriviaRegex = /^#!.*/;
      function isShebangTrivia(text, pos) {
          // Shebangs check must only be done at the start of the file
          ts.Debug.assert(pos === 0);
          return shebangTriviaRegex.test(text);
      }
      function scanShebangTrivia(text, pos) {
          var shebang = shebangTriviaRegex.exec(text)[0];
          pos = pos + shebang.length;
          return pos;
      }
      /**
       * Invokes a callback for each comment range following the provided position.
       *
       * Single-line comment ranges include the leading double-slash characters but not the ending
       * line break. Multi-line comment ranges include the leading slash-asterisk and trailing
       * asterisk-slash characters.
       *
       * @param reduce If true, accumulates the result of calling the callback in a fashion similar
       *      to reduceLeft. If false, iteration stops when the callback returns a truthy value.
       * @param text The source text to scan.
       * @param pos The position at which to start scanning.
       * @param trailing If false, whitespace is skipped until the first line break and comments
       *      between that location and the next token are returned. If true, comments occurring
       *      between the given position and the next line break are returned.
       * @param cb The callback to execute as each comment range is encountered.
       * @param state A state value to pass to each iteration of the callback.
       * @param initial An initial value to pass when accumulating results (when "reduce" is true).
       * @returns If "reduce" is true, the accumulated value. If "reduce" is false, the first truthy
       *      return value of the callback.
       */
      function iterateCommentRanges(reduce, text, pos, trailing, cb, state, initial) {
          var pendingPos;
          var pendingEnd;
          var pendingKind;
          var pendingHasTrailingNewLine;
          var hasPendingCommentRange = false;
          var collecting = trailing || pos === 0;
          var accumulator = initial;
          scan: while (pos >= 0 && pos < text.length) {
              var ch = text.charCodeAt(pos);
              switch (ch) {
                  case 13 /* carriageReturn */:
                      if (text.charCodeAt(pos + 1) === 10 /* lineFeed */) {
                          pos++;
                      }
                  case 10 /* lineFeed */:
                      pos++;
                      if (trailing) {
                          break scan;
                      }
                      collecting = true;
                      if (hasPendingCommentRange) {
                          pendingHasTrailingNewLine = true;
                      }
                      continue;
                  case 9 /* tab */:
                  case 11 /* verticalTab */:
                  case 12 /* formFeed */:
                  case 32 /* space */:
                      pos++;
                      continue;
                  case 47 /* slash */:
                      var nextChar = text.charCodeAt(pos + 1);
                      var hasTrailingNewLine = false;
                      if (nextChar === 47 /* slash */ || nextChar === 42 /* asterisk */) {
                          var kind = nextChar === 47 /* slash */ ? 2 /* SingleLineCommentTrivia */ : 3 /* MultiLineCommentTrivia */;
                          var startPos = pos;
                          pos += 2;
                          if (nextChar === 47 /* slash */) {
                              while (pos < text.length) {
                                  if (isLineBreak(text.charCodeAt(pos))) {
                                      hasTrailingNewLine = true;
                                      break;
                                  }
                                  pos++;
                              }
                          }
                          else {
                              while (pos < text.length) {
                                  if (text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) {
                                      pos += 2;
                                      break;
                                  }
                                  pos++;
                              }
                          }
                          if (collecting) {
                              if (hasPendingCommentRange) {
                                  accumulator = cb(pendingPos, pendingEnd, pendingKind, pendingHasTrailingNewLine, state, accumulator);
                                  if (!reduce && accumulator) {
                                      // If we are not reducing and we have a truthy result, return it.
                                      return accumulator;
                                  }
                                  hasPendingCommentRange = false;
                              }
                              pendingPos = startPos;
                              pendingEnd = pos;
                              pendingKind = kind;
                              pendingHasTrailingNewLine = hasTrailingNewLine;
                              hasPendingCommentRange = true;
                          }
                          continue;
                      }
                      break scan;
                  default:
                      if (ch > 127 /* maxAsciiCharacter */ && (isWhiteSpace(ch))) {
                          if (hasPendingCommentRange && isLineBreak(ch)) {
                              pendingHasTrailingNewLine = true;
                          }
                          pos++;
                          continue;
                      }
                      break scan;
              }
          }
          if (hasPendingCommentRange) {
              accumulator = cb(pendingPos, pendingEnd, pendingKind, pendingHasTrailingNewLine, state, accumulator);
          }
          return accumulator;
      }
      function forEachLeadingCommentRange(text, pos, cb, state) {
          return iterateCommentRanges(/*reduce*/ false, text, pos, /*trailing*/ false, cb, state);
      }
      ts.forEachLeadingCommentRange = forEachLeadingCommentRange;
      function forEachTrailingCommentRange(text, pos, cb, state) {
          return iterateCommentRanges(/*reduce*/ false, text, pos, /*trailing*/ true, cb, state);
      }
      ts.forEachTrailingCommentRange = forEachTrailingCommentRange;
      function reduceEachLeadingCommentRange(text, pos, cb, state, initial) {
          return iterateCommentRanges(/*reduce*/ true, text, pos, /*trailing*/ false, cb, state, initial);
      }
      ts.reduceEachLeadingCommentRange = reduceEachLeadingCommentRange;
      function reduceEachTrailingCommentRange(text, pos, cb, state, initial) {
          return iterateCommentRanges(/*reduce*/ true, text, pos, /*trailing*/ true, cb, state, initial);
      }
      ts.reduceEachTrailingCommentRange = reduceEachTrailingCommentRange;
      function appendCommentRange(pos, end, kind, hasTrailingNewLine, _state, comments) {
          if (!comments) {
              comments = [];
          }
          comments.push({ pos: pos, end: end, hasTrailingNewLine: hasTrailingNewLine, kind: kind });
          return comments;
      }
      function getLeadingCommentRanges(text, pos) {
          return reduceEachLeadingCommentRange(text, pos, appendCommentRange, undefined, undefined);
      }
      ts.getLeadingCommentRanges = getLeadingCommentRanges;
      function getTrailingCommentRanges(text, pos) {
          return reduceEachTrailingCommentRange(text, pos, appendCommentRange, undefined, undefined);
      }
      ts.getTrailingCommentRanges = getTrailingCommentRanges;
      /** Optionally, get the shebang */
      function getShebang(text) {
          return shebangTriviaRegex.test(text)
              ? shebangTriviaRegex.exec(text)[0]
              : undefined;
      }
      ts.getShebang = getShebang;
      function isIdentifierStart(ch, languageVersion) {
          return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ ||
              ch === 36 /* $ */ || ch === 95 /* _ */ ||
              ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierStart(ch, languageVersion);
      }
      ts.isIdentifierStart = isIdentifierStart;
      function isIdentifierPart(ch, languageVersion) {
          return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ ||
              ch >= 48 /* _0 */ && ch <= 57 /* _9 */ || ch === 36 /* $ */ || ch === 95 /* _ */ ||
              ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierPart(ch, languageVersion);
      }
      ts.isIdentifierPart = isIdentifierPart;
      /* @internal */
      function isIdentifierText(name, languageVersion) {
          if (!isIdentifierStart(name.charCodeAt(0), languageVersion)) {
              return false;
          }
          for (var i = 1; i < name.length; i++) {
              if (!isIdentifierPart(name.charCodeAt(i), languageVersion)) {
                  return false;
              }
          }
          return true;
      }
      ts.isIdentifierText = isIdentifierText;
      // Creates a scanner over a (possibly unspecified) range of a piece of text.
      function createScanner(languageVersion, skipTrivia, languageVariant, text, onError, start, length) {
          if (languageVariant === void 0) { languageVariant = 0 /* Standard */; }
          // Current position (end position of text of current token)
          var pos;
          // end of text
          var end;
          // Start position of whitespace before current token
          var startPos;
          // Start position of text of current token
          var tokenPos;
          var token;
          var tokenValue;
          var precedingLineBreak;
          var hasExtendedUnicodeEscape;
          var tokenIsUnterminated;
          setText(text, start, length);
          return {
              getStartPos: function () { return startPos; },
              getTextPos: function () { return pos; },
              getToken: function () { return token; },
              getTokenPos: function () { return tokenPos; },
              getTokenText: function () { return text.substring(tokenPos, pos); },
              getTokenValue: function () { return tokenValue; },
              hasExtendedUnicodeEscape: function () { return hasExtendedUnicodeEscape; },
              hasPrecedingLineBreak: function () { return precedingLineBreak; },
              isIdentifier: function () { return token === 70 /* Identifier */ || token > 106 /* LastReservedWord */; },
              isReservedWord: function () { return token >= 71 /* FirstReservedWord */ && token <= 106 /* LastReservedWord */; },
              isUnterminated: function () { return tokenIsUnterminated; },
              reScanGreaterToken: reScanGreaterToken,
              reScanSlashToken: reScanSlashToken,
              reScanTemplateToken: reScanTemplateToken,
              scanJsxIdentifier: scanJsxIdentifier,
              scanJsxAttributeValue: scanJsxAttributeValue,
              reScanJsxToken: reScanJsxToken,
              scanJsxToken: scanJsxToken,
              scanJSDocToken: scanJSDocToken,
              scan: scan,
              getText: getText,
              setText: setText,
              setScriptTarget: setScriptTarget,
              setLanguageVariant: setLanguageVariant,
              setOnError: setOnError,
              setTextPos: setTextPos,
              tryScan: tryScan,
              lookAhead: lookAhead,
              scanRange: scanRange,
          };
          function error(message, length) {
              if (onError) {
                  onError(message, length || 0);
              }
          }
          function scanNumber() {
              var start = pos;
              while (isDigit(text.charCodeAt(pos)))
                  pos++;
              if (text.charCodeAt(pos) === 46 /* dot */) {
                  pos++;
                  while (isDigit(text.charCodeAt(pos)))
                      pos++;
              }
              var end = pos;
              if (text.charCodeAt(pos) === 69 /* E */ || text.charCodeAt(pos) === 101 /* e */) {
                  pos++;
                  if (text.charCodeAt(pos) === 43 /* plus */ || text.charCodeAt(pos) === 45 /* minus */)
                      pos++;
                  if (isDigit(text.charCodeAt(pos))) {
                      pos++;
                      while (isDigit(text.charCodeAt(pos)))
                          pos++;
                      end = pos;
                  }
                  else {
                      error(ts.Diagnostics.Digit_expected);
                  }
              }
              return "" + +(text.substring(start, end));
          }
          function scanOctalDigits() {
              var start = pos;
              while (isOctalDigit(text.charCodeAt(pos))) {
                  pos++;
              }
              return +(text.substring(start, pos));
          }
          /**
           * Scans the given number of hexadecimal digits in the text,
           * returning -1 if the given number is unavailable.
           */
          function scanExactNumberOfHexDigits(count) {
              return scanHexDigits(/*minCount*/ count, /*scanAsManyAsPossible*/ false);
          }
          /**
           * Scans as many hexadecimal digits as are available in the text,
           * returning -1 if the given number of digits was unavailable.
           */
          function scanMinimumNumberOfHexDigits(count) {
              return scanHexDigits(/*minCount*/ count, /*scanAsManyAsPossible*/ true);
          }
          function scanHexDigits(minCount, scanAsManyAsPossible) {
              var digits = 0;
              var value = 0;
              while (digits < minCount || scanAsManyAsPossible) {
                  var ch = text.charCodeAt(pos);
                  if (ch >= 48 /* _0 */ && ch <= 57 /* _9 */) {
                      value = value * 16 + ch - 48 /* _0 */;
                  }
                  else if (ch >= 65 /* A */ && ch <= 70 /* F */) {
                      value = value * 16 + ch - 65 /* A */ + 10;
                  }
                  else if (ch >= 97 /* a */ && ch <= 102 /* f */) {
                      value = value * 16 + ch - 97 /* a */ + 10;
                  }
                  else {
                      break;
                  }
                  pos++;
                  digits++;
              }
              if (digits < minCount) {
                  value = -1;
              }
              return value;
          }
          function scanString(allowEscapes) {
              if (allowEscapes === void 0) { allowEscapes = true; }
              var quote = text.charCodeAt(pos);
              pos++;
              var result = "";
              var start = pos;
              while (true) {
                  if (pos >= end) {
                      result += text.substring(start, pos);
                      tokenIsUnterminated = true;
                      error(ts.Diagnostics.Unterminated_string_literal);
                      break;
                  }
                  var ch = text.charCodeAt(pos);
                  if (ch === quote) {
                      result += text.substring(start, pos);
                      pos++;
                      break;
                  }
                  if (ch === 92 /* backslash */ && allowEscapes) {
                      result += text.substring(start, pos);
                      result += scanEscapeSequence();
                      start = pos;
                      continue;
                  }
                  if (isLineBreak(ch)) {
                      result += text.substring(start, pos);
                      tokenIsUnterminated = true;
                      error(ts.Diagnostics.Unterminated_string_literal);
                      break;
                  }
                  pos++;
              }
              return result;
          }
          /**
           * Sets the current 'tokenValue' and returns a NoSubstitutionTemplateLiteral or
           * a literal component of a TemplateExpression.
           */
          function scanTemplateAndSetTokenValue() {
              var startedWithBacktick = text.charCodeAt(pos) === 96 /* backtick */;
              pos++;
              var start = pos;
              var contents = "";
              var resultingToken;
              while (true) {
                  if (pos >= end) {
                      contents += text.substring(start, pos);
                      tokenIsUnterminated = true;
                      error(ts.Diagnostics.Unterminated_template_literal);
                      resultingToken = startedWithBacktick ? 12 /* NoSubstitutionTemplateLiteral */ : 15 /* TemplateTail */;
                      break;
                  }
                  var currChar = text.charCodeAt(pos);
                  // '`'
                  if (currChar === 96 /* backtick */) {
                      contents += text.substring(start, pos);
                      pos++;
                      resultingToken = startedWithBacktick ? 12 /* NoSubstitutionTemplateLiteral */ : 15 /* TemplateTail */;
                      break;
                  }
                  // '${'
                  if (currChar === 36 /* $ */ && pos + 1 < end && text.charCodeAt(pos + 1) === 123 /* openBrace */) {
                      contents += text.substring(start, pos);
                      pos += 2;
                      resultingToken = startedWithBacktick ? 13 /* TemplateHead */ : 14 /* TemplateMiddle */;
                      break;
                  }
                  // Escape character
                  if (currChar === 92 /* backslash */) {
                      contents += text.substring(start, pos);
                      contents += scanEscapeSequence();
                      start = pos;
                      continue;
                  }
                  // Speculated ECMAScript 6 Spec 11.8.6.1:
                  // <CR><LF> and <CR> LineTerminatorSequences are normalized to <LF> for Template Values
                  if (currChar === 13 /* carriageReturn */) {
                      contents += text.substring(start, pos);
                      pos++;
                      if (pos < end && text.charCodeAt(pos) === 10 /* lineFeed */) {
                          pos++;
                      }
                      contents += "\n";
                      start = pos;
                      continue;
                  }
                  pos++;
              }
              ts.Debug.assert(resultingToken !== undefined);
              tokenValue = contents;
              return resultingToken;
          }
          function scanEscapeSequence() {
              pos++;
              if (pos >= end) {
                  error(ts.Diagnostics.Unexpected_end_of_text);
                  return "";
              }
              var ch = text.charCodeAt(pos);
              pos++;
              switch (ch) {
                  case 48 /* _0 */:
                      return "\0";
                  case 98 /* b */:
                      return "\b";
                  case 116 /* t */:
                      return "\t";
                  case 110 /* n */:
                      return "\n";
                  case 118 /* v */:
                      return "\v";
                  case 102 /* f */:
                      return "\f";
                  case 114 /* r */:
                      return "\r";
                  case 39 /* singleQuote */:
                      return "\'";
                  case 34 /* doubleQuote */:
                      return "\"";
                  case 117 /* u */:
                      // '\u{DDDDDDDD}'
                      if (pos < end && text.charCodeAt(pos) === 123 /* openBrace */) {
                          hasExtendedUnicodeEscape = true;
                          pos++;
                          return scanExtendedUnicodeEscape();
                      }
                      // '\uDDDD'
                      return scanHexadecimalEscape(/*numDigits*/ 4);
                  case 120 /* x */:
                      // '\xDD'
                      return scanHexadecimalEscape(/*numDigits*/ 2);
                  // when encountering a LineContinuation (i.e. a backslash and a line terminator sequence),
                  // the line terminator is interpreted to be "the empty code unit sequence".
                  case 13 /* carriageReturn */:
                      if (pos < end && text.charCodeAt(pos) === 10 /* lineFeed */) {
                          pos++;
                      }
                  // fall through
                  case 10 /* lineFeed */:
                  case 8232 /* lineSeparator */:
                  case 8233 /* paragraphSeparator */:
                      return "";
                  default:
                      return String.fromCharCode(ch);
              }
          }
          function scanHexadecimalEscape(numDigits) {
              var escapedValue = scanExactNumberOfHexDigits(numDigits);
              if (escapedValue >= 0) {
                  return String.fromCharCode(escapedValue);
              }
              else {
                  error(ts.Diagnostics.Hexadecimal_digit_expected);
                  return "";
              }
          }
          function scanExtendedUnicodeEscape() {
              var escapedValue = scanMinimumNumberOfHexDigits(1);
              var isInvalidExtendedEscape = false;
              // Validate the value of the digit
              if (escapedValue < 0) {
                  error(ts.Diagnostics.Hexadecimal_digit_expected);
                  isInvalidExtendedEscape = true;
              }
              else if (escapedValue > 0x10FFFF) {
                  error(ts.Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive);
                  isInvalidExtendedEscape = true;
              }
              if (pos >= end) {
                  error(ts.Diagnostics.Unexpected_end_of_text);
                  isInvalidExtendedEscape = true;
              }
              else if (text.charCodeAt(pos) === 125 /* closeBrace */) {
                  // Only swallow the following character up if it's a '}'.
                  pos++;
              }
              else {
                  error(ts.Diagnostics.Unterminated_Unicode_escape_sequence);
                  isInvalidExtendedEscape = true;
              }
              if (isInvalidExtendedEscape) {
                  return "";
              }
              return utf16EncodeAsString(escapedValue);
          }
          // Derived from the 10.1.1 UTF16Encoding of the ES6 Spec.
          function utf16EncodeAsString(codePoint) {
              ts.Debug.assert(0x0 <= codePoint && codePoint <= 0x10FFFF);
              if (codePoint <= 65535) {
                  return String.fromCharCode(codePoint);
              }
              var codeUnit1 = Math.floor((codePoint - 65536) / 1024) + 0xD800;
              var codeUnit2 = ((codePoint - 65536) % 1024) + 0xDC00;
              return String.fromCharCode(codeUnit1, codeUnit2);
          }
          // Current character is known to be a backslash. Check for Unicode escape of the form '\uXXXX'
          // and return code point value if valid Unicode escape is found. Otherwise return -1.
          function peekUnicodeEscape() {
              if (pos + 5 < end && text.charCodeAt(pos + 1) === 117 /* u */) {
                  var start_1 = pos;
                  pos += 2;
                  var value = scanExactNumberOfHexDigits(4);
                  pos = start_1;
                  return value;
              }
              return -1;
          }
          function scanIdentifierParts() {
              var result = "";
              var start = pos;
              while (pos < end) {
                  var ch = text.charCodeAt(pos);
                  if (isIdentifierPart(ch, languageVersion)) {
                      pos++;
                  }
                  else if (ch === 92 /* backslash */) {
                      ch = peekUnicodeEscape();
                      if (!(ch >= 0 && isIdentifierPart(ch, languageVersion))) {
                          break;
                      }
                      result += text.substring(start, pos);
                      result += String.fromCharCode(ch);
                      // Valid Unicode escape is always six characters
                      pos += 6;
                      start = pos;
                  }
                  else {
                      break;
                  }
              }
              result += text.substring(start, pos);
              return result;
          }
          function getIdentifierToken() {
              // Reserved words are between 2 and 11 characters long and start with a lowercase letter
              var len = tokenValue.length;
              if (len >= 2 && len <= 11) {
                  var ch = tokenValue.charCodeAt(0);
                  if (ch >= 97 /* a */ && ch <= 122 /* z */) {
                      token = textToToken.get(tokenValue);
                      if (token !== undefined) {
                          return token;
                      }
                  }
              }
              return token = 70 /* Identifier */;
          }
          function scanBinaryOrOctalDigits(base) {
              ts.Debug.assert(base === 2 || base === 8, "Expected either base 2 or base 8");
              var value = 0;
              // For counting number of digits; Valid binaryIntegerLiteral must have at least one binary digit following B or b.
              // Similarly valid octalIntegerLiteral must have at least one octal digit following o or O.
              var numberOfDigits = 0;
              while (true) {
                  var ch = text.charCodeAt(pos);
                  var valueOfCh = ch - 48 /* _0 */;
                  if (!isDigit(ch) || valueOfCh >= base) {
                      break;
                  }
                  value = value * base + valueOfCh;
                  pos++;
                  numberOfDigits++;
              }
              // Invalid binaryIntegerLiteral or octalIntegerLiteral
              if (numberOfDigits === 0) {
                  return -1;
              }
              return value;
          }
          function scan() {
              startPos = pos;
              hasExtendedUnicodeEscape = false;
              precedingLineBreak = false;
              tokenIsUnterminated = false;
              while (true) {
                  tokenPos = pos;
                  if (pos >= end) {
                      return token = 1 /* EndOfFileToken */;
                  }
                  var ch = text.charCodeAt(pos);
                  // Special handling for shebang
                  if (ch === 35 /* hash */ && pos === 0 && isShebangTrivia(text, pos)) {
                      pos = scanShebangTrivia(text, pos);
                      if (skipTrivia) {
                          continue;
                      }
                      else {
                          return token = 6 /* ShebangTrivia */;
                      }
                  }
                  switch (ch) {
                      case 10 /* lineFeed */:
                      case 13 /* carriageReturn */:
                          precedingLineBreak = true;
                          if (skipTrivia) {
                              pos++;
                              continue;
                          }
                          else {
                              if (ch === 13 /* carriageReturn */ && pos + 1 < end && text.charCodeAt(pos + 1) === 10 /* lineFeed */) {
                                  // consume both CR and LF
                                  pos += 2;
                              }
                              else {
                                  pos++;
                              }
                              return token = 4 /* NewLineTrivia */;
                          }
                      case 9 /* tab */:
                      case 11 /* verticalTab */:
                      case 12 /* formFeed */:
                      case 32 /* space */:
                          if (skipTrivia) {
                              pos++;
                              continue;
                          }
                          else {
                              while (pos < end && isWhiteSpaceSingleLine(text.charCodeAt(pos))) {
                                  pos++;
                              }
                              return token = 5 /* WhitespaceTrivia */;
                          }
                      case 33 /* exclamation */:
                          if (text.charCodeAt(pos + 1) === 61 /* equals */) {
                              if (text.charCodeAt(pos + 2) === 61 /* equals */) {
                                  return pos += 3, token = 34 /* ExclamationEqualsEqualsToken */;
                              }
                              return pos += 2, token = 32 /* ExclamationEqualsToken */;
                          }
                          pos++;
                          return token = 50 /* ExclamationToken */;
                      case 34 /* doubleQuote */:
                      case 39 /* singleQuote */:
                          tokenValue = scanString();
                          return token = 9 /* StringLiteral */;
                      case 96 /* backtick */:
                          return token = scanTemplateAndSetTokenValue();
                      case 37 /* percent */:
                          if (text.charCodeAt(pos + 1) === 61 /* equals */) {
                              return pos += 2, token = 63 /* PercentEqualsToken */;
                          }
                          pos++;
                          return token = 41 /* PercentToken */;
                      case 38 /* ampersand */:
                          if (text.charCodeAt(pos + 1) === 38 /* ampersand */) {
                              return pos += 2, token = 52 /* AmpersandAmpersandToken */;
                          }
                          if (text.charCodeAt(pos + 1) === 61 /* equals */) {
                              return pos += 2, token = 67 /* AmpersandEqualsToken */;
                          }
                          pos++;
                          return token = 47 /* AmpersandToken */;
                      case 40 /* openParen */:
                          pos++;
                          return token = 18 /* OpenParenToken */;
                      case 41 /* closeParen */:
                          pos++;
                          return token = 19 /* CloseParenToken */;
                      case 42 /* asterisk */:
                          if (text.charCodeAt(pos + 1) === 61 /* equals */) {
                              return pos += 2, token = 60 /* AsteriskEqualsToken */;
                          }
                          if (text.charCodeAt(pos + 1) === 42 /* asterisk */) {
                              if (text.charCodeAt(pos + 2) === 61 /* equals */) {
                                  return pos += 3, token = 61 /* AsteriskAsteriskEqualsToken */;
                              }
                              return pos += 2, token = 39 /* AsteriskAsteriskToken */;
                          }
                          pos++;
                          return token = 38 /* AsteriskToken */;
                      case 43 /* plus */:
                          if (text.charCodeAt(pos + 1) === 43 /* plus */) {
                              return pos += 2, token = 42 /* PlusPlusToken */;
                          }
                          if (text.charCodeAt(pos + 1) === 61 /* equals */) {
                              return pos += 2, token = 58 /* PlusEqualsToken */;
                          }
                          pos++;
                          return token = 36 /* PlusToken */;
                      case 44 /* comma */:
                          pos++;
                          return token = 25 /* CommaToken */;
                      case 45 /* minus */:
                          if (text.charCodeAt(pos + 1) === 45 /* minus */) {
                              return pos += 2, token = 43 /* MinusMinusToken */;
                          }
                          if (text.charCodeAt(pos + 1) === 61 /* equals */) {
                              return pos += 2, token = 59 /* MinusEqualsToken */;
                          }
                          pos++;
                          return token = 37 /* MinusToken */;
                      case 46 /* dot */:
                          if (isDigit(text.charCodeAt(pos + 1))) {
                              tokenValue = scanNumber();
                              return token = 8 /* NumericLiteral */;
                          }
                          if (text.charCodeAt(pos + 1) === 46 /* dot */ && text.charCodeAt(pos + 2) === 46 /* dot */) {
                              return pos += 3, token = 23 /* DotDotDotToken */;
                          }
                          pos++;
                          return token = 22 /* DotToken */;
                      case 47 /* slash */:
                          // Single-line comment
                          if (text.charCodeAt(pos + 1) === 47 /* slash */) {
                              pos += 2;
                              while (pos < end) {
                                  if (isLineBreak(text.charCodeAt(pos))) {
                                      break;
                                  }
                                  pos++;
                              }
                              if (skipTrivia) {
                                  continue;
                              }
                              else {
                                  return token = 2 /* SingleLineCommentTrivia */;
                              }
                          }
                          // Multi-line comment
                          if (text.charCodeAt(pos + 1) === 42 /* asterisk */) {
                              pos += 2;
                              var commentClosed = false;
                              while (pos < end) {
                                  var ch_2 = text.charCodeAt(pos);
                                  if (ch_2 === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) {
                                      pos += 2;
                                      commentClosed = true;
                                      break;
                                  }
                                  if (isLineBreak(ch_2)) {
                                      precedingLineBreak = true;
                                  }
                                  pos++;
                              }
                              if (!commentClosed) {
                                  error(ts.Diagnostics.Asterisk_Slash_expected);
                              }
                              if (skipTrivia) {
                                  continue;
                              }
                              else {
                                  tokenIsUnterminated = !commentClosed;
                                  return token = 3 /* MultiLineCommentTrivia */;
                              }
                          }
                          if (text.charCodeAt(pos + 1) === 61 /* equals */) {
                              return pos += 2, token = 62 /* SlashEqualsToken */;
                          }
                          pos++;
                          return token = 40 /* SlashToken */;
                      case 48 /* _0 */:
                          if (pos + 2 < end && (text.charCodeAt(pos + 1) === 88 /* X */ || text.charCodeAt(pos + 1) === 120 /* x */)) {
                              pos += 2;
                              var value = scanMinimumNumberOfHexDigits(1);
                              if (value < 0) {
                                  error(ts.Diagnostics.Hexadecimal_digit_expected);
                                  value = 0;
                              }
                              tokenValue = "" + value;
                              return token = 8 /* NumericLiteral */;
                          }
                          else if (pos + 2 < end && (text.charCodeAt(pos + 1) === 66 /* B */ || text.charCodeAt(pos + 1) === 98 /* b */)) {
                              pos += 2;
                              var value = scanBinaryOrOctalDigits(/* base */ 2);
                              if (value < 0) {
                                  error(ts.Diagnostics.Binary_digit_expected);
                                  value = 0;
                              }
                              tokenValue = "" + value;
                              return token = 8 /* NumericLiteral */;
                          }
                          else if (pos + 2 < end && (text.charCodeAt(pos + 1) === 79 /* O */ || text.charCodeAt(pos + 1) === 111 /* o */)) {
                              pos += 2;
                              var value = scanBinaryOrOctalDigits(/* base */ 8);
                              if (value < 0) {
                                  error(ts.Diagnostics.Octal_digit_expected);
                                  value = 0;
                              }
                              tokenValue = "" + value;
                              return token = 8 /* NumericLiteral */;
                          }
                          // Try to parse as an octal
                          if (pos + 1 < end && isOctalDigit(text.charCodeAt(pos + 1))) {
                              tokenValue = "" + scanOctalDigits();
                              return token = 8 /* NumericLiteral */;
                          }
                      // This fall-through is a deviation from the EcmaScript grammar. The grammar says that a leading zero
                      // can only be followed by an octal digit, a dot, or the end of the number literal. However, we are being
                      // permissive and allowing decimal digits of the form 08* and 09* (which many browsers also do).
                      case 49 /* _1 */:
                      case 50 /* _2 */:
                      case 51 /* _3 */:
                      case 52 /* _4 */:
                      case 53 /* _5 */:
                      case 54 /* _6 */:
                      case 55 /* _7 */:
                      case 56 /* _8 */:
                      case 57 /* _9 */:
                          tokenValue = scanNumber();
                          return token = 8 /* NumericLiteral */;
                      case 58 /* colon */:
                          pos++;
                          return token = 55 /* ColonToken */;
                      case 59 /* semicolon */:
                          pos++;
                          return token = 24 /* SemicolonToken */;
                      case 60 /* lessThan */:
                          if (isConflictMarkerTrivia(text, pos)) {
                              pos = scanConflictMarkerTrivia(text, pos, error);
                              if (skipTrivia) {
                                  continue;
                              }
                              else {
                                  return token = 7 /* ConflictMarkerTrivia */;
                              }
                          }
                          if (text.charCodeAt(pos + 1) === 60 /* lessThan */) {
                              if (text.charCodeAt(pos + 2) === 61 /* equals */) {
                                  return pos += 3, token = 64 /* LessThanLessThanEqualsToken */;
                              }
                              return pos += 2, token = 44 /* LessThanLessThanToken */;
                          }
                          if (text.charCodeAt(pos + 1) === 61 /* equals */) {
                              return pos += 2, token = 29 /* LessThanEqualsToken */;
                          }
                          if (languageVariant === 1 /* JSX */ &&
                              text.charCodeAt(pos + 1) === 47 /* slash */ &&
                              text.charCodeAt(pos + 2) !== 42 /* asterisk */) {
                              return pos += 2, token = 27 /* LessThanSlashToken */;
                          }
                          pos++;
                          return token = 26 /* LessThanToken */;
                      case 61 /* equals */:
                          if (isConflictMarkerTrivia(text, pos)) {
                              pos = scanConflictMarkerTrivia(text, pos, error);
                              if (skipTrivia) {
                                  continue;
                              }
                              else {
                                  return token = 7 /* ConflictMarkerTrivia */;
                              }
                          }
                          if (text.charCodeAt(pos + 1) === 61 /* equals */) {
                              if (text.charCodeAt(pos + 2) === 61 /* equals */) {
                                  return pos += 3, token = 33 /* EqualsEqualsEqualsToken */;
                              }
                              return pos += 2, token = 31 /* EqualsEqualsToken */;
                          }
                          if (text.charCodeAt(pos + 1) === 62 /* greaterThan */) {
                              return pos += 2, token = 35 /* EqualsGreaterThanToken */;
                          }
                          pos++;
                          return token = 57 /* EqualsToken */;
                      case 62 /* greaterThan */:
                          if (isConflictMarkerTrivia(text, pos)) {
                              pos = scanConflictMarkerTrivia(text, pos, error);
                              if (skipTrivia) {
                                  continue;
                              }
                              else {
                                  return token = 7 /* ConflictMarkerTrivia */;
                              }
                          }
                          pos++;
                          return token = 28 /* GreaterThanToken */;
                      case 63 /* question */:
                          pos++;
                          return token = 54 /* QuestionToken */;
                      case 91 /* openBracket */:
                          pos++;
                          return token = 20 /* OpenBracketToken */;
                      case 93 /* closeBracket */:
                          pos++;
                          return token = 21 /* CloseBracketToken */;
                      case 94 /* caret */:
                          if (text.charCodeAt(pos + 1) === 61 /* equals */) {
                              return pos += 2, token = 69 /* CaretEqualsToken */;
                          }
                          pos++;
                          return token = 49 /* CaretToken */;
                      case 123 /* openBrace */:
                          pos++;
                          return token = 16 /* OpenBraceToken */;
                      case 124 /* bar */:
                          if (text.charCodeAt(pos + 1) === 124 /* bar */) {
                              return pos += 2, token = 53 /* BarBarToken */;
                          }
                          if (text.charCodeAt(pos + 1) === 61 /* equals */) {
                              return pos += 2, token = 68 /* BarEqualsToken */;
                          }
                          pos++;
                          return token = 48 /* BarToken */;
                      case 125 /* closeBrace */:
                          pos++;
                          return token = 17 /* CloseBraceToken */;
                      case 126 /* tilde */:
                          pos++;
                          return token = 51 /* TildeToken */;
                      case 64 /* at */:
                          pos++;
                          return token = 56 /* AtToken */;
                      case 92 /* backslash */:
                          var cookedChar = peekUnicodeEscape();
                          if (cookedChar >= 0 && isIdentifierStart(cookedChar, languageVersion)) {
                              pos += 6;
                              tokenValue = String.fromCharCode(cookedChar) + scanIdentifierParts();
                              return token = getIdentifierToken();
                          }
                          error(ts.Diagnostics.Invalid_character);
                          pos++;
                          return token = 0 /* Unknown */;
                      default:
                          if (isIdentifierStart(ch, languageVersion)) {
                              pos++;
                              while (pos < end && isIdentifierPart(ch = text.charCodeAt(pos), languageVersion))
                                  pos++;
                              tokenValue = text.substring(tokenPos, pos);
                              if (ch === 92 /* backslash */) {
                                  tokenValue += scanIdentifierParts();
                              }
                              return token = getIdentifierToken();
                          }
                          else if (isWhiteSpaceSingleLine(ch)) {
                              pos++;
                              continue;
                          }
                          else if (isLineBreak(ch)) {
                              precedingLineBreak = true;
                              pos++;
                              continue;
                          }
                          error(ts.Diagnostics.Invalid_character);
                          pos++;
                          return token = 0 /* Unknown */;
                  }
              }
          }
          function reScanGreaterToken() {
              if (token === 28 /* GreaterThanToken */) {
                  if (text.charCodeAt(pos) === 62 /* greaterThan */) {
                      if (text.charCodeAt(pos + 1) === 62 /* greaterThan */) {
                          if (text.charCodeAt(pos + 2) === 61 /* equals */) {
                              return pos += 3, token = 66 /* GreaterThanGreaterThanGreaterThanEqualsToken */;
                          }
                          return pos += 2, token = 46 /* GreaterThanGreaterThanGreaterThanToken */;
                      }
                      if (text.charCodeAt(pos + 1) === 61 /* equals */) {
                          return pos += 2, token = 65 /* GreaterThanGreaterThanEqualsToken */;
                      }
                      pos++;
                      return token = 45 /* GreaterThanGreaterThanToken */;
                  }
                  if (text.charCodeAt(pos) === 61 /* equals */) {
                      pos++;
                      return token = 30 /* GreaterThanEqualsToken */;
                  }
              }
              return token;
          }
          function reScanSlashToken() {
              if (token === 40 /* SlashToken */ || token === 62 /* SlashEqualsToken */) {
                  var p = tokenPos + 1;
                  var inEscape = false;
                  var inCharacterClass = false;
                  while (true) {
                      // If we reach the end of a file, or hit a newline, then this is an unterminated
                      // regex.  Report error and return what we have so far.
                      if (p >= end) {
                          tokenIsUnterminated = true;
                          error(ts.Diagnostics.Unterminated_regular_expression_literal);
                          break;
                      }
                      var ch = text.charCodeAt(p);
                      if (isLineBreak(ch)) {
                          tokenIsUnterminated = true;
                          error(ts.Diagnostics.Unterminated_regular_expression_literal);
                          break;
                      }
                      if (inEscape) {
                          // Parsing an escape character;
                          // reset the flag and just advance to the next char.
                          inEscape = false;
                      }
                      else if (ch === 47 /* slash */ && !inCharacterClass) {
                          // A slash within a character class is permissible,
                          // but in general it signals the end of the regexp literal.
                          p++;
                          break;
                      }
                      else if (ch === 91 /* openBracket */) {
                          inCharacterClass = true;
                      }
                      else if (ch === 92 /* backslash */) {
                          inEscape = true;
                      }
                      else if (ch === 93 /* closeBracket */) {
                          inCharacterClass = false;
                      }
                      p++;
                  }
                  while (p < end && isIdentifierPart(text.charCodeAt(p), languageVersion)) {
                      p++;
                  }
                  pos = p;
                  tokenValue = text.substring(tokenPos, pos);
                  token = 11 /* RegularExpressionLiteral */;
              }
              return token;
          }
          /**
           * Unconditionally back up and scan a template expression portion.
           */
          function reScanTemplateToken() {
              ts.Debug.assert(token === 17 /* CloseBraceToken */, "'reScanTemplateToken' should only be called on a '}'");
              pos = tokenPos;
              return token = scanTemplateAndSetTokenValue();
          }
          function reScanJsxToken() {
              pos = tokenPos = startPos;
              return token = scanJsxToken();
          }
          function scanJsxToken() {
              startPos = tokenPos = pos;
              if (pos >= end) {
                  return token = 1 /* EndOfFileToken */;
              }
              var char = text.charCodeAt(pos);
              if (char === 60 /* lessThan */) {
                  if (text.charCodeAt(pos + 1) === 47 /* slash */) {
                      pos += 2;
                      return token = 27 /* LessThanSlashToken */;
                  }
                  pos++;
                  return token = 26 /* LessThanToken */;
              }
              if (char === 123 /* openBrace */) {
                  pos++;
                  return token = 16 /* OpenBraceToken */;
              }
              while (pos < end) {
                  pos++;
                  char = text.charCodeAt(pos);
                  if ((char === 123 /* openBrace */) || (char === 60 /* lessThan */)) {
                      break;
                  }
              }
              return token = 10 /* JsxText */;
          }
          // Scans a JSX identifier; these differ from normal identifiers in that
          // they allow dashes
          function scanJsxIdentifier() {
              if (tokenIsIdentifierOrKeyword(token)) {
                  var firstCharPosition = pos;
                  while (pos < end) {
                      var ch = text.charCodeAt(pos);
                      if (ch === 45 /* minus */ || ((firstCharPosition === pos) ? isIdentifierStart(ch, languageVersion) : isIdentifierPart(ch, languageVersion))) {
                          pos++;
                      }
                      else {
                          break;
                      }
                  }
                  tokenValue += text.substr(firstCharPosition, pos - firstCharPosition);
              }
              return token;
          }
          function scanJsxAttributeValue() {
              startPos = pos;
              switch (text.charCodeAt(pos)) {
                  case 34 /* doubleQuote */:
                  case 39 /* singleQuote */:
                      tokenValue = scanString(/*allowEscapes*/ false);
                      return token = 9 /* StringLiteral */;
                  default:
                      // If this scans anything other than `{`, it's a parse error.
                      return scan();
              }
          }
          function scanJSDocToken() {
              if (pos >= end) {
                  return token = 1 /* EndOfFileToken */;
              }
              startPos = pos;
              tokenPos = pos;
              var ch = text.charCodeAt(pos);
              switch (ch) {
                  case 9 /* tab */:
                  case 11 /* verticalTab */:
                  case 12 /* formFeed */:
                  case 32 /* space */:
                      while (pos < end && isWhiteSpaceSingleLine(text.charCodeAt(pos))) {
                          pos++;
                      }
                      return token = 5 /* WhitespaceTrivia */;
                  case 64 /* at */:
                      pos++;
                      return token = 56 /* AtToken */;
                  case 10 /* lineFeed */:
                  case 13 /* carriageReturn */:
                      pos++;
                      return token = 4 /* NewLineTrivia */;
                  case 42 /* asterisk */:
                      pos++;
                      return token = 38 /* AsteriskToken */;
                  case 123 /* openBrace */:
                      pos++;
                      return token = 16 /* OpenBraceToken */;
                  case 125 /* closeBrace */:
                      pos++;
                      return token = 17 /* CloseBraceToken */;
                  case 91 /* openBracket */:
                      pos++;
                      return token = 20 /* OpenBracketToken */;
                  case 93 /* closeBracket */:
                      pos++;
                      return token = 21 /* CloseBracketToken */;
                  case 61 /* equals */:
                      pos++;
                      return token = 57 /* EqualsToken */;
                  case 44 /* comma */:
                      pos++;
                      return token = 25 /* CommaToken */;
                  case 46 /* dot */:
                      pos++;
                      return token = 22 /* DotToken */;
              }
              if (isIdentifierStart(ch, 5 /* Latest */)) {
                  pos++;
                  while (isIdentifierPart(text.charCodeAt(pos), 5 /* Latest */) && pos < end) {
                      pos++;
                  }
                  return token = 70 /* Identifier */;
              }
              else {
                  return pos += 1, token = 0 /* Unknown */;
              }
          }
          function speculationHelper(callback, isLookahead) {
              var savePos = pos;
              var saveStartPos = startPos;
              var saveTokenPos = tokenPos;
              var saveToken = token;
              var saveTokenValue = tokenValue;
              var savePrecedingLineBreak = precedingLineBreak;
              var result = callback();
              // If our callback returned something 'falsy' or we're just looking ahead,
              // then unconditionally restore us to where we were.
              if (!result || isLookahead) {
                  pos = savePos;
                  startPos = saveStartPos;
                  tokenPos = saveTokenPos;
                  token = saveToken;
                  tokenValue = saveTokenValue;
                  precedingLineBreak = savePrecedingLineBreak;
              }
              return result;
          }
          function scanRange(start, length, callback) {
              var saveEnd = end;
              var savePos = pos;
              var saveStartPos = startPos;
              var saveTokenPos = tokenPos;
              var saveToken = token;
              var savePrecedingLineBreak = precedingLineBreak;
              var saveTokenValue = tokenValue;
              var saveHasExtendedUnicodeEscape = hasExtendedUnicodeEscape;
              var saveTokenIsUnterminated = tokenIsUnterminated;
              setText(text, start, length);
              var result = callback();
              end = saveEnd;
              pos = savePos;
              startPos = saveStartPos;
              tokenPos = saveTokenPos;
              token = saveToken;
              precedingLineBreak = savePrecedingLineBreak;
              tokenValue = saveTokenValue;
              hasExtendedUnicodeEscape = saveHasExtendedUnicodeEscape;
              tokenIsUnterminated = saveTokenIsUnterminated;
              return result;
          }
          function lookAhead(callback) {
              return speculationHelper(callback, /*isLookahead*/ true);
          }
          function tryScan(callback) {
              return speculationHelper(callback, /*isLookahead*/ false);
          }
          function getText() {
              return text;
          }
          function setText(newText, start, length) {
              // FIXME: This is working around a nasty bug in Higgs
              if (typeof newText === "undefined")
                  text = "";
              else
                  text = newText;
              //text = newText || "";
              end = length === undefined ? text.length : start + length;
              setTextPos(start || 0);
          }
          function setOnError(errorCallback) {
              onError = errorCallback;
          }
          function setScriptTarget(scriptTarget) {
              languageVersion = scriptTarget;
          }
          function setLanguageVariant(variant) {
              languageVariant = variant;
          }
          function setTextPos(textPos) {
              ts.Debug.assert(textPos >= 0);
              pos = textPos;
              startPos = textPos;
              tokenPos = textPos;
              token = 0 /* Unknown */;
              precedingLineBreak = false;
              tokenValue = undefined;
              hasExtendedUnicodeEscape = false;
              tokenIsUnterminated = false;
          }
      }
      ts.createScanner = createScanner;
  })(ts || (ts = {}));
  /// <reference path="sys.ts"/>
  /// <reference path="types.ts"/>
  /// <reference path="core.ts"/>
  /// <reference path="diagnosticInformationMap.generated.ts"/>
  /// <reference path="scanner.ts"/>
  var ts;
  (function (ts) {
      /* @internal */
      ts.compileOnSaveCommandLineOption = { name: "compileOnSave", type: "boolean" };
      /* @internal */
      ts.optionDeclarations = [
          {
              name: "charset",
              type: "string",
          },
          ts.compileOnSaveCommandLineOption,
          {
              name: "declaration",
              shortName: "d",
              type: "boolean",
              description: ts.Diagnostics.Generates_corresponding_d_ts_file,
          },
          {
              name: "declarationDir",
              type: "string",
              isFilePath: true,
              paramType: ts.Diagnostics.DIRECTORY,
          },
          {
              name: "diagnostics",
              type: "boolean",
          },
          {
              name: "extendedDiagnostics",
              type: "boolean",
              experimental: true
          },
          {
              name: "emitBOM",
              type: "boolean"
          },
          {
              name: "help",
              shortName: "h",
              type: "boolean",
              description: ts.Diagnostics.Print_this_message,
          },
          {
              name: "help",
              shortName: "?",
              type: "boolean"
          },
          {
              name: "init",
              type: "boolean",
              description: ts.Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,
          },
          {
              name: "inlineSourceMap",
              type: "boolean",
          },
          {
              name: "inlineSources",
              type: "boolean",
          },
          {
              name: "jsx",
              type: ts.createMapFromTemplate({
                  "preserve": 1 /* Preserve */,
                  "react-native": 3 /* ReactNative */,
                  "react": 2 /* React */
              }),
              paramType: ts.Diagnostics.KIND,
              description: ts.Diagnostics.Specify_JSX_code_generation_Colon_preserve_react_native_or_react,
          },
          {
              name: "reactNamespace",
              type: "string",
              description: ts.Diagnostics.Specify_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit
          },
          {
              name: "jsxFactory",
              type: "string",
              description: ts.Diagnostics.Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h
          },
          {
              name: "listFiles",
              type: "boolean",
          },
          {
              name: "locale",
              type: "string",
          },
          {
              name: "mapRoot",
              type: "string",
              isFilePath: true,
              description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations,
              paramType: ts.Diagnostics.LOCATION,
          },
          {
              name: "module",
              shortName: "m",
              type: ts.createMapFromTemplate({
                  "none": ts.ModuleKind.None,
                  "commonjs": ts.ModuleKind.CommonJS,
                  "amd": ts.ModuleKind.AMD,
                  "system": ts.ModuleKind.System,
                  "umd": ts.ModuleKind.UMD,
                  "es6": ts.ModuleKind.ES2015,
                  "es2015": ts.ModuleKind.ES2015,
              }),
              description: ts.Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015,
              paramType: ts.Diagnostics.KIND,
          },
          {
              name: "newLine",
              type: ts.createMapFromTemplate({
                  "crlf": 0 /* CarriageReturnLineFeed */,
                  "lf": 1 /* LineFeed */
              }),
              description: ts.Diagnostics.Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix,
              paramType: ts.Diagnostics.NEWLINE,
          },
          {
              name: "noEmit",
              type: "boolean",
              description: ts.Diagnostics.Do_not_emit_outputs,
          },
          {
              name: "noEmitHelpers",
              type: "boolean"
          },
          {
              name: "noEmitOnError",
              type: "boolean",
              description: ts.Diagnostics.Do_not_emit_outputs_if_any_errors_were_reported,
          },
          {
              name: "noErrorTruncation",
              type: "boolean"
          },
          {
              name: "noImplicitAny",
              type: "boolean",
              description: ts.Diagnostics.Raise_error_on_expressions_and_declarations_with_an_implied_any_type,
          },
          {
              name: "noImplicitThis",
              type: "boolean",
              description: ts.Diagnostics.Raise_error_on_this_expressions_with_an_implied_any_type,
          },
          {
              name: "noUnusedLocals",
              type: "boolean",
              description: ts.Diagnostics.Report_errors_on_unused_locals,
          },
          {
              name: "noUnusedParameters",
              type: "boolean",
              description: ts.Diagnostics.Report_errors_on_unused_parameters,
          },
          {
              name: "noLib",
              type: "boolean",
          },
          {
              name: "noResolve",
              type: "boolean",
          },
          {
              name: "skipDefaultLibCheck",
              type: "boolean",
          },
          {
              name: "skipLibCheck",
              type: "boolean",
              description: ts.Diagnostics.Skip_type_checking_of_declaration_files,
          },
          {
              name: "out",
              type: "string",
              isFilePath: false,
              // for correct behaviour, please use outFile
              paramType: ts.Diagnostics.FILE,
          },
          {
              name: "outFile",
              type: "string",
              isFilePath: true,
              description: ts.Diagnostics.Concatenate_and_emit_output_to_single_file,
              paramType: ts.Diagnostics.FILE,
          },
          {
              name: "outDir",
              type: "string",
              isFilePath: true,
              description: ts.Diagnostics.Redirect_output_structure_to_the_directory,
              paramType: ts.Diagnostics.DIRECTORY,
          },
          {
              name: "preserveConstEnums",
              type: "boolean",
              description: ts.Diagnostics.Do_not_erase_const_enum_declarations_in_generated_code
          },
          {
              name: "pretty",
              description: ts.Diagnostics.Stylize_errors_and_messages_using_color_and_context_experimental,
              type: "boolean"
          },
          {
              name: "project",
              shortName: "p",
              type: "string",
              isFilePath: true,
              description: ts.Diagnostics.Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json,
              paramType: ts.Diagnostics.FILE_OR_DIRECTORY
          },
          {
              name: "removeComments",
              type: "boolean",
              description: ts.Diagnostics.Do_not_emit_comments_to_output,
          },
          {
              name: "rootDir",
              type: "string",
              isFilePath: true,
              paramType: ts.Diagnostics.LOCATION,
              description: ts.Diagnostics.Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir,
          },
          {
              name: "isolatedModules",
              type: "boolean",
          },
          {
              name: "sourceMap",
              type: "boolean",
              description: ts.Diagnostics.Generates_corresponding_map_file,
          },
          {
              name: "sourceRoot",
              type: "string",
              isFilePath: true,
              description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations,
              paramType: ts.Diagnostics.LOCATION,
          },
          {
              name: "suppressExcessPropertyErrors",
              type: "boolean",
              description: ts.Diagnostics.Suppress_excess_property_checks_for_object_literals,
              experimental: true
          },
          {
              name: "suppressImplicitAnyIndexErrors",
              type: "boolean",
              description: ts.Diagnostics.Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures,
          },
          {
              name: "stripInternal",
              type: "boolean",
              description: ts.Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation,
              experimental: true
          },
          {
              name: "target",
              shortName: "t",
              type: ts.createMapFromTemplate({
                  "es3": 0 /* ES3 */,
                  "es5": 1 /* ES5 */,
                  "es6": 2 /* ES2015 */,
                  "es2015": 2 /* ES2015 */,
                  "es2016": 3 /* ES2016 */,
                  "es2017": 4 /* ES2017 */,
                  "esnext": 5 /* ESNext */,
              }),
              description: ts.Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_or_ESNEXT,
              paramType: ts.Diagnostics.VERSION,
          },
          {
              name: "version",
              shortName: "v",
              type: "boolean",
              description: ts.Diagnostics.Print_the_compiler_s_version,
          },
          {
              name: "watch",
              shortName: "w",
              type: "boolean",
              description: ts.Diagnostics.Watch_input_files,
          },
          {
              name: "experimentalDecorators",
              type: "boolean",
              description: ts.Diagnostics.Enables_experimental_support_for_ES7_decorators
          },
          {
              name: "emitDecoratorMetadata",
              type: "boolean",
              experimental: true,
              description: ts.Diagnostics.Enables_experimental_support_for_emitting_type_metadata_for_decorators
          },
          {
              name: "moduleResolution",
              type: ts.createMapFromTemplate({
                  "node": ts.ModuleResolutionKind.NodeJs,
                  "classic": ts.ModuleResolutionKind.Classic,
              }),
              description: ts.Diagnostics.Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6,
              paramType: ts.Diagnostics.STRATEGY,
          },
          {
              name: "allowUnusedLabels",
              type: "boolean",
              description: ts.Diagnostics.Do_not_report_errors_on_unused_labels
          },
          {
              name: "noImplicitReturns",
              type: "boolean",
              description: ts.Diagnostics.Report_error_when_not_all_code_paths_in_function_return_a_value
          },
          {
              name: "noFallthroughCasesInSwitch",
              type: "boolean",
              description: ts.Diagnostics.Report_errors_for_fallthrough_cases_in_switch_statement
          },
          {
              name: "allowUnreachableCode",
              type: "boolean",
              description: ts.Diagnostics.Do_not_report_errors_on_unreachable_code
          },
          {
              name: "forceConsistentCasingInFileNames",
              type: "boolean",
              description: ts.Diagnostics.Disallow_inconsistently_cased_references_to_the_same_file
          },
          {
              name: "baseUrl",
              type: "string",
              isFilePath: true,
              description: ts.Diagnostics.Base_directory_to_resolve_non_absolute_module_names
          },
          {
              // this option can only be specified in tsconfig.json
              // use type = object to copy the value as-is
              name: "paths",
              type: "object",
              isTSConfigOnly: true
          },
          {
              // this option can only be specified in tsconfig.json
              // use type = object to copy the value as-is
              name: "rootDirs",
              type: "list",
              isTSConfigOnly: true,
              element: {
                  name: "rootDirs",
                  type: "string",
                  isFilePath: true
              }
          },
          {
              name: "typeRoots",
              type: "list",
              element: {
                  name: "typeRoots",
                  type: "string",
                  isFilePath: true
              }
          },
          {
              name: "types",
              type: "list",
              element: {
                  name: "types",
                  type: "string"
              },
              description: ts.Diagnostics.Type_declaration_files_to_be_included_in_compilation
          },
          {
              name: "traceResolution",
              type: "boolean",
              description: ts.Diagnostics.Enable_tracing_of_the_name_resolution_process
          },
          {
              name: "allowJs",
              type: "boolean",
              description: ts.Diagnostics.Allow_javascript_files_to_be_compiled
          },
          {
              name: "allowSyntheticDefaultImports",
              type: "boolean",
              description: ts.Diagnostics.Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking
          },
          {
              name: "noImplicitUseStrict",
              type: "boolean",
              description: ts.Diagnostics.Do_not_emit_use_strict_directives_in_module_output
          },
          {
              name: "maxNodeModuleJsDepth",
              type: "number",
              description: ts.Diagnostics.The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files
          },
          {
              name: "listEmittedFiles",
              type: "boolean"
          },
          {
              name: "lib",
              type: "list",
              element: {
                  name: "lib",
                  type: ts.createMapFromTemplate({
                      // JavaScript only
                      "es5": "lib.es5.d.ts",
                      "es6": "lib.es2015.d.ts",
                      "es2015": "lib.es2015.d.ts",
                      "es7": "lib.es2016.d.ts",
                      "es2016": "lib.es2016.d.ts",
                      "es2017": "lib.es2017.d.ts",
                      // Host only
                      "dom": "lib.dom.d.ts",
                      "dom.iterable": "lib.dom.iterable.d.ts",
                      "webworker": "lib.webworker.d.ts",
                      "scripthost": "lib.scripthost.d.ts",
                      // ES2015 Or ESNext By-feature options
                      "es2015.core": "lib.es2015.core.d.ts",
                      "es2015.collection": "lib.es2015.collection.d.ts",
                      "es2015.generator": "lib.es2015.generator.d.ts",
                      "es2015.iterable": "lib.es2015.iterable.d.ts",
                      "es2015.promise": "lib.es2015.promise.d.ts",
                      "es2015.proxy": "lib.es2015.proxy.d.ts",
                      "es2015.reflect": "lib.es2015.reflect.d.ts",
                      "es2015.symbol": "lib.es2015.symbol.d.ts",
                      "es2015.symbol.wellknown": "lib.es2015.symbol.wellknown.d.ts",
                      "es2016.array.include": "lib.es2016.array.include.d.ts",
                      "es2017.object": "lib.es2017.object.d.ts",
                      "es2017.sharedmemory": "lib.es2017.sharedmemory.d.ts",
                      "es2017.string": "lib.es2017.string.d.ts",
                  }),
              },
              description: ts.Diagnostics.Specify_library_files_to_be_included_in_the_compilation_Colon
          },
          {
              name: "disableSizeLimit",
              type: "boolean"
          },
          {
              name: "strictNullChecks",
              type: "boolean",
              description: ts.Diagnostics.Enable_strict_null_checks
          },
          {
              name: "importHelpers",
              type: "boolean",
              description: ts.Diagnostics.Import_emit_helpers_from_tslib
          },
          {
              name: "alwaysStrict",
              type: "boolean",
              description: ts.Diagnostics.Parse_in_strict_mode_and_emit_use_strict_for_each_source_file
          },
          {
              name: "generateContracts",
              type: "boolean",
              description: ts.Diagnostics.Generate_HiggsCheck_contracts
          },
          {
              name: "annotationMangler",
              type: "string"
          },
          {
              // A list of plugins to load in the language service
              name: "plugins",
              type: "list",
              isTSConfigOnly: true,
              element: {
                  name: "plugin",
                  type: "object"
              }
          }
      ];
      /* @internal */
      ts.typeAcquisitionDeclarations = [
          {
              /* @deprecated typingOptions.enableAutoDiscovery
               * Use typeAcquisition.enable instead.
               */
              name: "enableAutoDiscovery",
              type: "boolean",
          },
          {
              name: "enable",
              type: "boolean",
          },
          {
              name: "include",
              type: "list",
              element: {
                  name: "include",
                  type: "string"
              }
          },
          {
              name: "exclude",
              type: "list",
              element: {
                  name: "exclude",
                  type: "string"
              }
          }
      ];
      /* @internal */
      ts.defaultInitCompilerOptions = {
          module: ts.ModuleKind.CommonJS,
          target: 1 /* ES5 */,
          noImplicitAny: false,
          sourceMap: false,
      };
      var optionNameMapCache;
      /* @internal */
      function convertEnableAutoDiscoveryToEnable(typeAcquisition) {
          // Convert deprecated typingOptions.enableAutoDiscovery to typeAcquisition.enable
          if (typeAcquisition && typeAcquisition.enableAutoDiscovery !== undefined && typeAcquisition.enable === undefined) {
              var result = {
                  enable: typeAcquisition.enableAutoDiscovery,
                  include: typeAcquisition.include || [],
                  exclude: typeAcquisition.exclude || []
              };
              return result;
          }
          return typeAcquisition;
      }
      ts.convertEnableAutoDiscoveryToEnable = convertEnableAutoDiscoveryToEnable;
      /* @internal */
      function getOptionNameMap() {
          if (optionNameMapCache) {
              return optionNameMapCache;
          }
          var optionNameMap = ts.createMap();
          var shortOptionNames = ts.createMap();
          ts.forEach(ts.optionDeclarations, function (option) {
              optionNameMap.set(option.name.toLowerCase(), option);
              if (option.shortName) {
                  shortOptionNames.set(option.shortName, option.name);
              }
          });
          optionNameMapCache = { optionNameMap: optionNameMap, shortOptionNames: shortOptionNames };
          return optionNameMapCache;
      }
      ts.getOptionNameMap = getOptionNameMap;
      /* @internal */
      function createCompilerDiagnosticForInvalidCustomType(opt) {
          var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'" + key + "'"; }).join(", ");
          return ts.createCompilerDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--" + opt.name, namesOfType);
      }
      ts.createCompilerDiagnosticForInvalidCustomType = createCompilerDiagnosticForInvalidCustomType;
      /* @internal */
      function parseCustomTypeOption(opt, value, errors) {
          return convertJsonOptionOfCustomType(opt, trimString(value || ""), errors);
      }
      ts.parseCustomTypeOption = parseCustomTypeOption;
      /* @internal */
      function parseListTypeOption(opt, value, errors) {
          if (value === void 0) { value = ""; }
          value = trimString(value);
          if (ts.startsWith(value, "-")) {
              return undefined;
          }
          if (value === "") {
              return [];
          }
          var values = value.split(",");
          switch (opt.element.type) {
              case "number":
                  return ts.map(values, parseInt);
              case "string":
                  return ts.map(values, function (v) { return v || ""; });
              default:
                  return ts.filter(ts.map(values, function (v) { return parseCustomTypeOption(opt.element, v, errors); }), function (v) { return !!v; });
          }
      }
      ts.parseListTypeOption = parseListTypeOption;
      function parseCommandLine(commandLine, readFile) {
          var options = {};
          var fileNames = [];
          var errors = [];
          var _a = getOptionNameMap(), optionNameMap = _a.optionNameMap, shortOptionNames = _a.shortOptionNames;
          parseStrings(commandLine);
          return {
              options: options,
              fileNames: fileNames,
              errors: errors
          };
          function parseStrings(args) {
              var i = 0;
              while (i < args.length) {
                  var s = args[i];
                  i++;
                  if (s.charCodeAt(0) === 64 /* at */) {
                      parseResponseFile(s.slice(1));
                  }
                  else if (s.charCodeAt(0) === 45 /* minus */) {
                      s = s.slice(s.charCodeAt(1) === 45 /* minus */ ? 2 : 1).toLowerCase();
                      // Try to translate short option names to their full equivalents.
                      var short = shortOptionNames.get(s);
                      if (short !== undefined) {
                          s = short;
                      }
                      var opt = optionNameMap.get(s);
                      if (opt) {
                          if (opt.isTSConfigOnly) {
                              errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file, opt.name));
                          }
                          else {
                              // Check to see if no argument was provided (e.g. "--locale" is the last command-line argument).
                              if (!args[i] && opt.type !== "boolean") {
                                  errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_expects_an_argument, opt.name));
                              }
                              switch (opt.type) {
                                  case "number":
                                      options[opt.name] = parseInt(args[i]);
                                      i++;
                                      break;
                                  case "boolean":
                                      // boolean flag has optional value true, false, others
                                      var optValue = args[i];
                                      options[opt.name] = optValue !== "false";
                                      // consume next argument as boolean flag value
                                      if (optValue === "false" || optValue === "true") {
                                          i++;
                                      }
                                      break;
                                  case "string":
                                      options[opt.name] = args[i] || "";
                                      i++;
                                      break;
                                  case "list":
                                      var result = parseListTypeOption(opt, args[i], errors);
                                      options[opt.name] = result || [];
                                      if (result) {
                                          i++;
                                      }
                                      break;
                                  // If not a primitive, the possible types are specified in what is effectively a map of options.
                                  default:
                                      options[opt.name] = parseCustomTypeOption(opt, args[i], errors);
                                      i++;
                                      break;
                              }
                          }
                      }
                      else {
                          errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unknown_compiler_option_0, s));
                      }
                  }
                  else {
                      fileNames.push(s);
                  }
              }
          }
          function parseResponseFile(fileName) {
              var text = readFile ? readFile(fileName) : ts.sys.readFile(fileName);
              if (!text) {
                  errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.File_0_not_found, fileName));
                  return;
              }
              var args = [];
              var pos = 0;
              while (true) {
                  while (pos < text.length && text.charCodeAt(pos) <= 32 /* space */)
                      pos++;
                  if (pos >= text.length)
                      break;
                  var start = pos;
                  if (text.charCodeAt(start) === 34 /* doubleQuote */) {
                      pos++;
                      while (pos < text.length && text.charCodeAt(pos) !== 34 /* doubleQuote */)
                          pos++;
                      if (pos < text.length) {
                          args.push(text.substring(start + 1, pos));
                          pos++;
                      }
                      else {
                          errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unterminated_quoted_string_in_response_file_0, fileName));
                      }
                  }
                  else {
                      while (text.charCodeAt(pos) > 32 /* space */)
                          pos++;
                      args.push(text.substring(start, pos));
                  }
              }
              parseStrings(args);
          }
      }
      ts.parseCommandLine = parseCommandLine;
      /**
        * Read tsconfig.json file
        * @param fileName The path to the config file
        */
      function readConfigFile(fileName, readFile) {
          var text = "";
          try {
              text = readFile(fileName);
          }
          catch (e) {
              return { error: ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_read_file_0_Colon_1, fileName, e.message) };
          }
          return parseConfigFileTextToJson(fileName, text);
      }
      ts.readConfigFile = readConfigFile;
      /**
        * Parse the text of the tsconfig.json file
        * @param fileName The path to the config file
        * @param jsonText The text of the config file
        */
      function parseConfigFileTextToJson(fileName, jsonText, stripComments) {
          if (stripComments === void 0) { stripComments = true; }
          try {
              var jsonTextToParse = stripComments ? removeComments(jsonText) : jsonText;
              return { config: /\S/.test(jsonTextToParse) ? JSON.parse(jsonTextToParse) : {} };
          }
          catch (e) {
              return { error: ts.createCompilerDiagnostic(ts.Diagnostics.Failed_to_parse_file_0_Colon_1, fileName, e.message) };
          }
      }
      ts.parseConfigFileTextToJson = parseConfigFileTextToJson;
      /**
       * Generate tsconfig configuration when running command line "--init"
       * @param options commandlineOptions to be generated into tsconfig.json
       * @param fileNames array of filenames to be generated into tsconfig.json
       */
      /* @internal */
      function generateTSConfig(options, fileNames) {
          var compilerOptions = ts.extend(options, ts.defaultInitCompilerOptions);
          var configurations = {
              compilerOptions: serializeCompilerOptions(compilerOptions)
          };
          if (fileNames && fileNames.length) {
              // only set the files property if we have at least one file
              configurations.files = fileNames;
          }
          return configurations;
          function getCustomTypeMapOfCommandLineOption(optionDefinition) {
              if (optionDefinition.type === "string" || optionDefinition.type === "number" || optionDefinition.type === "boolean") {
                  // this is of a type CommandLineOptionOfPrimitiveType
                  return undefined;
              }
              else if (optionDefinition.type === "list") {
                  return getCustomTypeMapOfCommandLineOption(optionDefinition.element);
              }
              else {
                  return optionDefinition.type;
              }
          }
          function getNameOfCompilerOptionValue(value, customTypeMap) {
              // There is a typeMap associated with this command-line option so use it to map value back to its name
              return ts.forEachEntry(customTypeMap, function (mapValue, key) {
                  if (mapValue === value) {
                      return key;
                  }
              });
          }
          function serializeCompilerOptions(options) {
              var result = {};
              var optionsNameMap = getOptionNameMap().optionNameMap;
              for (var name in options) {
                  if (ts.hasProperty(options, name)) {
                      // tsconfig only options cannot be specified via command line,
                      // so we can assume that only types that can appear here string | number | boolean
                      switch (name) {
                          case "init":
                          case "watch":
                          case "version":
                          case "help":
                          case "project":
                              break;
                          default:
                              var value = options[name];
                              var optionDefinition = optionsNameMap.get(name.toLowerCase());
                              if (optionDefinition) {
                                  var customTypeMap = getCustomTypeMapOfCommandLineOption(optionDefinition);
                                  if (!customTypeMap) {
                                      // There is no map associated with this compiler option then use the value as-is
                                      // This is the case if the value is expect to be string, number, boolean or list of string
                                      result[name] = value;
                                  }
                                  else {
                                      if (optionDefinition.type === "list") {
                                          var convertedValue = [];
                                          for (var _i = 0, _a = value; _i < _a.length; _i++) {
                                              var element = _a[_i];
                                              convertedValue.push(getNameOfCompilerOptionValue(element, customTypeMap));
                                          }
                                          result[name] = convertedValue;
                                      }
                                      else {
                                          // There is a typeMap associated with this command-line option so use it to map value back to its name
                                          result[name] = getNameOfCompilerOptionValue(value, customTypeMap);
                                      }
                                  }
                              }
                              break;
                      }
                  }
              }
              return result;
          }
      }
      ts.generateTSConfig = generateTSConfig;
      /**
       * Remove the comments from a json like text.
       * Comments can be single line comments (starting with # or //) or multiline comments using / * * /
       *
       * This method replace comment content by whitespace rather than completely remove them to keep positions in json parsing error reporting accurate.
       */
      function removeComments(jsonText) {
          var output = "";
          var scanner = ts.createScanner(1 /* ES5 */, /* skipTrivia */ false, 0 /* Standard */, jsonText);
          var token;
          while ((token = scanner.scan()) !== 1 /* EndOfFileToken */) {
              switch (token) {
                  case 2 /* SingleLineCommentTrivia */:
                  case 3 /* MultiLineCommentTrivia */:
                      // replace comments with whitespace to preserve original character positions
                      output += scanner.getTokenText().replace(/\S/g, " ");
                      break;
                  default:
                      output += scanner.getTokenText();
                      break;
              }
          }
          return output;
      }
      /**
        * Parse the contents of a config file (tsconfig.json).
        * @param json The contents of the config file to parse
        * @param host Instance of ParseConfigHost used to enumerate files in folder.
        * @param basePath A root directory to resolve relative path entries in the config
        *    file to. e.g. outDir
        */
      function parseJsonConfigFileContent(json, host, basePath, existingOptions, configFileName, resolutionStack, extraFileExtensions) {
          if (existingOptions === void 0) { existingOptions = {}; }
          if (resolutionStack === void 0) { resolutionStack = []; }
          if (extraFileExtensions === void 0) { extraFileExtensions = []; }
          var errors = [];
          basePath = ts.normalizeSlashes(basePath);
          var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames);
          var resolvedPath = ts.toPath(configFileName || "", basePath, getCanonicalFileName);
          if (resolutionStack.indexOf(resolvedPath) >= 0) {
              return {
                  options: {},
                  fileNames: [],
                  typeAcquisition: {},
                  raw: json,
                  errors: [ts.createCompilerDiagnostic(ts.Diagnostics.Circularity_detected_while_resolving_configuration_Colon_0, resolutionStack.concat([resolvedPath]).join(" -> "))],
                  wildcardDirectories: {}
              };
          }
          var options = convertCompilerOptionsFromJsonWorker(json["compilerOptions"], basePath, errors, configFileName);
          // typingOptions has been deprecated and is only supported for backward compatibility purposes.
          // It should be removed in future releases - use typeAcquisition instead.
          var jsonOptions = json["typeAcquisition"] || json["typingOptions"];
          var typeAcquisition = convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors, configFileName);
          if (json["extends"]) {
              var _a = [undefined, undefined, undefined, {}], include = _a[0], exclude = _a[1], files = _a[2], baseOptions = _a[3];
              if (typeof json["extends"] === "string") {
                  _b = (tryExtendsName(json["extends"]) || [include, exclude, files, baseOptions]), include = _b[0], exclude = _b[1], files = _b[2], baseOptions = _b[3];
              }
              else {
                  errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "extends", "string"));
              }
              if (include && !json["include"]) {
                  json["include"] = include;
              }
              if (exclude && !json["exclude"]) {
                  json["exclude"] = exclude;
              }
              if (files && !json["files"]) {
                  json["files"] = files;
              }
              options = ts.assign({}, baseOptions, options);
          }
          options = ts.extend(existingOptions, options);
          options.configFilePath = configFileName;
          var _c = getFileNames(errors), fileNames = _c.fileNames, wildcardDirectories = _c.wildcardDirectories;
          var compileOnSave = convertCompileOnSaveOptionFromJson(json, basePath, errors);
          return {
              options: options,
              fileNames: fileNames,
              typeAcquisition: typeAcquisition,
              raw: json,
              errors: errors,
              wildcardDirectories: wildcardDirectories,
              compileOnSave: compileOnSave
          };
          function tryExtendsName(extendedConfig) {
              // If the path isn't a rooted or relative path, don't try to resolve it (we reserve the right to special case module-id like paths in the future)
              if (!(ts.isRootedDiskPath(extendedConfig) || ts.startsWith(ts.normalizeSlashes(extendedConfig), "./") || ts.startsWith(ts.normalizeSlashes(extendedConfig), "../"))) {
                  errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not, extendedConfig));
                  return;
              }
              var extendedConfigPath = ts.toPath(extendedConfig, basePath, getCanonicalFileName);
              if (!host.fileExists(extendedConfigPath) && !ts.endsWith(extendedConfigPath, ".json")) {
                  extendedConfigPath = extendedConfigPath + ".json";
                  if (!host.fileExists(extendedConfigPath)) {
                      errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.File_0_does_not_exist, extendedConfig));
                      return;
                  }
              }
              var extendedResult = readConfigFile(extendedConfigPath, function (path) { return host.readFile(path); });
              if (extendedResult.error) {
                  errors.push(extendedResult.error);
                  return;
              }
              var extendedDirname = ts.getDirectoryPath(extendedConfigPath);
              var relativeDifference = ts.convertToRelativePath(extendedDirname, basePath, getCanonicalFileName);
              var updatePath = function (path) { return ts.isRootedDiskPath(path) ? path : ts.combinePaths(relativeDifference, path); };
              // Merge configs (copy the resolution stack so it is never reused between branches in potential diamond-problem scenarios)
              var result = parseJsonConfigFileContent(extendedResult.config, host, extendedDirname, /*existingOptions*/ undefined, ts.getBaseFileName(extendedConfigPath), resolutionStack.concat([resolvedPath]));
              errors.push.apply(errors, result.errors);
              var _a = ts.map(["include", "exclude", "files"], function (key) {
                  if (!json[key] && extendedResult.config[key]) {
                      return ts.map(extendedResult.config[key], updatePath);
                  }
              }), include = _a[0], exclude = _a[1], files = _a[2];
              return [include, exclude, files, result.options];
          }
          function getFileNames(errors) {
              var fileNames;
              if (ts.hasProperty(json, "files")) {
                  if (ts.isArray(json["files"])) {
                      fileNames = json["files"];
                      if (fileNames.length === 0) {
                          errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.The_files_list_in_config_file_0_is_empty, configFileName || "tsconfig.json"));
                      }
                  }
                  else {
                      errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "files", "Array"));
                  }
              }
              var includeSpecs;
              if (ts.hasProperty(json, "include")) {
                  if (ts.isArray(json["include"])) {
                      includeSpecs = json["include"];
                  }
                  else {
                      errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "include", "Array"));
                  }
              }
              var excludeSpecs;
              if (ts.hasProperty(json, "exclude")) {
                  if (ts.isArray(json["exclude"])) {
                      excludeSpecs = json["exclude"];
                  }
                  else {
                      errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "exclude", "Array"));
                  }
              }
              else if (ts.hasProperty(json, "excludes")) {
                  errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unknown_option_excludes_Did_you_mean_exclude));
              }
              else {
                  // If no includes were specified, exclude common package folders and the outDir
                  excludeSpecs = includeSpecs ? [] : ["node_modules", "bower_components", "jspm_packages"];
                  var outDir = json["compilerOptions"] && json["compilerOptions"]["outDir"];
                  if (outDir) {
                      excludeSpecs.push(outDir);
                  }
              }
              if (fileNames === undefined && includeSpecs === undefined) {
                  includeSpecs = ["**/*"];
              }
              var result = matchFileNames(fileNames, includeSpecs, excludeSpecs, basePath, options, host, errors, extraFileExtensions);
              if (result.fileNames.length === 0 && !ts.hasProperty(json, "files") && resolutionStack.length === 0) {
                  errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2, configFileName || "tsconfig.json", JSON.stringify(includeSpecs || []), JSON.stringify(excludeSpecs || [])));
              }
              return result;
          }
          var _b;
      }
      ts.parseJsonConfigFileContent = parseJsonConfigFileContent;
      function convertCompileOnSaveOptionFromJson(jsonOption, basePath, errors) {
          if (!ts.hasProperty(jsonOption, ts.compileOnSaveCommandLineOption.name)) {
              return false;
          }
          var result = convertJsonOption(ts.compileOnSaveCommandLineOption, jsonOption["compileOnSave"], basePath, errors);
          if (typeof result === "boolean" && result) {
              return result;
          }
          return false;
      }
      ts.convertCompileOnSaveOptionFromJson = convertCompileOnSaveOptionFromJson;
      function convertCompilerOptionsFromJson(jsonOptions, basePath, configFileName) {
          var errors = [];
          var options = convertCompilerOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName);
          return { options: options, errors: errors };
      }
      ts.convertCompilerOptionsFromJson = convertCompilerOptionsFromJson;
      function convertTypeAcquisitionFromJson(jsonOptions, basePath, configFileName) {
          var errors = [];
          var options = convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors, configFileName);
          return { options: options, errors: errors };
      }
      ts.convertTypeAcquisitionFromJson = convertTypeAcquisitionFromJson;
      function convertCompilerOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName) {
          var options = ts.getBaseFileName(configFileName) === "jsconfig.json"
              ? { allowJs: true, maxNodeModuleJsDepth: 2, allowSyntheticDefaultImports: true, skipLibCheck: true }
              : {};
          convertOptionsFromJson(ts.optionDeclarations, jsonOptions, basePath, options, ts.Diagnostics.Unknown_compiler_option_0, errors);
          return options;
      }
      function convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors, configFileName) {
          var options = { enable: ts.getBaseFileName(configFileName) === "jsconfig.json", include: [], exclude: [] };
          var typeAcquisition = convertEnableAutoDiscoveryToEnable(jsonOptions);
          convertOptionsFromJson(ts.typeAcquisitionDeclarations, typeAcquisition, basePath, options, ts.Diagnostics.Unknown_type_acquisition_option_0, errors);
          return options;
      }
      function convertOptionsFromJson(optionDeclarations, jsonOptions, basePath, defaultOptions, diagnosticMessage, errors) {
          if (!jsonOptions) {
              return;
          }
          var optionNameMap = ts.arrayToMap(optionDeclarations, function (opt) { return opt.name; });
          for (var id in jsonOptions) {
              var opt = optionNameMap.get(id);
              if (opt) {
                  defaultOptions[opt.name] = convertJsonOption(opt, jsonOptions[id], basePath, errors);
              }
              else {
                  errors.push(ts.createCompilerDiagnostic(diagnosticMessage, id));
              }
          }
      }
      function convertJsonOption(opt, value, basePath, errors) {
          var optType = opt.type;
          var expectedType = typeof optType === "string" ? optType : "string";
          if (optType === "list" && ts.isArray(value)) {
              return convertJsonOptionOfListType(opt, value, basePath, errors);
          }
          else if (typeof value === expectedType) {
              if (typeof optType !== "string") {
                  return convertJsonOptionOfCustomType(opt, value, errors);
              }
              else {
                  if (opt.isFilePath) {
                      value = ts.normalizePath(ts.combinePaths(basePath, value));
                      if (value === "") {
                          value = ".";
                      }
                  }
              }
              return value;
          }
          else {
              errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, opt.name, expectedType));
          }
      }
      function convertJsonOptionOfCustomType(opt, value, errors) {
          var key = value.toLowerCase();
          var val = opt.type.get(key);
          if (val !== undefined) {
              return val;
          }
          else {
              errors.push(createCompilerDiagnosticForInvalidCustomType(opt));
          }
      }
      function convertJsonOptionOfListType(option, values, basePath, errors) {
          return ts.filter(ts.map(values, function (v) { return convertJsonOption(option.element, v, basePath, errors); }), function (v) { return !!v; });
      }
      function trimString(s) {
          return typeof s.trim === "function" ? s.trim() : s.replace(/^[\s]+|[\s]+$/g, "");
      }
      /**
       * Tests for a path that ends in a recursive directory wildcard.
       * Matches **, \**, **\, and \**\, but not a**b.
       *
       * NOTE: used \ in place of / above to avoid issues with multiline comments.
       *
       * Breakdown:
       *  (^|\/)      # matches either the beginning of the string or a directory separator.
       *  \*\*        # matches the recursive directory wildcard "**".
       *  \/?$        # matches an optional trailing directory separator at the end of the string.
       */
      var invalidTrailingRecursionPattern = /(^|\/)\*\*\/?$/;
      /**
       * Tests for a path with multiple recursive directory wildcards.
       * Matches **\** and **\a\**, but not **\a**b.
       *
       * NOTE: used \ in place of / above to avoid issues with multiline comments.
       *
       * Breakdown:
       *  (^|\/)      # matches either the beginning of the string or a directory separator.
       *  \*\*\/      # matches a recursive directory wildcard "**" followed by a directory separator.
       *  (.*\/)?     # optionally matches any number of characters followed by a directory separator.
       *  \*\*        # matches a recursive directory wildcard "**"
       *  ($|\/)      # matches either the end of the string or a directory separator.
       */
      var invalidMultipleRecursionPatterns = /(^|\/)\*\*\/(.*\/)?\*\*($|\/)/;
      /**
       * Tests for a path where .. appears after a recursive directory wildcard.
       * Matches **\..\*, **\a\..\*, and **\.., but not ..\**\*
       *
       * NOTE: used \ in place of / above to avoid issues with multiline comments.
       *
       * Breakdown:
       *  (^|\/)      # matches either the beginning of the string or a directory separator.
       *  \*\*\/      # matches a recursive directory wildcard "**" followed by a directory separator.
       *  (.*\/)?     # optionally matches any number of characters followed by a directory separator.
       *  \.\.        # matches a parent directory path component ".."
       *  ($|\/)      # matches either the end of the string or a directory separator.
       */
      var invalidDotDotAfterRecursiveWildcardPattern = /(^|\/)\*\*\/(.*\/)?\.\.($|\/)/;
      /**
       * Tests for a path containing a wildcard character in a directory component of the path.
       * Matches \*\, \?\, and \a*b\, but not \a\ or \a\*.
       *
       * NOTE: used \ in place of / above to avoid issues with multiline comments.
       *
       * Breakdown:
       *  \/          # matches a directory separator.
       *  [^/]*?      # matches any number of characters excluding directory separators (non-greedy).
       *  [*?]        # matches either a wildcard character (* or ?)
       *  [^/]*       # matches any number of characters excluding directory separators (greedy).
       *  \/          # matches a directory separator.
       */
      var watchRecursivePattern = /\/[^\/]*?[*?][^\/]*\//;
      /**
       * Matches the portion of a wildcard path that does not contain wildcards.
       * Matches \a of \a\*, or \a\b\c of \a\b\c\?\d.
       *
       * NOTE: used \ in place of / above to avoid issues with multiline comments.
       *
       * Breakdown:
       *  ^                   # matches the beginning of the string
       *  [^*?]*              # matches any number of non-wildcard characters
       *  (?=\/[^/]*[*?])     # lookahead that matches a directory separator followed by
       *                      # a path component that contains at least one wildcard character (* or ?).
       */
      var wildcardDirectoryPattern = /^[^*?]*(?=\/[^\/]*[*?])/;
      /**
       * Expands an array of file specifications.
       *
       * @param fileNames The literal file names to include.
       * @param include The wildcard file specifications to include.
       * @param exclude The wildcard file specifications to exclude.
       * @param basePath The base path for any relative file specifications.
       * @param options Compiler options.
       * @param host The host used to resolve files and directories.
       * @param errors An array for diagnostic reporting.
       */
      function matchFileNames(fileNames, include, exclude, basePath, options, host, errors, extraFileExtensions) {
          basePath = ts.normalizePath(basePath);
          // The exclude spec list is converted into a regular expression, which allows us to quickly
          // test whether a file or directory should be excluded before recursively traversing the
          // file system.
          var keyMapper = host.useCaseSensitiveFileNames ? caseSensitiveKeyMapper : caseInsensitiveKeyMapper;
          // Literal file names (provided via the "files" array in tsconfig.json) are stored in a
          // file map with a possibly case insensitive key. We use this map later when when including
          // wildcard paths.
          var literalFileMap = ts.createMap();
          // Wildcard paths (provided via the "includes" array in tsconfig.json) are stored in a
          // file map with a possibly case insensitive key. We use this map to store paths matched
          // via wildcard, and to handle extension priority.
          var wildcardFileMap = ts.createMap();
          if (include) {
              include = validateSpecs(include, errors, /*allowTrailingRecursion*/ false);
          }
          if (exclude) {
              exclude = validateSpecs(exclude, errors, /*allowTrailingRecursion*/ true);
          }
          // Wildcard directories (provided as part of a wildcard path) are stored in a
          // file map that marks whether it was a regular wildcard match (with a `*` or `?` token),
          // or a recursive directory. This information is used by filesystem watchers to monitor for
          // new entries in these paths.
          var wildcardDirectories = getWildcardDirectories(include, exclude, basePath, host.useCaseSensitiveFileNames);
          // Rather than requery this for each file and filespec, we query the supported extensions
          // once and store it on the expansion context.
          var supportedExtensions = ts.getSupportedExtensions(options, extraFileExtensions);
          // Literal files are always included verbatim. An "include" or "exclude" specification cannot
          // remove a literal file.
          if (fileNames) {
              for (var _i = 0, fileNames_1 = fileNames; _i < fileNames_1.length; _i++) {
                  var fileName = fileNames_1[_i];
                  var file = ts.combinePaths(basePath, fileName);
                  literalFileMap.set(keyMapper(file), file);
              }
          }
          if (include && include.length > 0) {
              for (var _a = 0, _b = host.readDirectory(basePath, supportedExtensions, exclude, include); _a < _b.length; _a++) {
                  var file = _b[_a];
                  // If we have already included a literal or wildcard path with a
                  // higher priority extension, we should skip this file.
                  //
                  // This handles cases where we may encounter both <file>.ts and
                  // <file>.d.ts (or <file>.js if "allowJs" is enabled) in the same
                  // directory when they are compilation outputs.
                  if (hasFileWithHigherPriorityExtension(file, literalFileMap, wildcardFileMap, supportedExtensions, keyMapper)) {
                      continue;
                  }
                  // We may have included a wildcard path with a lower priority
                  // extension due to the user-defined order of entries in the
                  // "include" array. If there is a lower priority extension in the
                  // same directory, we should remove it.
                  removeWildcardFilesWithLowerPriorityExtension(file, wildcardFileMap, supportedExtensions, keyMapper);
                  var key = keyMapper(file);
                  if (!literalFileMap.has(key) && !wildcardFileMap.has(key)) {
                      wildcardFileMap.set(key, file);
                  }
              }
          }
          var literalFiles = ts.arrayFrom(literalFileMap.values());
          var wildcardFiles = ts.arrayFrom(wildcardFileMap.values());
          return {
              fileNames: literalFiles.concat(wildcardFiles),
              wildcardDirectories: wildcardDirectories
          };
      }
      function validateSpecs(specs, errors, allowTrailingRecursion) {
          var validSpecs = [];
          for (var _i = 0, specs_1 = specs; _i < specs_1.length; _i++) {
              var spec = specs_1[_i];
              if (!allowTrailingRecursion && invalidTrailingRecursionPattern.test(spec)) {
                  errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec));
              }
              else if (invalidMultipleRecursionPatterns.test(spec)) {
                  errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0, spec));
              }
              else if (invalidDotDotAfterRecursiveWildcardPattern.test(spec)) {
                  errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec));
              }
              else {
                  validSpecs.push(spec);
              }
          }
          return validSpecs;
      }
      /**
       * Gets directories in a set of include patterns that should be watched for changes.
       */
      function getWildcardDirectories(include, exclude, path, useCaseSensitiveFileNames) {
          // We watch a directory recursively if it contains a wildcard anywhere in a directory segment
          // of the pattern:
          //
          //  /a/b/**/d   - Watch /a/b recursively to catch changes to any d in any subfolder recursively
          //  /a/b/*/d    - Watch /a/b recursively to catch any d in any immediate subfolder, even if a new subfolder is added
          //  /a/b        - Watch /a/b recursively to catch changes to anything in any recursive subfoler
          //
          // We watch a directory without recursion if it contains a wildcard in the file segment of
          // the pattern:
          //
          //  /a/b/*      - Watch /a/b directly to catch any new file
          //  /a/b/a?z    - Watch /a/b directly to catch any new file matching a?z
          var rawExcludeRegex = ts.getRegularExpressionForWildcard(exclude, path, "exclude");
          var excludeRegex = rawExcludeRegex && new RegExp(rawExcludeRegex, useCaseSensitiveFileNames ? "" : "i");
          var wildcardDirectories = {};
          if (include !== undefined) {
              var recursiveKeys = [];
              for (var _i = 0, include_1 = include; _i < include_1.length; _i++) {
                  var file = include_1[_i];
                  var spec = ts.normalizePath(ts.combinePaths(path, file));
                  if (excludeRegex && excludeRegex.test(spec)) {
                      continue;
                  }
                  var match = getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames);
                  if (match) {
                      var key = match.key, flags = match.flags;
                      var existingFlags = wildcardDirectories[key];
                      if (existingFlags === undefined || existingFlags < flags) {
                          wildcardDirectories[key] = flags;
                          if (flags === 1 /* Recursive */) {
                              recursiveKeys.push(key);
                          }
                      }
                  }
              }
              // Remove any subpaths under an existing recursively watched directory.
              for (var key in wildcardDirectories)
                  if (ts.hasProperty(wildcardDirectories, key)) {
                      for (var _a = 0, recursiveKeys_1 = recursiveKeys; _a < recursiveKeys_1.length; _a++) {
                          var recursiveKey = recursiveKeys_1[_a];
                          if (key !== recursiveKey && ts.containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames)) {
                              delete wildcardDirectories[key];
                          }
                      }
                  }
              ;
          }
          return wildcardDirectories;
      }
      function getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames) {
          var match = wildcardDirectoryPattern.exec(spec);
          if (match) {
              return {
                  key: useCaseSensitiveFileNames ? match[0] : match[0].toLowerCase(),
                  flags: watchRecursivePattern.test(spec) ? 1 /* Recursive */ : 0 /* None */
              };
          }
          if (ts.isImplicitGlob(spec)) {
              return { key: spec, flags: 1 /* Recursive */ };
          }
          return undefined;
      }
      /**
       * Determines whether a literal or wildcard file has already been included that has a higher
       * extension priority.
       *
       * @param file The path to the file.
       * @param extensionPriority The priority of the extension.
       * @param context The expansion context.
       */
      function hasFileWithHigherPriorityExtension(file, literalFiles, wildcardFiles, extensions, keyMapper) {
          var extensionPriority = ts.getExtensionPriority(file, extensions);
          var adjustedExtensionPriority = ts.adjustExtensionPriority(extensionPriority, extensions);
          for (var i = 0 /* Highest */; i < adjustedExtensionPriority; i++) {
              var higherPriorityExtension = extensions[i];
              var higherPriorityPath = keyMapper(ts.changeExtension(file, higherPriorityExtension));
              if (literalFiles.has(higherPriorityPath) || wildcardFiles.has(higherPriorityPath)) {
                  return true;
              }
          }
          return false;
      }
      /**
       * Removes files included via wildcard expansion with a lower extension priority that have
       * already been included.
       *
       * @param file The path to the file.
       * @param extensionPriority The priority of the extension.
       * @param context The expansion context.
       */
      function removeWildcardFilesWithLowerPriorityExtension(file, wildcardFiles, extensions, keyMapper) {
          var extensionPriority = ts.getExtensionPriority(file, extensions);
          var nextExtensionPriority = ts.getNextLowestExtensionPriority(extensionPriority, extensions);
          for (var i = nextExtensionPriority; i < extensions.length; i++) {
              var lowerPriorityExtension = extensions[i];
              var lowerPriorityPath = keyMapper(ts.changeExtension(file, lowerPriorityExtension));
              wildcardFiles.delete(lowerPriorityPath);
          }
      }
      /**
       * Gets a case sensitive key.
       *
       * @param key The original key.
       */
      function caseSensitiveKeyMapper(key) {
          return key;
      }
      /**
       * Gets a case insensitive key.
       *
       * @param key The original key.
       */
      function caseInsensitiveKeyMapper(key) {
          return key.toLowerCase();
      }
  })(ts || (ts = {}));
  // 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.
  /// <reference path='../compiler/types.ts' />
  /// <reference path='../compiler/core.ts' />
  /// <reference path='../compiler/commandLineParser.ts' />
  /* @internal */
  var ts;
  (function (ts) {
      var JsTyping;
      (function (JsTyping) {
          ;
          ;
          // A map of loose file names to library names
          // that we are confident require typings
          var safeList;
          var EmptySafeList = ts.createMap();
          /* @internal */
          JsTyping.nodeCoreModuleList = [
              "buffer", "querystring", "events", "http", "cluster",
              "zlib", "os", "https", "punycode", "repl", "readline",
              "vm", "child_process", "url", "dns", "net",
              "dgram", "fs", "path", "string_decoder", "tls",
              "crypto", "stream", "util", "assert", "tty", "domain",
              "constants", "process", "v8", "timers", "console"
          ];
          var nodeCoreModules = ts.arrayToMap(JsTyping.nodeCoreModuleList, function (x) { return x; });
          /**
           * @param host is the object providing I/O related operations.
           * @param fileNames are the file names that belong to the same project
           * @param projectRootPath is the path to the project root directory
           * @param safeListPath is the path used to retrieve the safe list
           * @param packageNameToTypingLocation is the map of package names to their cached typing locations
           * @param typeAcquisition is used to customize the typing acquisition process
           * @param compilerOptions are used as a source for typing inference
           */
          function discoverTypings(host, fileNames, projectRootPath, safeListPath, packageNameToTypingLocation, typeAcquisition, unresolvedImports) {
              // A typing name to typing file path mapping
              var inferredTypings = ts.createMap();
              if (!typeAcquisition || !typeAcquisition.enable) {
                  return { cachedTypingPaths: [], newTypingNames: [], filesToWatch: [] };
              }
              // Only infer typings for .js and .jsx files
              fileNames = ts.filter(ts.map(fileNames, ts.normalizePath), function (f) {
                  var kind = ts.ensureScriptKind(f, ts.getScriptKindFromFileName(f));
                  return kind === 1 /* JS */ || kind === 2 /* JSX */;
              });
              if (!safeList) {
                  var result = ts.readConfigFile(safeListPath, function (path) { return host.readFile(path); });
                  safeList = result.config ? ts.createMapFromTemplate(result.config) : EmptySafeList;
              }
              var filesToWatch = [];
              // Directories to search for package.json, bower.json and other typing information
              var searchDirs = [];
              var exclude = [];
              mergeTypings(typeAcquisition.include);
              exclude = typeAcquisition.exclude || [];
              var possibleSearchDirs = ts.map(fileNames, ts.getDirectoryPath);
              if (projectRootPath) {
                  possibleSearchDirs.push(projectRootPath);
              }
              searchDirs = ts.deduplicate(possibleSearchDirs);
              for (var _i = 0, searchDirs_1 = searchDirs; _i < searchDirs_1.length; _i++) {
                  var searchDir = searchDirs_1[_i];
                  var packageJsonPath = ts.combinePaths(searchDir, "package.json");
                  getTypingNamesFromJson(packageJsonPath, filesToWatch);
                  var bowerJsonPath = ts.combinePaths(searchDir, "bower.json");
                  getTypingNamesFromJson(bowerJsonPath, filesToWatch);
                  var nodeModulesPath = ts.combinePaths(searchDir, "node_modules");
                  getTypingNamesFromNodeModuleFolder(nodeModulesPath);
              }
              getTypingNamesFromSourceFileNames(fileNames);
              // add typings for unresolved imports
              if (unresolvedImports) {
                  for (var _a = 0, unresolvedImports_1 = unresolvedImports; _a < unresolvedImports_1.length; _a++) {
                      var moduleId = unresolvedImports_1[_a];
                      var typingName = nodeCoreModules.has(moduleId) ? "node" : moduleId;
                      if (!inferredTypings.has(typingName)) {
                          inferredTypings.set(typingName, undefined);
                      }
                  }
              }
              // Add the cached typing locations for inferred typings that are already installed
              packageNameToTypingLocation.forEach(function (typingLocation, name) {
                  if (inferredTypings.has(name) && inferredTypings.get(name) === undefined) {
                      inferredTypings.set(name, typingLocation);
                  }
              });
              // Remove typings that the user has added to the exclude list
              for (var _b = 0, exclude_1 = exclude; _b < exclude_1.length; _b++) {
                  var excludeTypingName = exclude_1[_b];
                  inferredTypings.delete(excludeTypingName);
              }
              var newTypingNames = [];
              var cachedTypingPaths = [];
              inferredTypings.forEach(function (inferred, typing) {
                  if (inferred !== undefined) {
                      cachedTypingPaths.push(inferred);
                  }
                  else {
                      newTypingNames.push(typing);
                  }
              });
              return { cachedTypingPaths: cachedTypingPaths, newTypingNames: newTypingNames, filesToWatch: filesToWatch };
              /**
               * Merge a given list of typingNames to the inferredTypings map
               */
              function mergeTypings(typingNames) {
                  if (!typingNames) {
                      return;
                  }
                  for (var _i = 0, typingNames_1 = typingNames; _i < typingNames_1.length; _i++) {
                      var typing = typingNames_1[_i];
                      if (!inferredTypings.has(typing)) {
                          inferredTypings.set(typing, undefined);
                      }
                  }
              }
              /**
               * Get the typing info from common package manager json files like package.json or bower.json
               */
              function getTypingNamesFromJson(jsonPath, filesToWatch) {
                  if (host.fileExists(jsonPath)) {
                      filesToWatch.push(jsonPath);
                  }
                  var result = ts.readConfigFile(jsonPath, function (path) { return host.readFile(path); });
                  if (result.config) {
                      var jsonConfig = result.config;
                      if (jsonConfig.dependencies) {
                          mergeTypings(ts.getOwnKeys(jsonConfig.dependencies));
                      }
                      if (jsonConfig.devDependencies) {
                          mergeTypings(ts.getOwnKeys(jsonConfig.devDependencies));
                      }
                      if (jsonConfig.optionalDependencies) {
                          mergeTypings(ts.getOwnKeys(jsonConfig.optionalDependencies));
                      }
                      if (jsonConfig.peerDependencies) {
                          mergeTypings(ts.getOwnKeys(jsonConfig.peerDependencies));
                      }
                  }
              }
              /**
               * Infer typing names from given file names. For example, the file name "jquery-min.2.3.4.js"
               * should be inferred to the 'jquery' typing name; and "angular-route.1.2.3.js" should be inferred
               * to the 'angular-route' typing name.
               * @param fileNames are the names for source files in the project
               */
              function getTypingNamesFromSourceFileNames(fileNames) {
                  var jsFileNames = ts.filter(fileNames, ts.hasJavaScriptFileExtension);
                  var inferredTypingNames = ts.map(jsFileNames, function (f) { return ts.removeFileExtension(ts.getBaseFileName(f.toLowerCase())); });
                  var cleanedTypingNames = ts.map(inferredTypingNames, function (f) { return f.replace(/((?:\.|-)min(?=\.|$))|((?:-|\.)\d+)/g, ""); });
                  if (safeList !== EmptySafeList) {
                      mergeTypings(ts.filter(cleanedTypingNames, function (f) { return safeList.has(f); }));
                  }
                  var hasJsxFile = ts.forEach(fileNames, function (f) { return ts.ensureScriptKind(f, ts.getScriptKindFromFileName(f)) === 2 /* JSX */; });
                  if (hasJsxFile) {
                      mergeTypings(["react"]);
                  }
              }
              /**
               * Infer typing names from node_module folder
               * @param nodeModulesPath is the path to the "node_modules" folder
               */
              function getTypingNamesFromNodeModuleFolder(nodeModulesPath) {
                  // Todo: add support for ModuleResolutionHost too
                  if (!host.directoryExists(nodeModulesPath)) {
                      return;
                  }
                  var typingNames = [];
                  var fileNames = host.readDirectory(nodeModulesPath, [".json"], /*excludes*/ undefined, /*includes*/ undefined, /*depth*/ 2);
                  for (var _i = 0, fileNames_2 = fileNames; _i < fileNames_2.length; _i++) {
                      var fileName = fileNames_2[_i];
                      var normalizedFileName = ts.normalizePath(fileName);
                      if (ts.getBaseFileName(normalizedFileName) !== "package.json") {
                          continue;
                      }
                      var result = ts.readConfigFile(normalizedFileName, function (path) { return host.readFile(path); });
                      if (!result.config) {
                          continue;
                      }
                      var packageJson = result.config;
                      // npm 3's package.json contains a "_requiredBy" field
                      // we should include all the top level module names for npm 2, and only module names whose
                      // "_requiredBy" field starts with "#" or equals "/" for npm 3.
                      if (packageJson._requiredBy &&
                          ts.filter(packageJson._requiredBy, function (r) { return r[0] === "#" || r === "/"; }).length === 0) {
                          continue;
                      }
                      // If the package has its own d.ts typings, those will take precedence. Otherwise the package name will be used
                      // to download d.ts files from DefinitelyTyped
                      if (!packageJson.name) {
                          continue;
                      }
                      if (packageJson.typings) {
                          var absolutePath = ts.getNormalizedAbsolutePath(packageJson.typings, ts.getDirectoryPath(normalizedFileName));
                          inferredTypings.set(packageJson.name, absolutePath);
                      }
                      else {
                          typingNames.push(packageJson.name);
                      }
                  }
                  mergeTypings(typingNames);
              }
          }
          JsTyping.discoverTypings = discoverTypings;
      })(JsTyping = ts.JsTyping || (ts.JsTyping = {}));
  })(ts || (ts = {}));
  /// <reference path="../compiler/types.ts"/>
  /// <reference path="../compiler/sys.ts"/>
  /// <reference path="../services/jsTyping.ts"/>
  /// <reference path="types.ts" />
  var ts;
  (function (ts) {
      var server;
      (function (server) {
          server.ActionSet = "action::set";
          server.ActionInvalidate = "action::invalidate";
          server.EventBeginInstallTypes = "event::beginInstallTypes";
          server.EventEndInstallTypes = "event::endInstallTypes";
          var Arguments;
          (function (Arguments) {
              Arguments.GlobalCacheLocation = "--globalTypingsCacheLocation";
              Arguments.LogFile = "--logFile";
              Arguments.EnableTelemetry = "--enableTelemetry";
          })(Arguments = server.Arguments || (server.Arguments = {}));
          function hasArgument(argumentName) {
              return ts.sys.args.indexOf(argumentName) >= 0;
          }
          server.hasArgument = hasArgument;
          function findArgument(argumentName) {
              var index = ts.sys.args.indexOf(argumentName);
              return index >= 0 && index < ts.sys.args.length - 1
                  ? ts.sys.args[index + 1]
                  : undefined;
          }
          server.findArgument = findArgument;
      })(server = ts.server || (ts.server = {}));
  })(ts || (ts = {}));
  /// <reference path="core.ts" />
  /// <reference path="diagnosticInformationMap.generated.ts" />
  var ts;
  (function (ts) {
      function trace(host) {
          host.trace(ts.formatMessage.apply(undefined, arguments));
      }
      ts.trace = trace;
      /* @internal */
      function isTraceEnabled(compilerOptions, host) {
          return compilerOptions.traceResolution && host.trace !== undefined;
      }
      ts.isTraceEnabled = isTraceEnabled;
      /**
       * Kinds of file that we are currently looking for.
       * Typically there is one pass with Extensions.TypeScript, then a second pass with Extensions.JavaScript.
       */
      var Extensions;
      (function (Extensions) {
          Extensions[Extensions["TypeScript"] = 0] = "TypeScript";
          Extensions[Extensions["JavaScript"] = 1] = "JavaScript";
          Extensions[Extensions["DtsOnly"] = 2] = "DtsOnly"; /** Only '.d.ts' */
      })(Extensions || (Extensions = {}));
      /** Used with `Extensions.DtsOnly` to extract the path from TypeScript results. */
      function resolvedTypeScriptOnly(resolved) {
          if (!resolved) {
              return undefined;
          }
          ts.Debug.assert(ts.extensionIsTypeScript(resolved.extension));
          return resolved.path;
      }
      /** Adds `isExernalLibraryImport` to a Resolved to get a ResolvedModule. */
      function resolvedModuleFromResolved(_a, isExternalLibraryImport) {
          var path = _a.path, extension = _a.extension;
          return { resolvedFileName: path, extension: extension, isExternalLibraryImport: isExternalLibraryImport };
      }
      function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations) {
          return { resolvedModule: resolved && resolvedModuleFromResolved(resolved, isExternalLibraryImport), failedLookupLocations: failedLookupLocations };
      }
      function moduleHasNonRelativeName(moduleName) {
          return !(ts.isRootedDiskPath(moduleName) || ts.isExternalModuleNameRelative(moduleName));
      }
      ts.moduleHasNonRelativeName = moduleHasNonRelativeName;
      /** Reads from "main" or "types"/"typings" depending on `extensions`. */
      function tryReadPackageJsonFields(readTypes, packageJsonPath, baseDirectory, state) {
          var jsonContent = readJson(packageJsonPath, state.host);
          return readTypes ? tryReadFromField("typings") || tryReadFromField("types") : tryReadFromField("main");
          function tryReadFromField(fieldName) {
              if (!ts.hasProperty(jsonContent, fieldName)) {
                  if (state.traceEnabled) {
                      trace(state.host, ts.Diagnostics.package_json_does_not_have_a_0_field, fieldName);
                  }
                  return;
              }
              var fileName = jsonContent[fieldName];
              if (typeof fileName !== "string") {
                  if (state.traceEnabled) {
                      trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_string_got_1, fieldName, typeof fileName);
                  }
                  return;
              }
              var path = ts.normalizePath(ts.combinePaths(baseDirectory, fileName));
              if (state.traceEnabled) {
                  trace(state.host, ts.Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, fileName, path);
              }
              return path;
          }
      }
      function readJson(path, host) {
          try {
              var jsonText = host.readFile(path);
              return jsonText ? JSON.parse(jsonText) : {};
          }
          catch (e) {
              // gracefully handle if readFile fails or returns not JSON
              return {};
          }
      }
      function getEffectiveTypeRoots(options, host) {
          if (options.typeRoots) {
              return options.typeRoots;
          }
          var currentDirectory;
          if (options.configFilePath) {
              currentDirectory = ts.getDirectoryPath(options.configFilePath);
          }
          else if (host.getCurrentDirectory) {
              currentDirectory = host.getCurrentDirectory();
          }
          if (currentDirectory !== undefined) {
              return getDefaultTypeRoots(currentDirectory, host);
          }
      }
      ts.getEffectiveTypeRoots = getEffectiveTypeRoots;
      /**
       * Returns the path to every node_modules/@types directory from some ancestor directory.
       * Returns undefined if there are none.
       */
      function getDefaultTypeRoots(currentDirectory, host) {
          if (!host.directoryExists) {
              return [ts.combinePaths(currentDirectory, nodeModulesAtTypes)];
              // And if it doesn't exist, tough.
          }
          var typeRoots;
          forEachAncestorDirectory(currentDirectory, function (directory) {
              var atTypes = ts.combinePaths(directory, nodeModulesAtTypes);
              if (host.directoryExists(atTypes)) {
                  (typeRoots || (typeRoots = [])).push(atTypes);
              }
              return undefined;
          });
          return typeRoots;
      }
      var nodeModulesAtTypes = ts.combinePaths("node_modules", "@types");
      /**
       * @param {string | undefined} containingFile - file that contains type reference directive, can be undefined if containing file is unknown.
       * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups
       * is assumed to be the same as root directory of the project.
       */
      function resolveTypeReferenceDirective(typeReferenceDirectiveName, containingFile, options, host) {
          var traceEnabled = isTraceEnabled(options, host);
          var moduleResolutionState = {
              compilerOptions: options,
              host: host,
              traceEnabled: traceEnabled
          };
          var typeRoots = getEffectiveTypeRoots(options, host);
          if (traceEnabled) {
              if (containingFile === undefined) {
                  if (typeRoots === undefined) {
                      trace(host, ts.Diagnostics.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set, typeReferenceDirectiveName);
                  }
                  else {
                      trace(host, ts.Diagnostics.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1, typeReferenceDirectiveName, typeRoots);
                  }
              }
              else {
                  if (typeRoots === undefined) {
                      trace(host, ts.Diagnostics.Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set, typeReferenceDirectiveName, containingFile);
                  }
                  else {
                      trace(host, ts.Diagnostics.Resolving_type_reference_directive_0_containing_file_1_root_directory_2, typeReferenceDirectiveName, containingFile, typeRoots);
                  }
              }
          }
          var failedLookupLocations = [];
          var resolved = primaryLookup();
          var primary = true;
          if (!resolved) {
              resolved = secondaryLookup();
              primary = false;
          }
          var resolvedTypeReferenceDirective;
          if (resolved) {
              resolved = realpath(resolved, host, traceEnabled);
              if (traceEnabled) {
                  trace(host, ts.Diagnostics.Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2, typeReferenceDirectiveName, resolved, primary);
              }
              resolvedTypeReferenceDirective = { primary: primary, resolvedFileName: resolved };
          }
          return { resolvedTypeReferenceDirective: resolvedTypeReferenceDirective, failedLookupLocations: failedLookupLocations };
          function primaryLookup() {
              // Check primary library paths
              if (typeRoots && typeRoots.length) {
                  if (traceEnabled) {
                      trace(host, ts.Diagnostics.Resolving_with_primary_search_path_0, typeRoots.join(", "));
                  }
                  return ts.forEach(typeRoots, function (typeRoot) {
                      var candidate = ts.combinePaths(typeRoot, typeReferenceDirectiveName);
                      var candidateDirectory = ts.getDirectoryPath(candidate);
                      var directoryExists = directoryProbablyExists(candidateDirectory, host);
                      if (!directoryExists && traceEnabled) {
                          trace(host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, candidateDirectory);
                      }
                      return resolvedTypeScriptOnly(loadNodeModuleFromDirectory(Extensions.DtsOnly, candidate, failedLookupLocations, !directoryExists, moduleResolutionState));
                  });
              }
              else {
                  if (traceEnabled) {
                      trace(host, ts.Diagnostics.Root_directory_cannot_be_determined_skipping_primary_search_paths);
                  }
              }
          }
          function secondaryLookup() {
              var resolvedFile;
              var initialLocationForSecondaryLookup = containingFile && ts.getDirectoryPath(containingFile);
              if (initialLocationForSecondaryLookup !== undefined) {
                  // check secondary locations
                  if (traceEnabled) {
                      trace(host, ts.Diagnostics.Looking_up_in_node_modules_folder_initial_location_0, initialLocationForSecondaryLookup);
                  }
                  var result = loadModuleFromNodeModules(Extensions.DtsOnly, typeReferenceDirectiveName, initialLocationForSecondaryLookup, failedLookupLocations, moduleResolutionState, /*cache*/ undefined);
                  resolvedFile = resolvedTypeScriptOnly(result && result.value);
                  if (!resolvedFile && traceEnabled) {
                      trace(host, ts.Diagnostics.Type_reference_directive_0_was_not_resolved, typeReferenceDirectiveName);
                  }
                  return resolvedFile;
              }
              else {
                  if (traceEnabled) {
                      trace(host, ts.Diagnostics.Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder);
                  }
              }
          }
      }
      ts.resolveTypeReferenceDirective = resolveTypeReferenceDirective;
      /**
        * Given a set of options, returns the set of type directive names
        *   that should be included for this program automatically.
        * This list could either come from the config file,
        *   or from enumerating the types root + initial secondary types lookup location.
        * More type directives might appear in the program later as a result of loading actual source files;
        *   this list is only the set of defaults that are implicitly included.
        */
      function getAutomaticTypeDirectiveNames(options, host) {
          // Use explicit type list from tsconfig.json
          if (options.types) {
              return options.types;
          }
          // Walk the primary type lookup locations
          var result = [];
          if (host.directoryExists && host.getDirectories) {
              var typeRoots = getEffectiveTypeRoots(options, host);
              if (typeRoots) {
                  for (var _i = 0, typeRoots_1 = typeRoots; _i < typeRoots_1.length; _i++) {
                      var root = typeRoots_1[_i];
                      if (host.directoryExists(root)) {
                          for (var _a = 0, _b = host.getDirectories(root); _a < _b.length; _a++) {
                              var typeDirectivePath = _b[_a];
                              var normalized = ts.normalizePath(typeDirectivePath);
                              var packageJsonPath = pathToPackageJson(ts.combinePaths(root, normalized));
                              // tslint:disable-next-line:no-null-keyword
                              var isNotNeededPackage = host.fileExists(packageJsonPath) && readJson(packageJsonPath, host).typings === null;
                              if (!isNotNeededPackage) {
                                  // Return just the type directive names
                                  result.push(ts.getBaseFileName(normalized));
                              }
                          }
                      }
                  }
              }
          }
          return result;
      }
      ts.getAutomaticTypeDirectiveNames = getAutomaticTypeDirectiveNames;
      function createModuleResolutionCache(currentDirectory, getCanonicalFileName) {
          var directoryToModuleNameMap = ts.createFileMap();
          var moduleNameToDirectoryMap = ts.createMap();
          return { getOrCreateCacheForDirectory: getOrCreateCacheForDirectory, getOrCreateCacheForModuleName: getOrCreateCacheForModuleName };
          function getOrCreateCacheForDirectory(directoryName) {
              var path = ts.toPath(directoryName, currentDirectory, getCanonicalFileName);
              var perFolderCache = directoryToModuleNameMap.get(path);
              if (!perFolderCache) {
                  perFolderCache = ts.createMap();
                  directoryToModuleNameMap.set(path, perFolderCache);
              }
              return perFolderCache;
          }
          function getOrCreateCacheForModuleName(nonRelativeModuleName) {
              if (!moduleHasNonRelativeName(nonRelativeModuleName)) {
                  return undefined;
              }
              var perModuleNameCache = moduleNameToDirectoryMap.get(nonRelativeModuleName);
              if (!perModuleNameCache) {
                  perModuleNameCache = createPerModuleNameCache();
                  moduleNameToDirectoryMap.set(nonRelativeModuleName, perModuleNameCache);
              }
              return perModuleNameCache;
          }
          function createPerModuleNameCache() {
              var directoryPathMap = ts.createFileMap();
              return { get: get, set: set };
              function get(directory) {
                  return directoryPathMap.get(ts.toPath(directory, currentDirectory, getCanonicalFileName));
              }
              /**
               * At first this function add entry directory -> module resolution result to the table.
               * Then it computes the set of parent folders for 'directory' that should have the same module resolution result
               * and for every parent folder in set it adds entry: parent -> module resolution. .
               * Lets say we first directory name: /a/b/c/d/e and resolution result is: /a/b/bar.ts.
               * Set of parent folders that should have the same result will be:
               * [
               *     /a/b/c/d, /a/b/c, /a/b
               * ]
               * this means that request for module resolution from file in any of these folder will be immediately found in cache.
               */
              function set(directory, result) {
                  var path = ts.toPath(directory, currentDirectory, getCanonicalFileName);
                  // if entry is already in cache do nothing
                  if (directoryPathMap.contains(path)) {
                      return;
                  }
                  directoryPathMap.set(path, result);
                  var resolvedFileName = result.resolvedModule && result.resolvedModule.resolvedFileName;
                  // find common prefix between directory and resolved file name
                  // this common prefix should be the shorted path that has the same resolution
                  // directory: /a/b/c/d/e
                  // resolvedFileName: /a/b/foo.d.ts
                  var commonPrefix = getCommonPrefix(path, resolvedFileName);
                  var current = path;
                  while (true) {
                      var parent = ts.getDirectoryPath(current);
                      if (parent === current || directoryPathMap.contains(parent)) {
                          break;
                      }
                      directoryPathMap.set(parent, result);
                      current = parent;
                      if (current == commonPrefix) {
                          break;
                      }
                  }
              }
              function getCommonPrefix(directory, resolution) {
                  if (resolution === undefined) {
                      return undefined;
                  }
                  var resolutionDirectory = ts.toPath(ts.getDirectoryPath(resolution), currentDirectory, getCanonicalFileName);
                  // find first position where directory and resolution differs
                  var i = 0;
                  while (i < Math.min(directory.length, resolutionDirectory.length) && directory.charCodeAt(i) === resolutionDirectory.charCodeAt(i)) {
                      i++;
                  }
                  // find last directory separator before position i
                  var sep = directory.lastIndexOf(ts.directorySeparator, i);
                  if (sep < 0) {
                      return undefined;
                  }
                  return directory.substr(0, sep);
              }
          }
      }
      ts.createModuleResolutionCache = createModuleResolutionCache;
      function resolveModuleName(moduleName, containingFile, compilerOptions, host, cache) {
          var traceEnabled = isTraceEnabled(compilerOptions, host);
          if (traceEnabled) {
              trace(host, ts.Diagnostics.Resolving_module_0_from_1, moduleName, containingFile);
          }
          var containingDirectory = ts.getDirectoryPath(containingFile);
          var perFolderCache = cache && cache.getOrCreateCacheForDirectory(containingDirectory);
          var result = perFolderCache && perFolderCache.get(moduleName);
          if (result) {
              if (traceEnabled) {
                  trace(host, ts.Diagnostics.Resolution_for_module_0_was_found_in_cache, moduleName);
              }
          }
          else {
              var moduleResolution = compilerOptions.moduleResolution;
              if (moduleResolution === undefined) {
                  moduleResolution = ts.getEmitModuleKind(compilerOptions) === ts.ModuleKind.CommonJS ? ts.ModuleResolutionKind.NodeJs : ts.ModuleResolutionKind.Classic;
                  if (traceEnabled) {
                      trace(host, ts.Diagnostics.Module_resolution_kind_is_not_specified_using_0, ts.ModuleResolutionKind[moduleResolution]);
                  }
              }
              else {
                  if (traceEnabled) {
                      trace(host, ts.Diagnostics.Explicitly_specified_module_resolution_kind_Colon_0, ts.ModuleResolutionKind[moduleResolution]);
                  }
              }
              switch (moduleResolution) {
                  case ts.ModuleResolutionKind.NodeJs:
                      result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache);
                      break;
                  case ts.ModuleResolutionKind.Classic:
                      result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache);
                      break;
              }
              if (perFolderCache) {
                  perFolderCache.set(moduleName, result);
                  // put result in per-module name cache
                  var perModuleNameCache = cache.getOrCreateCacheForModuleName(moduleName);
                  if (perModuleNameCache) {
                      perModuleNameCache.set(containingDirectory, result);
                  }
              }
          }
          if (traceEnabled) {
              if (result.resolvedModule) {
                  trace(host, ts.Diagnostics.Module_name_0_was_successfully_resolved_to_1, moduleName, result.resolvedModule.resolvedFileName);
              }
              else {
                  trace(host, ts.Diagnostics.Module_name_0_was_not_resolved, moduleName);
              }
          }
          return result;
      }
      ts.resolveModuleName = resolveModuleName;
      /**
       * Any module resolution kind can be augmented with optional settings: 'baseUrl', 'paths' and 'rootDirs' - they are used to
       * mitigate differences between design time structure of the project and its runtime counterpart so the same import name
       * can be resolved successfully by TypeScript compiler and runtime module loader.
       * If these settings are set then loading procedure will try to use them to resolve module name and it can of failure it will
       * fallback to standard resolution routine.
       *
       * - baseUrl - this setting controls how non-relative module names are resolved. If this setting is specified then non-relative
       * names will be resolved relative to baseUrl: i.e. if baseUrl is '/a/b' then candidate location to resolve module name 'c/d' will
       * be '/a/b/c/d'
       * - paths - this setting can only be used when baseUrl is specified. allows to tune how non-relative module names
       * will be resolved based on the content of the module name.
       * Structure of 'paths' compiler options
       * 'paths': {
       *    pattern-1: [...substitutions],
       *    pattern-2: [...substitutions],
       *    ...
       *    pattern-n: [...substitutions]
       * }
       * Pattern here is a string that can contain zero or one '*' character. During module resolution module name will be matched against
       * all patterns in the list. Matching for patterns that don't contain '*' means that module name must be equal to pattern respecting the case.
       * If pattern contains '*' then to match pattern "<prefix>*<suffix>" module name must start with the <prefix> and end with <suffix>.
       * <MatchedStar> denotes part of the module name between <prefix> and <suffix>.
       * If module name can be matches with multiple patterns then pattern with the longest prefix will be picked.
       * After selecting pattern we'll use list of substitutions to get candidate locations of the module and the try to load module
       * from the candidate location.
       * Substitution is a string that can contain zero or one '*'. To get candidate location from substitution we'll pick every
       * substitution in the list and replace '*' with <MatchedStar> string. If candidate location is not rooted it
       * will be converted to absolute using baseUrl.
       * For example:
       * baseUrl: /a/b/c
       * "paths": {
       *     // match all module names
       *     "*": [
       *         "*",        // use matched name as is,
       *                     // <matched name> will be looked as /a/b/c/<matched name>
       *
       *         "folder1/*" // substitution will convert matched name to 'folder1/<matched name>',
       *                     // since it is not rooted then final candidate location will be /a/b/c/folder1/<matched name>
       *     ],
       *     // match module names that start with 'components/'
       *     "components/*": [ "/root/components/*" ] // substitution will convert /components/folder1/<matched name> to '/root/components/folder1/<matched name>',
       *                                              // it is rooted so it will be final candidate location
       * }
       *
       * 'rootDirs' allows the project to be spreaded across multiple locations and resolve modules with relative names as if
       * they were in the same location. For example lets say there are two files
       * '/local/src/content/file1.ts'
       * '/shared/components/contracts/src/content/protocols/file2.ts'
       * After bundling content of '/shared/components/contracts/src' will be merged with '/local/src' so
       * if file1 has the following import 'import {x} from "./protocols/file2"' it will be resolved successfully in runtime.
       * 'rootDirs' provides the way to tell compiler that in order to get the whole project it should behave as if content of all
       * root dirs were merged together.
       * I.e. for the example above 'rootDirs' will have two entries: [ '/local/src', '/shared/components/contracts/src' ].
       * Compiler will first convert './protocols/file2' into absolute path relative to the location of containing file:
       * '/local/src/content/protocols/file2' and try to load it - failure.
       * Then it will search 'rootDirs' looking for a longest matching prefix of this absolute path and if such prefix is found - absolute path will
       * be converted to a path relative to found rootDir entry './content/protocols/file2' (*). As a last step compiler will check all remaining
       * entries in 'rootDirs', use them to build absolute path out of (*) and try to resolve module from this location.
       */
      function tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loader, failedLookupLocations, state) {
          if (moduleHasNonRelativeName(moduleName)) {
              return tryLoadModuleUsingBaseUrl(extensions, moduleName, loader, failedLookupLocations, state);
          }
          else {
              return tryLoadModuleUsingRootDirs(extensions, moduleName, containingDirectory, loader, failedLookupLocations, state);
          }
      }
      function tryLoadModuleUsingRootDirs(extensions, moduleName, containingDirectory, loader, failedLookupLocations, state) {
          if (!state.compilerOptions.rootDirs) {
              return undefined;
          }
          if (state.traceEnabled) {
              trace(state.host, ts.Diagnostics.rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0, moduleName);
          }
          var candidate = ts.normalizePath(ts.combinePaths(containingDirectory, moduleName));
          var matchedRootDir;
          var matchedNormalizedPrefix;
          for (var _i = 0, _a = state.compilerOptions.rootDirs; _i < _a.length; _i++) {
              var rootDir = _a[_i];
              // rootDirs are expected to be absolute
              // in case of tsconfig.json this will happen automatically - compiler will expand relative names
              // using location of tsconfig.json as base location
              var normalizedRoot = ts.normalizePath(rootDir);
              if (!ts.endsWith(normalizedRoot, ts.directorySeparator)) {
                  normalizedRoot += ts.directorySeparator;
              }
              var isLongestMatchingPrefix = ts.startsWith(candidate, normalizedRoot) &&
                  (matchedNormalizedPrefix === undefined || matchedNormalizedPrefix.length < normalizedRoot.length);
              if (state.traceEnabled) {
                  trace(state.host, ts.Diagnostics.Checking_if_0_is_the_longest_matching_prefix_for_1_2, normalizedRoot, candidate, isLongestMatchingPrefix);
              }
              if (isLongestMatchingPrefix) {
                  matchedNormalizedPrefix = normalizedRoot;
                  matchedRootDir = rootDir;
              }
          }
          if (matchedNormalizedPrefix) {
              if (state.traceEnabled) {
                  trace(state.host, ts.Diagnostics.Longest_matching_prefix_for_0_is_1, candidate, matchedNormalizedPrefix);
              }
              var suffix = candidate.substr(matchedNormalizedPrefix.length);
              // first - try to load from a initial location
              if (state.traceEnabled) {
                  trace(state.host, ts.Diagnostics.Loading_0_from_the_root_dir_1_candidate_location_2, suffix, matchedNormalizedPrefix, candidate);
              }
              var resolvedFileName = loader(extensions, candidate, failedLookupLocations, !directoryProbablyExists(containingDirectory, state.host), state);
              if (resolvedFileName) {
                  return resolvedFileName;
              }
              if (state.traceEnabled) {
                  trace(state.host, ts.Diagnostics.Trying_other_entries_in_rootDirs);
              }
              // then try to resolve using remaining entries in rootDirs
              for (var _b = 0, _c = state.compilerOptions.rootDirs; _b < _c.length; _b++) {
                  var rootDir = _c[_b];
                  if (rootDir === matchedRootDir) {
                      // skip the initially matched entry
                      continue;
                  }
                  var candidate_1 = ts.combinePaths(ts.normalizePath(rootDir), suffix);
                  if (state.traceEnabled) {
                      trace(state.host, ts.Diagnostics.Loading_0_from_the_root_dir_1_candidate_location_2, suffix, rootDir, candidate_1);
                  }
                  var baseDirectory = ts.getDirectoryPath(candidate_1);
                  var resolvedFileName_1 = loader(extensions, candidate_1, failedLookupLocations, !directoryProbablyExists(baseDirectory, state.host), state);
                  if (resolvedFileName_1) {
                      return resolvedFileName_1;
                  }
              }
              if (state.traceEnabled) {
                  trace(state.host, ts.Diagnostics.Module_resolution_using_rootDirs_has_failed);
              }
          }
          return undefined;
      }
      function tryLoadModuleUsingBaseUrl(extensions, moduleName, loader, failedLookupLocations, state) {
          if (!state.compilerOptions.baseUrl) {
              return undefined;
          }
          if (state.traceEnabled) {
              trace(state.host, ts.Diagnostics.baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1, state.compilerOptions.baseUrl, moduleName);
          }
          // string is for exact match
          var matchedPattern = undefined;
          if (state.compilerOptions.paths) {
              if (state.traceEnabled) {
                  trace(state.host, ts.Diagnostics.paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0, moduleName);
              }
              matchedPattern = ts.matchPatternOrExact(ts.getOwnKeys(state.compilerOptions.paths), moduleName);
          }
          if (matchedPattern) {
              var matchedStar_1 = typeof matchedPattern === "string" ? undefined : ts.matchedText(matchedPattern, moduleName);
              var matchedPatternText = typeof matchedPattern === "string" ? matchedPattern : ts.patternText(matchedPattern);
              if (state.traceEnabled) {
                  trace(state.host, ts.Diagnostics.Module_name_0_matched_pattern_1, moduleName, matchedPatternText);
              }
              return ts.forEach(state.compilerOptions.paths[matchedPatternText], function (subst) {
                  var path = matchedStar_1 ? subst.replace("*", matchedStar_1) : subst;
                  var candidate = ts.normalizePath(ts.combinePaths(state.compilerOptions.baseUrl, path));
                  if (state.traceEnabled) {
                      trace(state.host, ts.Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path);
                  }
                  // A path mapping may have a ".ts" extension; in contrast to an import, which should omit it.
                  var tsExtension = ts.tryGetExtensionFromPath(candidate);
                  if (tsExtension !== undefined) {
                      var path_1 = tryFile(candidate, failedLookupLocations, /*onlyRecordFailures*/ false, state);
                      return path_1 && { path: path_1, extension: tsExtension };
                  }
                  return loader(extensions, candidate, failedLookupLocations, !directoryProbablyExists(ts.getDirectoryPath(candidate), state.host), state);
              });
          }
          else {
              var candidate = ts.normalizePath(ts.combinePaths(state.compilerOptions.baseUrl, moduleName));
              if (state.traceEnabled) {
                  trace(state.host, ts.Diagnostics.Resolving_module_name_0_relative_to_base_url_1_2, moduleName, state.compilerOptions.baseUrl, candidate);
              }
              return loader(extensions, candidate, failedLookupLocations, !directoryProbablyExists(ts.getDirectoryPath(candidate), state.host), state);
          }
      }
      function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache) {
          return nodeModuleNameResolverWorker(moduleName, containingFile, compilerOptions, host, cache, /* jsOnly*/ false);
      }
      ts.nodeModuleNameResolver = nodeModuleNameResolver;
      /* @internal */
      function nodeModuleNameResolverWorker(moduleName, containingFile, compilerOptions, host, cache, jsOnly) {
          if (jsOnly === void 0) { jsOnly = false; }
          var containingDirectory = ts.getDirectoryPath(containingFile);
          var traceEnabled = isTraceEnabled(compilerOptions, host);
          var failedLookupLocations = [];
          var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled };
          var result = jsOnly ? tryResolve(Extensions.JavaScript) : (tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript));
          if (result && result.value) {
              var _a = result.value, resolved = _a.resolved, isExternalLibraryImport = _a.isExternalLibraryImport;
              return createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations);
          }
          return { resolvedModule: undefined, failedLookupLocations: failedLookupLocations };
          function tryResolve(extensions) {
              var loader = function (extensions, candidate, failedLookupLocations, onlyRecordFailures, state) { return nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, onlyRecordFailures, state, /*considerPackageJson*/ true); };
              var resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loader, failedLookupLocations, state);
              if (resolved) {
                  return toSearchResult({ resolved: resolved, isExternalLibraryImport: false });
              }
              if (moduleHasNonRelativeName(moduleName)) {
                  if (traceEnabled) {
                      trace(host, ts.Diagnostics.Loading_module_0_from_node_modules_folder_target_file_type_1, moduleName, Extensions[extensions]);
                  }
                  var resolved_1 = loadModuleFromNodeModules(extensions, moduleName, containingDirectory, failedLookupLocations, state, cache);
                  // For node_modules lookups, get the real path so that multiple accesses to an `npm link`-ed module do not create duplicate files.
                  return resolved_1 && { value: resolved_1.value && { resolved: { path: realpath(resolved_1.value.path, host, traceEnabled), extension: resolved_1.value.extension }, isExternalLibraryImport: true } };
              }
              else {
                  var candidate = ts.normalizePath(ts.combinePaths(containingDirectory, moduleName));
                  var resolved_2 = nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, /*onlyRecordFailures*/ false, state, /*considerPackageJson*/ true);
                  return resolved_2 && toSearchResult({ resolved: resolved_2, isExternalLibraryImport: false });
              }
          }
      }
      ts.nodeModuleNameResolverWorker = nodeModuleNameResolverWorker;
      function realpath(path, host, traceEnabled) {
          if (!host.realpath) {
              return path;
          }
          var real = ts.normalizePath(host.realpath(path));
          if (traceEnabled) {
              trace(host, ts.Diagnostics.Resolving_real_path_for_0_result_1, path, real);
          }
          return real;
      }
      function nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, onlyRecordFailures, state, considerPackageJson) {
          if (state.traceEnabled) {
              trace(state.host, ts.Diagnostics.Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1, candidate, Extensions[extensions]);
          }
          if (!ts.pathEndsWithDirectorySeparator(candidate)) {
              if (!onlyRecordFailures) {
                  var parentOfCandidate = ts.getDirectoryPath(candidate);
                  if (!directoryProbablyExists(parentOfCandidate, state.host)) {
                      if (state.traceEnabled) {
                          trace(state.host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, parentOfCandidate);
                      }
                      onlyRecordFailures = true;
                  }
              }
              var resolvedFromFile = loadModuleFromFile(extensions, candidate, failedLookupLocations, onlyRecordFailures, state);
              if (resolvedFromFile) {
                  return resolvedFromFile;
              }
          }
          if (!onlyRecordFailures) {
              var candidateExists = directoryProbablyExists(candidate, state.host);
              if (!candidateExists) {
                  if (state.traceEnabled) {
                      trace(state.host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, candidate);
                  }
                  onlyRecordFailures = true;
              }
          }
          return loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, onlyRecordFailures, state, considerPackageJson);
      }
      /* @internal */
      function directoryProbablyExists(directoryName, host) {
          // if host does not support 'directoryExists' assume that directory will exist
          return !host.directoryExists || host.directoryExists(directoryName);
      }
      ts.directoryProbablyExists = directoryProbablyExists;
      /**
       * @param {boolean} onlyRecordFailures - if true then function won't try to actually load files but instead record all attempts as failures. This flag is necessary
       * in cases when we know upfront that all load attempts will fail (because containing folder does not exists) however we still need to record all failed lookup locations.
       */
      function loadModuleFromFile(extensions, candidate, failedLookupLocations, onlyRecordFailures, state) {
          // First, try adding an extension. An import of "foo" could be matched by a file "foo.ts", or "foo.js" by "foo.js.ts"
          var resolvedByAddingExtension = tryAddingExtensions(candidate, extensions, failedLookupLocations, onlyRecordFailures, state);
          if (resolvedByAddingExtension) {
              return resolvedByAddingExtension;
          }
          // If that didn't work, try stripping a ".js" or ".jsx" extension and replacing it with a TypeScript one;
          // e.g. "./foo.js" can be matched by "./foo.ts" or "./foo.d.ts"
          if (ts.hasJavaScriptFileExtension(candidate)) {
              var extensionless = ts.removeFileExtension(candidate);
              if (state.traceEnabled) {
                  var extension = candidate.substring(extensionless.length);
                  trace(state.host, ts.Diagnostics.File_name_0_has_a_1_extension_stripping_it, candidate, extension);
              }
              return tryAddingExtensions(extensionless, extensions, failedLookupLocations, onlyRecordFailures, state);
          }
      }
      /** Try to return an existing file that adds one of the `extensions` to `candidate`. */
      function tryAddingExtensions(candidate, extensions, failedLookupLocations, onlyRecordFailures, state) {
          if (!onlyRecordFailures) {
              // check if containing folder exists - if it doesn't then just record failures for all supported extensions without disk probing
              var directory = ts.getDirectoryPath(candidate);
              if (directory) {
                  onlyRecordFailures = !directoryProbablyExists(directory, state.host);
              }
          }
          switch (extensions) {
              case Extensions.DtsOnly:
                  return tryExtension(".d.ts", ts.Extension.Dts);
              case Extensions.TypeScript:
                  return tryExtension(".ts", ts.Extension.Ts) || tryExtension(".tsx", ts.Extension.Tsx) || tryExtension(".d.ts", ts.Extension.Dts);
              case Extensions.JavaScript:
                  return tryExtension(".js", ts.Extension.Js) || tryExtension(".jsx", ts.Extension.Jsx);
          }
          function tryExtension(ext, extension) {
              var path = tryFile(candidate + ext, failedLookupLocations, onlyRecordFailures, state);
              return path && { path: path, extension: extension };
          }
      }
      /** Return the file if it exists. */
      function tryFile(fileName, failedLookupLocations, onlyRecordFailures, state) {
          if (!onlyRecordFailures) {
              if (state.host.fileExists(fileName)) {
                  if (state.traceEnabled) {
                      trace(state.host, ts.Diagnostics.File_0_exist_use_it_as_a_name_resolution_result, fileName);
                  }
                  return fileName;
              }
              else {
                  if (state.traceEnabled) {
                      trace(state.host, ts.Diagnostics.File_0_does_not_exist, fileName);
                  }
              }
          }
          failedLookupLocations.push(fileName);
          return undefined;
      }
      function loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, onlyRecordFailures, state, considerPackageJson) {
          if (considerPackageJson === void 0) { considerPackageJson = true; }
          var directoryExists = !onlyRecordFailures && directoryProbablyExists(candidate, state.host);
          if (considerPackageJson) {
              var packageJsonPath = pathToPackageJson(candidate);
              if (directoryExists && state.host.fileExists(packageJsonPath)) {
                  var fromPackageJson = loadModuleFromPackageJson(packageJsonPath, extensions, candidate, failedLookupLocations, state);
                  if (fromPackageJson) {
                      return fromPackageJson;
                  }
              }
              else {
                  if (directoryExists && state.traceEnabled) {
                      trace(state.host, ts.Diagnostics.File_0_does_not_exist, packageJsonPath);
                  }
                  // record package json as one of failed lookup locations - in the future if this file will appear it will invalidate resolution results
                  failedLookupLocations.push(packageJsonPath);
              }
          }
          return loadModuleFromFile(extensions, ts.combinePaths(candidate, "index"), failedLookupLocations, !directoryExists, state);
      }
      function loadModuleFromPackageJson(packageJsonPath, extensions, candidate, failedLookupLocations, state) {
          if (state.traceEnabled) {
              trace(state.host, ts.Diagnostics.Found_package_json_at_0, packageJsonPath);
          }
          var file = tryReadPackageJsonFields(extensions !== Extensions.JavaScript, packageJsonPath, candidate, state);
          if (!file) {
              return undefined;
          }
          var onlyRecordFailures = !directoryProbablyExists(ts.getDirectoryPath(file), state.host);
          var fromFile = tryFile(file, failedLookupLocations, onlyRecordFailures, state);
          if (fromFile) {
              var resolved = fromFile && resolvedIfExtensionMatches(extensions, fromFile);
              if (resolved) {
                  return resolved;
              }
              if (state.traceEnabled) {
                  trace(state.host, ts.Diagnostics.File_0_has_an_unsupported_extension_so_skipping_it, fromFile);
              }
          }
          // Even if extensions is DtsOnly, we can still look up a .ts file as a result of package.json "types"
          var nextExtensions = extensions === Extensions.DtsOnly ? Extensions.TypeScript : extensions;
          // Don't do package.json lookup recursively, because Node.js' package lookup doesn't.
          return nodeLoadModuleByRelativeName(nextExtensions, file, failedLookupLocations, onlyRecordFailures, state, /*considerPackageJson*/ false);
      }
      /** Resolve from an arbitrarily specified file. Return `undefined` if it has an unsupported extension. */
      function resolvedIfExtensionMatches(extensions, path) {
          var extension = ts.tryGetExtensionFromPath(path);
          return extension !== undefined && extensionIsOk(extensions, extension) ? { path: path, extension: extension } : undefined;
      }
      /** True if `extension` is one of the supported `extensions`. */
      function extensionIsOk(extensions, extension) {
          switch (extensions) {
              case Extensions.JavaScript:
                  return extension === ts.Extension.Js || extension === ts.Extension.Jsx;
              case Extensions.TypeScript:
                  return extension === ts.Extension.Ts || extension === ts.Extension.Tsx || extension === ts.Extension.Dts;
              case Extensions.DtsOnly:
                  return extension === ts.Extension.Dts;
          }
      }
      function pathToPackageJson(directory) {
          return ts.combinePaths(directory, "package.json");
      }
      function loadModuleFromNodeModulesFolder(extensions, moduleName, nodeModulesFolder, nodeModulesFolderExists, failedLookupLocations, state) {
          var candidate = ts.normalizePath(ts.combinePaths(nodeModulesFolder, moduleName));
          return loadModuleFromFile(extensions, candidate, failedLookupLocations, !nodeModulesFolderExists, state) ||
              loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, !nodeModulesFolderExists, state);
      }
      function loadModuleFromNodeModules(extensions, moduleName, directory, failedLookupLocations, state, cache) {
          return loadModuleFromNodeModulesWorker(extensions, moduleName, directory, failedLookupLocations, state, /*typesOnly*/ false, cache);
      }
      function loadModuleFromNodeModulesAtTypes(moduleName, directory, failedLookupLocations, state) {
          // Extensions parameter here doesn't actually matter, because typesOnly ensures we're just doing @types lookup, which is always DtsOnly.
          return loadModuleFromNodeModulesWorker(Extensions.DtsOnly, moduleName, directory, failedLookupLocations, state, /*typesOnly*/ true, /*cache*/ undefined);
      }
      function loadModuleFromNodeModulesWorker(extensions, moduleName, directory, failedLookupLocations, state, typesOnly, cache) {
          var perModuleNameCache = cache && cache.getOrCreateCacheForModuleName(moduleName);
          return forEachAncestorDirectory(ts.normalizeSlashes(directory), function (ancestorDirectory) {
              if (ts.getBaseFileName(ancestorDirectory) !== "node_modules") {
                  var resolutionFromCache = tryFindNonRelativeModuleNameInCache(perModuleNameCache, moduleName, ancestorDirectory, state.traceEnabled, state.host);
                  if (resolutionFromCache) {
                      return resolutionFromCache;
                  }
                  return toSearchResult(loadModuleFromNodeModulesOneLevel(extensions, moduleName, ancestorDirectory, failedLookupLocations, state, typesOnly));
              }
          });
      }
      /** Load a module from a single node_modules directory, but not from any ancestors' node_modules directories. */
      function loadModuleFromNodeModulesOneLevel(extensions, moduleName, directory, failedLookupLocations, state, typesOnly) {
          if (typesOnly === void 0) { typesOnly = false; }
          var nodeModulesFolder = ts.combinePaths(directory, "node_modules");
          var nodeModulesFolderExists = directoryProbablyExists(nodeModulesFolder, state.host);
          if (!nodeModulesFolderExists && state.traceEnabled) {
              trace(state.host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, nodeModulesFolder);
          }
          var packageResult = typesOnly ? undefined : loadModuleFromNodeModulesFolder(extensions, moduleName, nodeModulesFolder, nodeModulesFolderExists, failedLookupLocations, state);
          if (packageResult) {
              return packageResult;
          }
          if (extensions !== Extensions.JavaScript) {
              var nodeModulesAtTypes_1 = ts.combinePaths(nodeModulesFolder, "@types");
              var nodeModulesAtTypesExists = nodeModulesFolderExists;
              if (nodeModulesFolderExists && !directoryProbablyExists(nodeModulesAtTypes_1, state.host)) {
                  if (state.traceEnabled) {
                      trace(state.host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, nodeModulesAtTypes_1);
                  }
                  nodeModulesAtTypesExists = false;
              }
              return loadModuleFromNodeModulesFolder(Extensions.DtsOnly, moduleName, nodeModulesAtTypes_1, nodeModulesAtTypesExists, failedLookupLocations, state);
          }
      }
      function tryFindNonRelativeModuleNameInCache(cache, moduleName, containingDirectory, traceEnabled, host) {
          var result = cache && cache.get(containingDirectory);
          if (result) {
              if (traceEnabled) {
                  trace(host, ts.Diagnostics.Resolution_for_module_0_was_found_in_cache, moduleName);
              }
              return { value: result.resolvedModule && { path: result.resolvedModule.resolvedFileName, extension: result.resolvedModule.extension } };
          }
      }
      function classicNameResolver(moduleName, containingFile, compilerOptions, host, cache) {
          var traceEnabled = isTraceEnabled(compilerOptions, host);
          var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled };
          var failedLookupLocations = [];
          var containingDirectory = ts.getDirectoryPath(containingFile);
          var resolved = tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript);
          return createResolvedModuleWithFailedLookupLocations(resolved && resolved.value, /*isExternalLibraryImport*/ false, failedLookupLocations);
          function tryResolve(extensions) {
              var resolvedUsingSettings = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loadModuleFromFile, failedLookupLocations, state);
              if (resolvedUsingSettings) {
                  return { value: resolvedUsingSettings };
              }
              var perModuleNameCache = cache && cache.getOrCreateCacheForModuleName(moduleName);
              if (moduleHasNonRelativeName(moduleName)) {
                  // Climb up parent directories looking for a module.
                  var resolved_3 = forEachAncestorDirectory(containingDirectory, function (directory) {
                      var resolutionFromCache = tryFindNonRelativeModuleNameInCache(perModuleNameCache, moduleName, directory, traceEnabled, host);
                      if (resolutionFromCache) {
                          return resolutionFromCache;
                      }
                      var searchName = ts.normalizePath(ts.combinePaths(directory, moduleName));
                      return toSearchResult(loadModuleFromFile(extensions, searchName, failedLookupLocations, /*onlyRecordFailures*/ false, state));
                  });
                  if (resolved_3) {
                      return resolved_3;
                  }
                  if (extensions === Extensions.TypeScript) {
                      // If we didn't find the file normally, look it up in @types.
                      return loadModuleFromNodeModulesAtTypes(moduleName, containingDirectory, failedLookupLocations, state);
                  }
              }
              else {
                  var candidate = ts.normalizePath(ts.combinePaths(containingDirectory, moduleName));
                  return toSearchResult(loadModuleFromFile(extensions, candidate, failedLookupLocations, /*onlyRecordFailures*/ false, state));
              }
          }
      }
      ts.classicNameResolver = classicNameResolver;
      /**
       * LSHost may load a module from a global cache of typings.
       * This is the minumum code needed to expose that functionality; the rest is in LSHost.
       */
      /* @internal */
      function loadModuleFromGlobalCache(moduleName, projectName, compilerOptions, host, globalCache) {
          var traceEnabled = isTraceEnabled(compilerOptions, host);
          if (traceEnabled) {
              trace(host, ts.Diagnostics.Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2, projectName, moduleName, globalCache);
          }
          var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled };
          var failedLookupLocations = [];
          var resolved = loadModuleFromNodeModulesOneLevel(Extensions.DtsOnly, moduleName, globalCache, failedLookupLocations, state);
          return createResolvedModuleWithFailedLookupLocations(resolved, /*isExternalLibraryImport*/ true, failedLookupLocations);
      }
      ts.loadModuleFromGlobalCache = loadModuleFromGlobalCache;
      /**
       * Wraps value to SearchResult.
       * @returns undefined if value is undefined or { value } otherwise
       */
      function toSearchResult(value) {
          return value !== undefined ? { value: value } : undefined;
      }
      /** Calls `callback` on `directory` and every ancestor directory it has, returning the first defined result. */
      function forEachAncestorDirectory(directory, callback) {
          while (true) {
              var result = callback(directory);
              if (result !== undefined) {
                  return result;
              }
              var parentPath = ts.getDirectoryPath(directory);
              if (parentPath === directory) {
                  return undefined;
              }
              directory = parentPath;
          }
      }
  })(ts || (ts = {}));
  /// <reference path="../../compiler/core.ts" />
  /// <reference path="../../compiler/moduleNameResolver.ts" />
  /// <reference path="../../services/jsTyping.ts"/>
  /// <reference path="../types.ts"/>
  /// <reference path="../shared.ts"/>
  var ts;
  (function (ts) {
      var server;
      (function (server) {
          var typingsInstaller;
          (function (typingsInstaller) {
              var nullLog = {
                  isEnabled: function () { return false; },
                  writeLine: ts.noop
              };
              function typingToFileName(cachePath, packageName, installTypingHost, log) {
                  try {
                      var result = ts.resolveModuleName(packageName, ts.combinePaths(cachePath, "index.d.ts"), { moduleResolution: ts.ModuleResolutionKind.NodeJs }, installTypingHost);
                      return result.resolvedModule && result.resolvedModule.resolvedFileName;
                  }
                  catch (e) {
                      if (log.isEnabled()) {
                          log.writeLine("Failed to resolve " + packageName + " in folder '" + cachePath + "': " + e.message);
                      }
                      return undefined;
                  }
              }
              var PackageNameValidationResult;
              (function (PackageNameValidationResult) {
                  PackageNameValidationResult[PackageNameValidationResult["Ok"] = 0] = "Ok";
                  PackageNameValidationResult[PackageNameValidationResult["ScopedPackagesNotSupported"] = 1] = "ScopedPackagesNotSupported";
                  PackageNameValidationResult[PackageNameValidationResult["EmptyName"] = 2] = "EmptyName";
                  PackageNameValidationResult[PackageNameValidationResult["NameTooLong"] = 3] = "NameTooLong";
                  PackageNameValidationResult[PackageNameValidationResult["NameStartsWithDot"] = 4] = "NameStartsWithDot";
                  PackageNameValidationResult[PackageNameValidationResult["NameStartsWithUnderscore"] = 5] = "NameStartsWithUnderscore";
                  PackageNameValidationResult[PackageNameValidationResult["NameContainsNonURISafeCharacters"] = 6] = "NameContainsNonURISafeCharacters";
              })(PackageNameValidationResult = typingsInstaller.PackageNameValidationResult || (typingsInstaller.PackageNameValidationResult = {}));
              typingsInstaller.MaxPackageNameLength = 214;
              /**
               * Validates package name using rules defined at https://docs.npmjs.com/files/package.json
               */
              function validatePackageName(packageName) {
                  if (!packageName) {
                      return PackageNameValidationResult.EmptyName;
                  }
                  if (packageName.length > typingsInstaller.MaxPackageNameLength) {
                      return PackageNameValidationResult.NameTooLong;
                  }
                  if (packageName.charCodeAt(0) === 46 /* dot */) {
                      return PackageNameValidationResult.NameStartsWithDot;
                  }
                  if (packageName.charCodeAt(0) === 95 /* _ */) {
                      return PackageNameValidationResult.NameStartsWithUnderscore;
                  }
                  // check if name is scope package like: starts with @ and has one '/' in the middle
                  // scoped packages are not currently supported
                  // TODO: when support will be added we'll need to split and check both scope and package name
                  if (/^@[^/]+\/[^/]+$/.test(packageName)) {
                      return PackageNameValidationResult.ScopedPackagesNotSupported;
                  }
                  if (encodeURIComponent(packageName) !== packageName) {
                      return PackageNameValidationResult.NameContainsNonURISafeCharacters;
                  }
                  return PackageNameValidationResult.Ok;
              }
              typingsInstaller.validatePackageName = validatePackageName;
              var TypingsInstaller = (function () {
                  function TypingsInstaller(installTypingHost, globalCachePath, safeListPath, throttleLimit, log) {
                      if (log === void 0) { log = nullLog; }
                      this.installTypingHost = installTypingHost;
                      this.globalCachePath = globalCachePath;
                      this.safeListPath = safeListPath;
                      this.throttleLimit = throttleLimit;
                      this.log = log;
                      this.packageNameToTypingLocation = ts.createMap();
                      this.missingTypingsSet = ts.createMap();
                      this.knownCachesSet = ts.createMap();
                      this.projectWatchers = ts.createMap();
                      this.pendingRunRequests = [];
                      this.installRunCount = 1;
                      this.inFlightRequestCount = 0;
                      if (this.log.isEnabled()) {
                          this.log.writeLine("Global cache location '" + globalCachePath + "', safe file path '" + safeListPath + "'");
                      }
                      this.processCacheLocation(this.globalCachePath);
                  }
                  TypingsInstaller.prototype.closeProject = function (req) {
                      this.closeWatchers(req.projectName);
                  };
                  TypingsInstaller.prototype.closeWatchers = function (projectName) {
                      if (this.log.isEnabled()) {
                          this.log.writeLine("Closing file watchers for project '" + projectName + "'");
                      }
                      var watchers = this.projectWatchers.get(projectName);
                      if (!watchers) {
                          if (this.log.isEnabled()) {
                              this.log.writeLine("No watchers are registered for project '" + projectName + "'");
                          }
                          return;
                      }
                      for (var _i = 0, watchers_1 = watchers; _i < watchers_1.length; _i++) {
                          var w = watchers_1[_i];
                          w.close();
                      }
                      this.projectWatchers.delete(projectName);
                      if (this.log.isEnabled()) {
                          this.log.writeLine("Closing file watchers for project '" + projectName + "' - done.");
                      }
                  };
                  TypingsInstaller.prototype.install = function (req) {
                      if (this.log.isEnabled()) {
                          this.log.writeLine("Got install request " + JSON.stringify(req));
                      }
                      // load existing typing information from the cache
                      if (req.cachePath) {
                          if (this.log.isEnabled()) {
                              this.log.writeLine("Request specifies cache path '" + req.cachePath + "', loading cached information...");
                          }
                          this.processCacheLocation(req.cachePath);
                      }
                      var discoverTypingsResult = ts.JsTyping.discoverTypings(this.installTypingHost, req.fileNames, req.projectRootPath, this.safeListPath, this.packageNameToTypingLocation, req.typeAcquisition, req.unresolvedImports);
                      if (this.log.isEnabled()) {
                          this.log.writeLine("Finished typings discovery: " + JSON.stringify(discoverTypingsResult));
                      }
                      // respond with whatever cached typings we have now
                      this.sendResponse(this.createSetTypings(req, discoverTypingsResult.cachedTypingPaths));
                      // start watching files
                      this.watchFiles(req.projectName, discoverTypingsResult.filesToWatch);
                      // install typings
                      if (discoverTypingsResult.newTypingNames.length) {
                          this.installTypings(req, req.cachePath || this.globalCachePath, discoverTypingsResult.cachedTypingPaths, discoverTypingsResult.newTypingNames);
                      }
                      else {
                          if (this.log.isEnabled()) {
                              this.log.writeLine("No new typings were requested as a result of typings discovery");
                          }
                      }
                  };
                  TypingsInstaller.prototype.processCacheLocation = function (cacheLocation) {
                      if (this.log.isEnabled()) {
                          this.log.writeLine("Processing cache location '" + cacheLocation + "'");
                      }
                      if (this.knownCachesSet.get(cacheLocation)) {
                          if (this.log.isEnabled()) {
                              this.log.writeLine("Cache location was already processed...");
                          }
                          return;
                      }
                      var packageJson = ts.combinePaths(cacheLocation, "package.json");
                      if (this.log.isEnabled()) {
                          this.log.writeLine("Trying to find '" + packageJson + "'...");
                      }
                      if (this.installTypingHost.fileExists(packageJson)) {
                          var npmConfig = JSON.parse(this.installTypingHost.readFile(packageJson));
                          if (this.log.isEnabled()) {
                              this.log.writeLine("Loaded content of '" + packageJson + "': " + JSON.stringify(npmConfig));
                          }
                          if (npmConfig.devDependencies) {
                              for (var key in npmConfig.devDependencies) {
                                  // key is @types/<package name>
                                  var packageName = ts.getBaseFileName(key);
                                  if (!packageName) {
                                      continue;
                                  }
                                  var typingFile = typingToFileName(cacheLocation, packageName, this.installTypingHost, this.log);
                                  if (!typingFile) {
                                      this.missingTypingsSet.set(packageName, true);
                                      continue;
                                  }
                                  var existingTypingFile = this.packageNameToTypingLocation.get(packageName);
                                  if (existingTypingFile === typingFile) {
                                      continue;
                                  }
                                  if (existingTypingFile) {
                                      if (this.log.isEnabled()) {
                                          this.log.writeLine("New typing for package " + packageName + " from '" + typingFile + "' conflicts with existing typing file '" + existingTypingFile + "'");
                                      }
                                  }
                                  if (this.log.isEnabled()) {
                                      this.log.writeLine("Adding entry into typings cache: '" + packageName + "' => '" + typingFile + "'");
                                  }
                                  this.packageNameToTypingLocation.set(packageName, typingFile);
                              }
                          }
                      }
                      if (this.log.isEnabled()) {
                          this.log.writeLine("Finished processing cache location '" + cacheLocation + "'");
                      }
                      this.knownCachesSet.set(cacheLocation, true);
                  };
                  TypingsInstaller.prototype.filterTypings = function (typingsToInstall) {
                      if (typingsToInstall.length === 0) {
                          return typingsToInstall;
                      }
                      var result = [];
                      for (var _i = 0, typingsToInstall_1 = typingsToInstall; _i < typingsToInstall_1.length; _i++) {
                          var typing = typingsToInstall_1[_i];
                          if (this.missingTypingsSet.get(typing) || this.packageNameToTypingLocation.get(typing)) {
                              continue;
                          }
                          var validationResult = validatePackageName(typing);
                          if (validationResult === PackageNameValidationResult.Ok) {
                              if (this.typesRegistry.has(typing)) {
                                  result.push(typing);
                              }
                              else {
                                  if (this.log.isEnabled()) {
                                      this.log.writeLine("Entry for package '" + typing + "' does not exist in local types registry - skipping...");
                                  }
                              }
                          }
                          else {
                              // add typing name to missing set so we won't process it again
                              this.missingTypingsSet.set(typing, true);
                              if (this.log.isEnabled()) {
                                  switch (validationResult) {
                                      case PackageNameValidationResult.EmptyName:
                                          this.log.writeLine("Package name '" + typing + "' cannot be empty");
                                          break;
                                      case PackageNameValidationResult.NameTooLong:
                                          this.log.writeLine("Package name '" + typing + "' should be less than " + typingsInstaller.MaxPackageNameLength + " characters");
                                          break;
                                      case PackageNameValidationResult.NameStartsWithDot:
                                          this.log.writeLine("Package name '" + typing + "' cannot start with '.'");
                                          break;
                                      case PackageNameValidationResult.NameStartsWithUnderscore:
                                          this.log.writeLine("Package name '" + typing + "' cannot start with '_'");
                                          break;
                                      case PackageNameValidationResult.ScopedPackagesNotSupported:
                                          this.log.writeLine("Package '" + typing + "' is scoped and currently is not supported");
                                          break;
                                      case PackageNameValidationResult.NameContainsNonURISafeCharacters:
                                          this.log.writeLine("Package name '" + typing + "' contains non URI safe characters");
                                          break;
                                  }
                              }
                          }
                      }
                      return result;
                  };
                  TypingsInstaller.prototype.ensurePackageDirectoryExists = function (directory) {
                      var npmConfigPath = ts.combinePaths(directory, "package.json");
                      if (this.log.isEnabled()) {
                          this.log.writeLine("Npm config file: " + npmConfigPath);
                      }
                      if (!this.installTypingHost.fileExists(npmConfigPath)) {
                          if (this.log.isEnabled()) {
                              this.log.writeLine("Npm config file: '" + npmConfigPath + "' is missing, creating new one...");
                          }
                          this.ensureDirectoryExists(directory, this.installTypingHost);
                          this.installTypingHost.writeFile(npmConfigPath, "{}");
                      }
                  };
                  TypingsInstaller.prototype.installTypings = function (req, cachePath, currentlyCachedTypings, typingsToInstall) {
                      var _this = this;
                      if (this.log.isEnabled()) {
                          this.log.writeLine("Installing typings " + JSON.stringify(typingsToInstall));
                      }
                      var filteredTypings = this.filterTypings(typingsToInstall);
                      if (filteredTypings.length === 0) {
                          if (this.log.isEnabled()) {
                              this.log.writeLine("All typings are known to be missing or invalid - no need to go any further");
                          }
                          return;
                      }
                      this.ensurePackageDirectoryExists(cachePath);
                      var requestId = this.installRunCount;
                      this.installRunCount++;
                      // send progress event
                      this.sendResponse({
                          kind: server.EventBeginInstallTypes,
                          eventId: requestId,
                          typingsInstallerVersion: ts.version,
                          projectName: req.projectName
                      });
                      var scopedTypings = filteredTypings.map(typingsName);
                      this.installTypingsAsync(requestId, scopedTypings, cachePath, function (ok) {
                          try {
                              if (!ok) {
                                  if (_this.log.isEnabled()) {
                                      _this.log.writeLine("install request failed, marking packages as missing to prevent repeated requests: " + JSON.stringify(filteredTypings));
                                  }
                                  for (var _i = 0, filteredTypings_1 = filteredTypings; _i < filteredTypings_1.length; _i++) {
                                      var typing = filteredTypings_1[_i];
                                      _this.missingTypingsSet.set(typing, true);
                                  }
                                  return;
                              }
                              // TODO: watch project directory
                              if (_this.log.isEnabled()) {
                                  _this.log.writeLine("Installed typings " + JSON.stringify(scopedTypings));
                              }
                              var installedTypingFiles = [];
                              for (var _a = 0, filteredTypings_2 = filteredTypings; _a < filteredTypings_2.length; _a++) {
                                  var packageName = filteredTypings_2[_a];
                                  var typingFile = typingToFileName(cachePath, packageName, _this.installTypingHost, _this.log);
                                  if (!typingFile) {
                                      _this.missingTypingsSet.set(packageName, true);
                                      continue;
                                  }
                                  if (!_this.packageNameToTypingLocation.has(packageName)) {
                                      _this.packageNameToTypingLocation.set(packageName, typingFile);
                                  }
                                  installedTypingFiles.push(typingFile);
                              }
                              if (_this.log.isEnabled()) {
                                  _this.log.writeLine("Installed typing files " + JSON.stringify(installedTypingFiles));
                              }
                              _this.sendResponse(_this.createSetTypings(req, currentlyCachedTypings.concat(installedTypingFiles)));
                          }
                          finally {
                              _this.sendResponse({
                                  kind: server.EventEndInstallTypes,
                                  eventId: requestId,
                                  projectName: req.projectName,
                                  packagesToInstall: scopedTypings,
                                  installSuccess: ok,
                                  typingsInstallerVersion: ts.version // qualified explicitly to prevent occasional shadowing
                              });
                          }
                      });
                  };
                  TypingsInstaller.prototype.ensureDirectoryExists = function (directory, host) {
                      var directoryName = ts.getDirectoryPath(directory);
                      if (!host.directoryExists(directoryName)) {
                          this.ensureDirectoryExists(directoryName, host);
                      }
                      if (!host.directoryExists(directory)) {
                          host.createDirectory(directory);
                      }
                  };
                  TypingsInstaller.prototype.watchFiles = function (projectName, files) {
                      var _this = this;
                      if (!files.length) {
                          return;
                      }
                      // shut down existing watchers
                      this.closeWatchers(projectName);
                      // handler should be invoked once for the entire set of files since it will trigger full rediscovery of typings
                      var isInvoked = false;
                      var watchers = [];
                      for (var _i = 0, files_2 = files; _i < files_2.length; _i++) {
                          var file = files_2[_i];
                          var w = this.installTypingHost.watchFile(file, function (f) {
                              if (_this.log.isEnabled()) {
                                  _this.log.writeLine("Got FS notification for " + f + ", handler is already invoked '" + isInvoked + "'");
                              }
                              if (!isInvoked) {
                                  _this.sendResponse({ projectName: projectName, kind: server.ActionInvalidate });
                                  isInvoked = true;
                              }
                          }, /*pollingInterval*/ 2000);
                          watchers.push(w);
                      }
                      this.projectWatchers.set(projectName, watchers);
                  };
                  TypingsInstaller.prototype.createSetTypings = function (request, typings) {
                      return {
                          projectName: request.projectName,
                          typeAcquisition: request.typeAcquisition,
                          compilerOptions: request.compilerOptions,
                          typings: typings,
                          unresolvedImports: request.unresolvedImports,
                          kind: server.ActionSet
                      };
                  };
                  TypingsInstaller.prototype.installTypingsAsync = function (requestId, args, cwd, onRequestCompleted) {
                      this.pendingRunRequests.unshift({ requestId: requestId, args: args, cwd: cwd, onRequestCompleted: onRequestCompleted });
                      this.executeWithThrottling();
                  };
                  TypingsInstaller.prototype.executeWithThrottling = function () {
                      var _this = this;
                      var _loop_3 = function () {
                          this_1.inFlightRequestCount++;
                          var request = this_1.pendingRunRequests.pop();
                          this_1.installWorker(request.requestId, request.args, request.cwd, function (ok) {
                              _this.inFlightRequestCount--;
                              request.onRequestCompleted(ok);
                              _this.executeWithThrottling();
                          });
                      };
                      var this_1 = this;
                      while (this.inFlightRequestCount < this.throttleLimit && this.pendingRunRequests.length) {
                          _loop_3();
                      }
                  };
                  return TypingsInstaller;
              }());
              typingsInstaller.TypingsInstaller = TypingsInstaller;
              /* @internal */
              function typingsName(packageName) {
                  return "@types/" + packageName + "@ts" + versionMajorMinor;
              }
              typingsInstaller.typingsName = typingsName;
              var versionMajorMinor = ts.version.split(".").slice(0, 2).join(".");
          })(typingsInstaller = server.typingsInstaller || (server.typingsInstaller = {}));
      })(server = ts.server || (ts.server = {}));
  })(ts || (ts = {}));
  /// <reference path="typingsInstaller.ts"/>
  /// <reference types="node" />
  var ts;
  (function (ts) {
      var server;
      (function (server) {
          var typingsInstaller;
          (function (typingsInstaller) {
              var fs = require("fs");
              var path = require("path");
              var FileLog = (function () {
                  function FileLog(logFile) {
                      this.logFile = logFile;
                  }
                  FileLog.prototype.isEnabled = function () {
                      return this.logFile !== undefined;
                  };
                  FileLog.prototype.writeLine = function (text) {
                      fs.appendFileSync(this.logFile, text + ts.sys.newLine);
                  };
                  return FileLog;
              }());
              function getNPMLocation(processName) {
                  if (path.basename(processName).indexOf("node") == 0) {
                      return "\"" + path.join(path.dirname(process.argv[0]), "npm") + "\"";
                  }
                  else {
                      return "npm";
                  }
              }
              function loadTypesRegistryFile(typesRegistryFilePath, host, log) {
                  if (!host.fileExists(typesRegistryFilePath)) {
                      if (log.isEnabled()) {
                          log.writeLine("Types registry file '" + typesRegistryFilePath + "' does not exist");
                      }
                      return ts.createMap();
                  }
                  try {
                      var content = JSON.parse(host.readFile(typesRegistryFilePath));
                      return ts.createMapFromTemplate(content.entries);
                  }
                  catch (e) {
                      if (log.isEnabled()) {
                          log.writeLine("Error when loading types registry file '" + typesRegistryFilePath + "': " + e.message + ", " + e.stack);
                      }
                      return ts.createMap();
                  }
              }
              var TypesRegistryPackageName = "types-registry";
              function getTypesRegistryFileLocation(globalTypingsCacheLocation) {
                  return ts.combinePaths(ts.normalizeSlashes(globalTypingsCacheLocation), "node_modules/" + TypesRegistryPackageName + "/index.json");
              }
              var NodeTypingsInstaller = (function (_super) {
                  __extends(NodeTypingsInstaller, _super);
                  function NodeTypingsInstaller(globalTypingsCacheLocation, throttleLimit, log) {
                      var _this = _super.call(this, ts.sys, globalTypingsCacheLocation, ts.toPath("typingSafeList.json", __dirname, ts.createGetCanonicalFileName(ts.sys.useCaseSensitiveFileNames)), throttleLimit, log) || this;
                      if (_this.log.isEnabled()) {
                          _this.log.writeLine("Process id: " + process.pid);
                      }
                      _this.npmPath = getNPMLocation(process.argv[0]);
                      (_this.execSync = require("child_process").execSync);
                      _this.ensurePackageDirectoryExists(globalTypingsCacheLocation);
                      try {
                          if (_this.log.isEnabled()) {
                              _this.log.writeLine("Updating " + TypesRegistryPackageName + " npm package...");
                          }
                          _this.execSync(_this.npmPath + " install " + TypesRegistryPackageName, { cwd: globalTypingsCacheLocation, stdio: "ignore" });
                      }
                      catch (e) {
                          if (_this.log.isEnabled()) {
                              _this.log.writeLine("Error updating " + TypesRegistryPackageName + " package: " + e.message);
                          }
                      }
                      _this.typesRegistry = loadTypesRegistryFile(getTypesRegistryFileLocation(globalTypingsCacheLocation), _this.installTypingHost, _this.log);
                      return _this;
                  }
                  NodeTypingsInstaller.prototype.listen = function () {
                      var _this = this;
                      process.on("message", function (req) {
                          switch (req.kind) {
                              case "discover":
                                  _this.install(req);
                                  break;
                              case "closeProject":
                                  _this.closeProject(req);
                          }
                      });
                  };
                  NodeTypingsInstaller.prototype.sendResponse = function (response) {
                      if (this.log.isEnabled()) {
                          this.log.writeLine("Sending response: " + JSON.stringify(response));
                      }
                      process.send(response);
                      if (this.log.isEnabled()) {
                          this.log.writeLine("Response has been sent.");
                      }
                  };
                  NodeTypingsInstaller.prototype.installWorker = function (requestId, args, cwd, onRequestCompleted) {
                      if (this.log.isEnabled()) {
                          this.log.writeLine("#" + requestId + " with arguments'" + JSON.stringify(args) + "'.");
                      }
                      var command = this.npmPath + " install " + args.join(" ") + " --save-dev --user-agent=\"typesInstaller/" + ts.version + "\"";
                      var start = Date.now();
                      var stdout;
                      var stderr;
                      var hasError = false;
                      try {
                          stdout = this.execSync(command, { cwd: cwd });
                      }
                      catch (e) {
                          stdout = e.stdout;
                          stderr = e.stderr;
                          hasError = true;
                      }
                      if (this.log.isEnabled()) {
                          this.log.writeLine("npm install #" + requestId + " took: " + (Date.now() - start) + " ms" + ts.sys.newLine + "stdout: " + (stdout && stdout.toString()) + ts.sys.newLine + "stderr: " + (stderr && stderr.toString()));
                      }
                      onRequestCompleted(!hasError);
                  };
                  return NodeTypingsInstaller;
              }(typingsInstaller.TypingsInstaller));
              typingsInstaller.NodeTypingsInstaller = NodeTypingsInstaller;
              var logFilePath = server.findArgument(server.Arguments.LogFile);
              var globalTypingsCacheLocation = server.findArgument(server.Arguments.GlobalCacheLocation);
              var log = new FileLog(logFilePath);
              if (log.isEnabled()) {
                  process.on("uncaughtException", function (e) {
                      log.writeLine("Unhandled exception: " + e + " at " + e.stack);
                  });
              }
              process.on("disconnect", function () {
                  if (log.isEnabled()) {
                      log.writeLine("Parent process has exited, shutting down...");
                  }
                  process.exit(0);
              });
              var installer = new NodeTypingsInstaller(globalTypingsCacheLocation, /*throttleLimit*/ 5, log);
              installer.listen();
          })(typingsInstaller = server.typingsInstaller || (server.typingsInstaller = {}));
      })(server = ts.server || (ts.server = {}));
  })(ts || (ts = {}));
  //# sourceMappingURL=file:////home/user/vm-gradual-typing/typescript-contracts/built/local/typingsInstaller.js.map