diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..d30a058 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +.idea +cmake-* +build* +Dockerfile \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f8f280..67a3bf9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,12 +1,12 @@ -cmake_minimum_required(VERSION 3.22) +cmake_minimum_required(VERSION 3.16) project(typescript) -set(CMAKE_CXX_STANDARD 23) +set(CMAKE_CXX_STANDARD 20) -set(CMAKE_CXX_FLAGS "-Wno-unused-variable -Wno-switch") +set(CMAKE_CXX_FLAGS "-Wno-unused-variable -Wno-switch -Wno-trigraphs") if(CMAKE_BUILD_TYPE STREQUAL "Release") - set(CMAKE_CXX_FLAGS "-Wno-unused-variable -O3 -ffast-math") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -ffast-math") endif() include_directories(libs/tracy/) @@ -19,13 +19,13 @@ add_subdirectory(libs/tracy) add_subdirectory(libs/fmt) set(ASMJIT_STATIC TRUE) -add_subdirectory(libs/asmjit) +#add_subdirectory(libs/asmjit) # enable for profiling #add_definitions(-DTRACY_ENABLE) #link_libraries(Tracy::TracyClient) -include_directories(libs/asmjit/src) +#include_directories(libs/asmjit/src) include_directories(libs/magic_enum) add_subdirectory(src) diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f5d934f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM debian:bullseye + +RUN apt-get update && apt-get -y install gnupg wget +RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|apt-key add - +RUN echo "deb http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-14 main" > /etc/apt/sources.list.d/clang.list + +# Install dependencies +RUN apt-get -qq update && \ + apt-get install -qqy --no-install-recommends \ + clang-14 lldb-14 lld-14 ca-certificates \ + autoconf automake cmake dpkg-dev file git make patch \ + libc-dev libc++-dev libgcc-10-dev libstdc++-10-dev \ + dirmngr gnupg2 lbzip2 wget xz-utils libtinfo5 && \ + rm -rf /var/lib/apt/lists/* + +ADD . /typerunner +WORKDIR /typerunner +RUN mkdir build +RUN cd build && cmake -DCMAKE_CXX_COMPILER=clang++-14 -DCMAKE_C_COMPILER=clang-14 -DCMAKE_BUILD_TYPE=Release .. +RUN cd build && make bench typescript_main -j 8 +RUN ./build/bench tests/objectLiterals1.ts +RUN ./build/typescript_main tests/objectLiterals1.ts \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..bfdc88c --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2021 Marc J. Schmidt + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 52aa335..af5ed5a 100644 --- a/README.md +++ b/README.md @@ -213,9 +213,14 @@ $ cd TypeRunner then make sure cmake and a C++ compiler is installed. We use LLVM toolchain per default. To build the project run the usual cmake command: ```sh +$ git clone https://github.com/marcj/TypeRunner.git +$ cd TypeRunner +$ git submodule update --init --recursive $ mkdir build $ cd build -$ cmake .. +$ cmake -DCMAKE_CXX_COMPILER=clang++-14 -DCMAKE_C_COMPILER=clang-14 -DCMAKE_BUILD_TYPE=Release .. +$ make bench -j 8 +$ ./bench ../tests/objectLiterals1.ts ``` Now you find in the build folder some binaries you can execute. \ No newline at end of file diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..aacd91c --- /dev/null +++ b/TODO.md @@ -0,0 +1,37 @@ +# Todo + +| Type | Parser | Compiler | VM | +|------------------|--------|----------|-----| +| String | [X] | [X] | [X] | +| Number | [X] | [X] | [X] | +| Boolean | [X] | [X] | [X] | +| BigInt | [X] | [X] | [X] | +| String Literal | [X] | [X] | [X] | +| Number Literal | [X] | [X] | [X] | +| BigInt Literal | [X] | [X] | [X] | +| Bool Literal | [X] | [X] | [X] | +| Interfaces | [X] | [X] | 50% | +| Object Literal | [X] | [X] | [X] | +| Classes | [X] | 20% | 5% | +| Union | [X] | [X] | [X] | +| Intersection | [X] | [] | [] | +| Functions | [X] | 50% | 30% | +| Template Literal | [X] | 50% | 20% | + +- [] Optimiser Parser + - [] Memory pool +- [] Inference + - [] Binary Expressions + - [] Binary Expressions +- [] Type narrowing + - [] If-Else + - [] While + - [] Early Return +- [] Type Guards +- [] Type Assertions +- [] Interface merging + - [] Primitives (lazy) +- [] Globals +- [] Modules +- [] Namespaces + diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8105feb..fe335c3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 3.22) project(typescript) #add_definitions(-DTRACY_ENABLE) @@ -17,4 +16,4 @@ add_library(typescript utf.h utf.cpp core.h core.cpp utilities.h utilities.cpp n target_link_libraries(typescript fmt) #target_link_libraries(typescript asmjit::asmjit) -add_subdirectory(gui) \ No newline at end of file +#add_subdirectory(gui) \ No newline at end of file diff --git a/src/checker/checks.h b/src/checker/checks.h index 6b75b2b..e1c62f1 100644 --- a/src/checker/checks.h +++ b/src/checker/checks.h @@ -6,7 +6,7 @@ namespace tr::vm { static auto emptyString = HashString(""); - HashString &getName(const shared &member) { + HashString &getName(const node &member) { switch (member->kind) { case TypeKind::MethodSignature: return to(member)->name; case TypeKind::Method: return to(member)->name; @@ -16,7 +16,7 @@ namespace tr::vm { return emptyString; } - sharedOpt findMember(const vector> &members, HashString &name) { + optionalNode findMember(const vector> &members, HashString &name) { for (auto &&member: members) { switch (member->kind) { case TypeKind::MethodSignature: if (to(member)->name == name) return member; @@ -33,14 +33,14 @@ namespace tr::vm { return nullptr; } - bool isMember(const shared &type) { + bool isMember(const node &type) { return type->kind == TypeKind::PropertySignature || type->kind == TypeKind::Property || type->kind == TypeKind::MethodSignature || type->kind == TypeKind::Method; } struct StackEntry { - const shared left; - const shared right; + const node left; + const node right; }; struct ExtendableStack { @@ -77,7 +77,7 @@ namespace tr::vm { return DiagnosticMessage(message, left->ip); } - void push(const shared &left, const shared &right) { + void push(const node &left, const node &right) { stack.push_back({left, right}); } @@ -108,7 +108,7 @@ namespace tr::vm { return true; } - bool has(const shared &left, const shared &right) { + bool has(const node &left, const node &right) { for (auto &&entry: stack) { if (entry.left == left && entry.right == right) return true; } @@ -123,7 +123,7 @@ namespace tr::vm { * * `left extends right ? true : false` */ - bool isExtendable(shared &left, shared &right, ExtendableStack &stack) { + bool isExtendable(node &left, node &right, ExtendableStack &stack) { if (right->kind == TypeKind::Parameter) { if (left->kind == TypeKind::Undefined && isOptional(right)) return true; right = to(right)->type; @@ -290,7 +290,7 @@ namespace tr::vm { return false; } - bool isExtendable2(shared &left, shared &right, ExtendableStack &stack) { + bool isExtendable2(node &left, node &right, ExtendableStack &stack) { // if (stack.has(left, right)) return true; // stack.push(left, right); if (stack.stack.empty()) stack.push(left, right); @@ -504,7 +504,7 @@ namespace tr::vm { // return false; } - bool isExtendable(shared &left, shared &right) { + bool isExtendable(node &left, node &right) { ExtendableStack stack; return isExtendable(left, right, stack); } diff --git a/src/checker/compiler.h b/src/checker/compiler.h index 8c2495f..4e1974f 100644 --- a/src/checker/compiler.h +++ b/src/checker/compiler.h @@ -64,7 +64,7 @@ namespace tr::checker { unsigned int pos{}; unsigned int end{}; unsigned int declarations = 1; - sharedOpt routine = nullptr; + shared_ptr routine = nullptr; }; struct FoundSymbol { @@ -274,7 +274,7 @@ namespace tr::checker { OP op; }; - inline void visitOps2(vector> &subroutines, Visit &visit, const function &callback) { + inline void visitOps2(vector> &subroutines, Visit &visit, const function &callback) { const auto ops = subroutines[visit.index]->ops; for (unsigned int i = 0; visit.active && i> &subroutines, unsigned int index, const function &callback) { + inline void visitOps(vector> &subroutines, unsigned int index, const function &callback) { auto current = subroutines[index]; Visit visit; visit.index = index; visitOps2(subroutines, visit, callback); } - //shared findOuterTypeFunction(vector> &subroutines, shared &subroutine) { - // shared typeFunction = subroutine; + //shared_ptr findOuterTypeFunction(vector> &subroutines, shared_ptr &subroutine) { + // shared_ptr typeFunction = subroutine; // // while (typeFunction->type == SymbolType::Inline) { // if (typeFunction->index == 0) { @@ -336,7 +336,7 @@ namespace tr::checker { // return typeFunction; //} -// inline void optimiseRestReuse(vector> &subroutines, shared &subroutine) { +// inline void optimiseRestReuse(vector> &subroutines, shared_ptr &subroutine) { // for (auto &&variable: subroutine->argumentUsages) { // if (!variable.lastIp) continue; // @@ -384,9 +384,9 @@ namespace tr::checker { // } // struct Optimiser { -// vector> *subroutines; +// vector> *subroutines; // -// explicit Optimiser(vector> *subroutines): subroutines(subroutines) {} +// explicit Optimiser(vector> *subroutines): subroutines(subroutines) {} // // void optimise(unsigned int index) { // auto current = (*subroutines)[index]; @@ -434,8 +434,8 @@ namespace tr::checker { unsigned int storageIndex{}; //tracks which subroutine is active (end() is), so that pushOp calls are correctly assigned. - vector> activeSubroutines; - vector> subroutines; + vector> activeSubroutines; + vector> subroutines; Program() { pushSubroutineNameLess(); //main @@ -455,7 +455,7 @@ namespace tr::checker { return routine->index; } - //shared getOuterTypeFunction() { + //shared_ptr getOuterTypeFunction() { // return findOuterTypeFunction(subroutines, activeSubroutines.empty() ? subroutines[0] : activeSubroutines.back()); //} @@ -474,7 +474,7 @@ namespace tr::checker { return symbol.routine->index; } - shared popSubroutine() { + shared_ptr popSubroutine() { if (activeSubroutines.empty()) throw runtime_error("No active subroutine found"); auto subroutine = activeSubroutines.back(); if (subroutine->ops.empty()) { @@ -494,7 +494,7 @@ namespace tr::checker { return subroutine; } - shared ¤tSubroutine() { + shared_ptr ¤tSubroutine() { return activeSubroutines.back(); } @@ -540,11 +540,11 @@ namespace tr::checker { vm::writeUint16(ops, offset == 0 ? ops.size() : offset, v); } - shared mainSubroutine() { + shared_ptr mainSubroutine() { return subroutines[0]; } - void pushError(ErrorCode code, const shared &node) { + void pushError(ErrorCode code, const node &node) { auto main = mainSubroutine(); //errors need to be part of main main->sourceMap.push(0, node->pos, node->end); @@ -558,7 +558,7 @@ namespace tr::checker { pushUint16(foundSymbol.symbol->index); } - void pushSourceMap(const shared &node) { + void pushSourceMap(const node &node) { activeSubroutines.back()->pushSourceMap(node->pos, node->end); } @@ -609,13 +609,13 @@ namespace tr::checker { return activeSubroutines.back()->ops.size(); } - void pushOp(OP op, const sharedOpt &node) { + void pushOp(OP op, const optionalNode &node) { if (node) pushSourceMap(node); pushOp(op); } //needed for variables -// void pushOpAtFrameInHead(shared frame, OP op, std::vector params = {}) { +// void pushOpAtFrameInHead(shared_ptr frame, OP op, std::vector params = {}) { // auto &ops = getOPs(); // // //an earlier known frame could be referenced, in which case we have to put ops between others. @@ -645,7 +645,7 @@ namespace tr::checker { * Symbols will be created first before a body is extracted. This makes sure all * symbols are known before their reference is used. */ - Symbol &pushSymbol(string_view name, SymbolType type, const shared &node) { + Symbol &pushSymbol(string_view name, SymbolType type, const node &node) { auto subroutine = currentSubroutine(); for (auto &&v: subroutine->symbols) { if (type != SymbolType::TypeVariable && v.name == name) { @@ -665,7 +665,7 @@ namespace tr::checker { return subroutine->symbols.back(); } - Symbol &pushSymbolForRoutine(string_view name, SymbolType type, const shared &node) { + Symbol &pushSymbolForRoutine(string_view name, SymbolType type, const node &node) { auto &symbol = pushSymbol(name, type, node); if (symbol.routine) return symbol; @@ -697,7 +697,7 @@ namespace tr::checker { pushAddress(registerStorage(s)); } - void pushStringLiteral(string_view s, const shared &node) { + void pushStringLiteral(string_view s, const node &node) { pushOp(OP::StringLiteral, node); pushStorage(s); } @@ -776,17 +776,17 @@ namespace tr::checker { class Compiler { public: - Program compileSourceFile(const shared &file) { + Program compileSourceFile(const shared_ptr &file) { Program program; - handle(file, program); + handle(file.get(), program); program.popSubroutine(); //main return program; } - void pushName(sharedOpt name, Program &program) { + void pushName(optionalNode name, Program &program) { if (!name) { program.pushOp(OP::Never); return; @@ -800,11 +800,11 @@ namespace tr::checker { } } - void pushFunction(OP op, sharedOpt node, Program &program, sharedOpt withName) { - sharedOpt body; - sharedOpt type; - sharedOpt typeParameters; - sharedOpt parameters; + void pushFunction(OP op, optionalNode node, Program &program, optionalNode withName) { + optionalNode body = nullptr; + optionalNode type = nullptr; + optionalNode typeParameters = nullptr; + optionalNode parameters = nullptr; if (auto a = to(node)) { body = a->body; type = a->type; @@ -865,30 +865,50 @@ namespace tr::checker { //when there are type parameters, FunctionDeclaration returns a FunctionRef //which indicates the VM that the function needs to be instantiated first. - auto subroutineIndex = program.pushSubroutineNameLess(); - unsigned int size = 0; - for (auto &¶m: typeParameters->list) { - handle(param, program); - } - program.pushSlots(); + auto functionDef = program.pushSubroutineNameLess(); + { + unsigned int size = 0; + for (auto param: *typeParameters) { + handle(param, program); + } + program.pushSlots(); - //first comes the return type - size++; + //first comes the return type + size++; - pushBodyType(); + pushBodyType(); - for (auto &¶m: parameters->list) { - size++; - handle(param, program); + for (auto param: *parameters) { + size++; + handle(param, program); + } + + pushName(withName, program); + program.pushOp(op, reinterpret_node(node)); + program.pushUint16(size); + program.popSubroutine(); } - pushName(withName, program); - program.pushOp(op, reinterpret_pointer_cast(node)); - program.pushUint16(size); - program.popSubroutine(); + auto inferTypes = program.pushSubroutineNameLess(); + { + //todo implement inferring type arguments from parameters + //https://www.typescriptlang.org/play?#code/PTAEBMFMGMBsEMBOlQDMCuA7aAXAlgPaYQECSOAPACoB8AFPAFyhUA0oARs1QJTcDcAKEEhQsSDlAFQAXlABvAF7MARCoC+QkWGhEAzpPiyS5OvKagAzOvZLVGnkNG7MBzsfBkcZi9fYFHbVAXN2gPLzoCW191QKDnfUkOcNNLaOZrONEE10kwuU9Tc2YAFhsFRFLYrVEoOCQUDGx8IjRMalBIAA8cSExwPQULAGly4foLNk5mYtBRvhYnHUTQIzlUTB8M8tnLMqywOoRkNCxcQmINgEYO7t7+wdnR9mHOnr6B0Ex0AFsOSEQE247C4Q2Y8wEQRChiuxmuWysO18+xqhxgx0aZxal0wACZbu8HmC5mM3vdPt8-gCgSwQdwFlQlsEVvBcXC8Qi-MS9tVhEcGqdmhc2pZqDSpqDeJDoatLAAGdmWOhpUBqQIy+Dy2HrTBK3Y7UFqXka+VsnVKgDalgAuuwLWprXF+ScmudWhtLDdaHQAHR+iwWqZUR3SlmexVXZXsNVCE1XbUiyP69KqhyxsNXM2JuhW22ge0qR1aZ2YoXu3X470B4N0-PBhnp3KyrMe3E5m12h3qsO4hOtnP6vMW2ZGouCE24lsVnO5ocF61jwQlwVunGWUXev0+gOBofBkOLcdhyyKy0d-NdxtuTXh82Wwd2kcaMcmyxT9czm1zh2L5eu7FtCUXpkh8jwjGM4q1lKh4akB7JAZySL2Ly2g4AAngADpABCoKsIFEnQABCBBdBQeCYKgAIsPhnxPOoNA8KhmHYbhyR3KBoB0ORlGINR7FEnRjEgOhWE4cENGDFxFFUcMjHaHo6AcIgBDoPgmAoNxVEAGKYCUuLMBapDSYgiDkQA5lQzEAIKIGZvx9JIABkwb5kZPGmZgFnWbZ9mYE5wzWq5xmWVhNl2T8Dl6Na8mKcpqnkSgVAGQAwvAsCwHMgUWgACspWGIOhqrwIW+YAPIcAAVjAOAADJ4L0iBpdFIAKUpKlqSgwwGVZmBoc1wCtXFHWrAZ2VIPAPxXFlblUc5WWpeloDEV0oBTUFPEAKKEgM0XaBaADKOBIDgM2ICFkBhb5OCBcgODoIgridEgsBoaAADuAAWfSgDgX0sN54UOe98CDKgeBdJA4AxW18XqSN+ZjY1k1ZYdx2nedl0RX581pRlAUI3lAKFSoxVZeVVW4HVDVNetALJYkjXkU5LkWgtGXLat03GVt5JRdDQ0JdMCPjcj+aowV6MA1dOOLfjOWEwVr0kyVFrk9VVMAjThnGfTuSM35oBzbTiA86B-WDe1gvQvrOCjSLa0HUdEvBVLWPXcbhty6dpsPP1RjW-ATNiHgADWKAAAavPxFK-P8iDh6ABgEBhgyvKgyk-JwkDme9eBQJg6ngGgGdWLINBfLHVF0Ho0j1YnR1oYM8CSJYQlgCJKDLWKxhUBJxIGB5Zm1pScfsNAzCabxhHqKAAD8CgAG7cIbCjj0tfc4Ig6AoPPsLMHK6gz8wWBQGDheoh3S0kd3ci99HgyT3Mc9P-f-eb+Zw+V4gY-MBwBAEOIeAmAZ7z3kEvFgR9QAn0gGfSGoBj79BgQlcAF9mJXy6JWdgAA1cut8+6P1eKA8BUwQ7MCwZA6BsCobCTQctTBoAcHGHkBaTAE1IDMAHuZa03B1DCFEDIcupAfofXIiHd6X1LjkXADnaAQDpHgGbpAUGBAp7X1oOwKg+1E5vXqtAL6gwXDSOxGleuii3aDBwNIBS+UAC0GECB6HqhcPQ7Aa7CObkEOut17qPT-r9TgjVsD6NAORVYxAsAXFcdIN6KAPrwAXigXGoB7F6EcRwcQwQ5F50UXoH0S1VJSEwC9cR31e54CbrgdAuNXroD0HA0J-sCA-AwkgcpRAfRBFILhXub0QZQLqUXOgMSviQDgUYdSb00AIDMmgFR7jJAdx4CE4guhmmtJrpgdgddHFmVYbACxf1DFOKICYy+ljQDeIepwAg-ilJAL0UojpNCsLoPocMSAjc+6cM8rg4kVAZ6v1mN8syICFAsLYcsuYHyoo8PgWgNKdT+CgGEqZMyZkASDH2tlTi1iAR2IccczAbdL50OoC8aFXz34-OMOpBJvFAWTFBcw1hEVIXvMbtwiBcLUAIsgEikAn1XqeCUcI8pP1UXot4rixA+LHHYlnkxF5pKpjssGK-YFvygGvQZbC0B4LWWhNVZy-53LeX8uAIKkgIrfpivfmiqi0rZWEoVSSkibyKXqqpWZX5WAQ6YAIG9YgOquV6pZRpYgRrYXMB5fsvlyLgD+tAFixVnc3VkqhZ8z1g9fkEEqtVPuswTWhohYa6FxrIExsRfGxNybnmpowem1VlLs1MIsMCgF20wK6rBWGtlZao3wtjea2twBXUNpVR6zt9cW1yHkKCdtBbGXP2ZSWiN-auXRrNdW6QI6x3uszVOjVPd8HGRflOkeVFi0GrXRygdla+V8LAAACQ2gAJQ2gAQg-doGQv7y42seOA0YATIDwBDgclAyAEDYj0CIjCWccAxNKWEouRh7H3HwCY2R-Rsm9CiaKh+gwPoBpCZIN6KjwN5J+B9D6Kb0E3z4lOghz8o5TqBV6z+VJv7BF-v-QBwDl3EIoYgqhcLKHIKWABi5EgfGDBUP6rCKgs6yNqRHVjvNQBdATpcx6aVemfPvTYu5QTlPwFU0-OJgxE2OpSYSqZ8Ah7CNqW8DCyBUnCj0-AAzvKghyNAOHO+THT3DATnayVgwbMEuxOwHTOc-EfQCfc-RIICn+rhj8ZuDym7ECQIDA2Oj-HhzAcwLc6gE5uLrhhPA0BwPCMgEEMGiA3ARNaA5RAr06DyeTpAFQSy-OqYOc3DpY6GOBY08x+e6mOLscHpx0ePHrkANAwJoh4JIFdcU3C5V7AADkC8ds0FRKgOZ4cLBd1oAnMpgxfX+sDSlyQ9UDEM0DgbMVfqA2bMTtILudFy5itkelSGQQbHl39Qsm51SLl4DMh9HA7A+k9LwItf4yz3JwPTk0-zkpw55M+t9ZIYqEXSHDqCc7NAE5EGKb9RKO2nt6xew967Azgeg5ueK7erjyLQA0pIKAWEiRiWWrTiASDMCEtxxI6ioSOaWa+NII5AFWj1XYBsPSO3e7YazqjgEyBqFgBB3LhZW8UDZ2p1KrnKBqezPSgGnO5HEC1ZrhFYjb08lUBEYMe3tX-gqbqfR2goBZf+yyQo3oi9YWfWqwl21kvVPgCeWANxwz1JjMTrFS2cMxKgb0T9NB-5hSwFDvW+Z0m7oPSbotFJaSMnYfkTkhVf4sTClV5WRda2Xg0jJ7WLvC3ZKhibPAPS8E2zFeJGoWsABWFUa9N7b0PrYcBT5J8lB-oOup8-UxOnRAKfP5YSgbjbySF4BbJT0QYMCIWUw1595giyff8E9QxBTEaaMvXUTMgH3sPsuoSiIWf2mKEMMIfc0X-XMO0ecRcWobfF0JvPfMUc-P5coUEQtWISEHIa8EoeCP-MfNMIAA + //for functions with type arguments fn(a: T) + //we need a subroutine to infer them from passed arguments. + for (auto param: *typeParameters) { + //put TypeArgument for each type parameter on the stack + //handle(param, program); + //const auto p = to(param); + //p->constraint + //auto &symbol = program.pushSymbol(->name->escapedText, SymbolType::TypeArgument, n); + } + program.pushOp(OP::InferTypeArguments); + program.popSubroutine(); + } - program.pushOp(OP::FunctionRef, reinterpret_pointer_cast(node)); - program.pushAddress(subroutineIndex); + program.pushOp(OP::FunctionRef, reinterpret_node(node)); + program.pushAddress(functionDef); + program.pushAddress(inferTypes); } else { unsigned int size = 0; //first comes the return type @@ -896,21 +916,21 @@ namespace tr::checker { pushBodyType(); - for (auto &¶m: parameters->list) { + for (auto param: *parameters) { size++; handle(param, program); } pushName(withName, program); - program.pushOp(op, reinterpret_pointer_cast(node)); + program.pushOp(op, reinterpret_node(node)); program.pushUint16(size); } } - void handle(const shared &node, Program &program) { + void handle(const node &node, Program &program) { switch (node->kind) { case SyntaxKind::SourceFile: { - for (auto &&statement: to(node)->statements->list) { + for (auto statement: *to(node)->statements) { handle(statement, program); } break; @@ -987,7 +1007,7 @@ namespace tr::checker { program.pushStorage(*t->head->rawText); } - for (auto &&sub: t->templateSpans->list) { + for (auto sub: *t->templateSpans) { auto span = to(sub); size++; handle(to(span)->type, program); @@ -1015,7 +1035,7 @@ namespace tr::checker { case SyntaxKind::UnionType: { const auto n = to(node); unsigned int size = 0; - for (auto &&s: n->types->list) { + for (auto s: *n->types) { size++; handle(s, program); } @@ -1043,7 +1063,7 @@ namespace tr::checker { } } else { if (n->typeArguments) { - for (auto &&p: n->typeArguments->list) { + for (auto p: *n->typeArguments) { handle(p, program); } } @@ -1077,7 +1097,7 @@ namespace tr::checker { } if (n->typeParameters) { - for (auto &&p: n->typeParameters->list) { + for (auto p: *n->typeParameters) { handle(p, program); } } @@ -1117,14 +1137,14 @@ namespace tr::checker { program.pushSlots(); handle(n->defaultType, program); auto routine = program.popSubroutine(); - program.pushOp(instructions::TypeArgumentDefault, n->name); + program.pushOp(OP::TypeArgumentDefault, n->name); program.pushAddress(routine->index); } else { - program.pushOp(instructions::TypeArgument, n->name); + program.pushOp(OP::TypeArgument, n->name); } if (n->constraint) { handle(n->constraint, program); - program.pushOp(instructions::TypeArgumentConstraint); + program.pushOp(OP::TypeArgumentConstraint); } break; } @@ -1163,7 +1183,7 @@ namespace tr::checker { program.pushSymbolAddress(foundSymbol); } else { if (n->typeArguments) { - for (auto &&p: n->typeArguments->list) { + for (auto p: *n->typeArguments) { handle(p, program); } } @@ -1214,10 +1234,10 @@ namespace tr::checker { //first all extend expressions if (n->heritageClauses) { - for (auto &&node: n->heritageClauses->list) { + for (auto node: *n->heritageClauses) { auto heritage = to(node); if (heritage->token == SyntaxKind::ExtendsKeyword) { - for (auto &&extendType: heritage->types->list) { + for (auto extendType: *heritage->types) { size++; handle(extendType, program); } @@ -1225,7 +1245,7 @@ namespace tr::checker { } } - for (auto &&member: n->members->list) { + for (auto member: *n->members) { size++; handle(member, program); } @@ -1238,7 +1258,7 @@ namespace tr::checker { const auto n = to(node); unsigned int size = 0; - for (auto &&member: n->members->list) { + for (auto member: *n->members) { size++; handle(member, program); } @@ -1265,7 +1285,7 @@ namespace tr::checker { const auto n = to(node); auto typeArgumentsCount = n->typeArguments ? n->typeArguments->length() : 0; if (n->typeArguments) { - for (auto &&sub: n->typeArguments->list) handle(sub, program); + for (auto sub: *n->typeArguments) handle(sub, program); } handle(n->expression, program); @@ -1279,7 +1299,7 @@ namespace tr::checker { case SyntaxKind::ObjectLiteralExpression: { const auto n = to(node); unsigned int size = 0; - for (auto &&sub: n->properties->list) { + for (auto sub: *n->properties) { size++; handle(sub, program); } @@ -1289,30 +1309,36 @@ namespace tr::checker { } case SyntaxKind::NewExpression: { const auto n = to(node); + + auto argumentsCount = n->arguments ? n->arguments->length() : 0; + if (n->arguments) for (auto sub: *n->arguments) handle(sub, program); + auto typeArgumentsCount = n->typeArguments ? n->typeArguments->length() : 0; if (n->typeArguments) { - for (auto &&sub: n->typeArguments->list) handle(sub, program); + for (auto sub: *n->typeArguments) handle(sub, program); } - handle(n->expression, program); if (n->typeArguments) { program.pushOp(OP::Instantiate, node); program.pushUint16(typeArgumentsCount); + } else if (argumentsCount) { + program.pushOp(OP::StartInferTypeArguments, node); + program.pushUint16(argumentsCount); } - auto argumentsCount = n->arguments ? n->arguments->length() : 0; - if (n->arguments) for (auto &&sub: n->arguments->list) handle(sub, program); - program.pushOp(OP::New, node); program.pushUint16(argumentsCount); break; } case SyntaxKind::CallExpression: { const auto n = to(node); + auto argumentsCount = n->arguments->length(); + for (auto sub: *n->arguments) handle(sub, program); + auto typeArgumentsCount = n->typeArguments ? n->typeArguments->length() : 0; if (n->typeArguments) { - for (auto &&sub: n->typeArguments->list) handle(sub, program); + for (auto sub: *n->typeArguments) handle(sub, program); } handle(n->expression, program); @@ -1320,11 +1346,11 @@ namespace tr::checker { if (n->typeArguments) { program.pushOp(OP::Instantiate, node); program.pushUint16(typeArgumentsCount); + } else { + program.pushOp(OP::StartInferTypeArguments, node); + program.pushUint16(argumentsCount); } - auto argumentsCount = n->arguments->length(); - for (auto &&sub: n->arguments->list) handle(sub, program); - program.pushOp(OP::CallExpression, node); program.pushUint16(argumentsCount); @@ -1338,7 +1364,7 @@ namespace tr::checker { } case SyntaxKind::Block: { const auto n = to(node); - for (auto &&statement: n->statements->list) { + for (auto statement: *n->statements) { handle(statement, program); } break; @@ -1377,7 +1403,7 @@ namespace tr::checker { //so it can be executed for each union member. // - the `checkType` is a simple identifier (just `T`, no `[T]`, no `T | x`, no `{a: T}`, etc) // let distributiveOverIdentifier: Identifier | undefined = isTypeReferenceNode(narrowed.checkType) && isIdentifier(narrowed.checkType.typeName) ? narrowed.checkType.typeName : undefined; - sharedOpt distributiveOverIdentifier = isTypeReferenceNode(n->checkType) && isIdentifier(to(n->checkType)->typeName) ? to(to(n->checkType)->typeName) : nullptr; + optionalNode distributiveOverIdentifier = isTypeReferenceNode(n->checkType) && isIdentifier(to(n->checkType)->typeName) ? to(to(n->checkType)->typeName) : nullptr; program.pushSection(); auto symbolCheckpoint = program.createSymbolCheckout(); @@ -1404,7 +1430,7 @@ namespace tr::checker { //checkType and trueType share symbols (from infer) handle(n->checkType, program); handle(n->extendsType, program); - program.pushOp(instructions::Extends, n); + program.pushOp(OP::Extends, n); program.pushOp(OP::JumpCondition); auto relativeTo = program.ip(); @@ -1467,7 +1493,7 @@ namespace tr::checker { //value inference case SyntaxKind::ArrayLiteralExpression: { unsigned int size = 0; - for (auto &&v: to(node)->elements->list) { + for (auto v: *to(node)->elements) { size++; handle(v, program); program.pushOp(OP::TupleMember, v); @@ -1512,14 +1538,14 @@ namespace tr::checker { if (n->typeParameters) { auto subroutineIndex = program.pushSubroutineNameLess(); program.blockTailCall(); - for (auto &&p: n->typeParameters->list) { + for (auto p: *n->typeParameters) { handle(p, program); } program.pushSlots(); unsigned int size = 0; - for (auto &&member: n->members->list) { + for (auto member: *n->members) { size++; handle(member, program); } @@ -1527,13 +1553,36 @@ namespace tr::checker { program.pushUint16(size); program.popSubroutine(); - program.pushOp(OP::ClassRef, reinterpret_pointer_cast(node)); + //unsigned int constructorInfer = 0; + //for (auto member: *n->members) { + // //could be multiple constructors with constructor signature + // if (member->kind == SyntaxKind::Constructor) { + // //todo: How do we encode it? + // } + //} + auto inferTypes = program.pushSubroutineNameLess(); + { + //for functions with type arguments fn(a: T) + //we need a subroutine to infer them from passed arguments. + for (auto param: *n->typeParameters) { + //put TypeArgument for each type parameter on the stack + handle(param, program); + //const auto p = to(param); + //p->constraint + //auto &symbol = program.pushSymbol(->name->escapedText, SymbolType::TypeArgument, n); + } + program.pushOp(OP::InferTypeArguments); + program.popSubroutine(); + } + + program.pushOp(OP::ClassRef, reinterpret_node(node)); program.pushAddress(subroutineIndex); + program.pushAddress(inferTypes); } else { program.pushSlots(); unsigned int size = 0; - for (auto &&member: n->members->list) { + for (auto member: *n->members) { size++; handle(member, program); } @@ -1563,7 +1612,7 @@ namespace tr::checker { case SyntaxKind::TupleType: { unsigned int size = 0; auto n = to(node); - for (auto &&e: n->elements->list) { + for (auto e: *n->elements) { if (auto tm = to(e)) { size++; handle(tm->type, program); @@ -1617,7 +1666,7 @@ namespace tr::checker { break; } case SyntaxKind::VariableStatement: { - for (auto &&s: to(node)->declarationList->declarations->list) { + for (auto s: *to(node)->declarationList->declarations) { handle(s, program); } break; diff --git a/src/checker/debug.h b/src/checker/debug.h index 0ab7445..133cfab 100644 --- a/src/checker/debug.h +++ b/src/checker/debug.h @@ -153,12 +153,13 @@ namespace tr::checker { } case OP::ClassRef: case OP::FunctionRef: { - params += fmt::format(" &{}", vm::readUint32(bin, i + 1)); + params += fmt::format(" &{} &{}", vm::readUint32(bin, i + 1), vm::readUint32(bin, i + 5)); vm::eatParams(op, &i); break; } case OP::New: - case OP::Instantiate: { + case OP::Instantiate: + case OP::InferTypeArguments: { params += fmt::format(" {}", vm::readUint16(bin, i + 1)); vm::eatParams(op, &i); break; diff --git a/src/checker/instructions.h b/src/checker/instructions.h index 9844c2f..56a1db0 100644 --- a/src/checker/instructions.h +++ b/src/checker/instructions.h @@ -69,6 +69,8 @@ namespace tr::instructions { CallExpression, //JS call expression, with 1 parameter (amount of parameters) Instantiate, //instantiates a type on the stack (FunctionRef for example), ExpressionWithTypeArguments + StartInferTypeArguments, //calling generic function/class with only value arguments, infer type arguments from it + InferTypeArguments, New, /** diff --git a/src/checker/module2.h b/src/checker/module2.h index c1d15ac..6058b01 100644 --- a/src/checker/module2.h +++ b/src/checker/module2.h @@ -161,7 +161,7 @@ namespace tr::vm2 { } }; - inline void parseHeader(shared &module) { + inline void parseHeader(shared_ptr &module) { auto &bin = module->bin; auto end = bin.size(); bool main = true; diff --git a/src/checker/types.h b/src/checker/types.h index 1f3b9b4..482d302 100644 --- a/src/checker/types.h +++ b/src/checker/types.h @@ -141,7 +141,7 @@ namespace tr::vm { #endif } - void compare(const shared &left, const shared &right) { + void compare(const node &left, const node &right) { #ifdef TS_PROFILE data.comparisons[(int)left->kind][(int)right->kind]++; #endif @@ -162,7 +162,7 @@ namespace tr::vm { struct Module; template - sharedOpt to(const sharedOpt &p) { + optionalNode to(const optionalNode &p) { if (!p) return nullptr; if (T::KIND != TypeKind::Unknown && p->kind != T::KIND) return nullptr; return reinterpret_pointer_cast(p); @@ -185,38 +185,38 @@ namespace tr::vm { struct TypeTemplateLiteral: BrandKind { // types: (TypeString | TypeAny | TypeNumber | TypeStringLiteral | TypeInfer)[] - vector> types; + vector> types; explicit TypeTemplateLiteral() {} - explicit TypeTemplateLiteral(const vector> &types): types(types) {} + explicit TypeTemplateLiteral(const vector> &types): types(types) {} }; struct TypeRest: BrandKind { - shared type; - explicit TypeRest(shared type): type(std::move(type)) { + node type; + explicit TypeRest(node type): type(std::move(type)) { } }; struct TypeArray: BrandKind { - shared type; - explicit TypeArray(shared type): type(std::move(type)) { + node type; + explicit TypeArray(node type): type(std::move(type)) { } }; struct TypeTupleMember: BrandKind { - shared type; + node type; bool optional = false; string_view name = ""; explicit TypeTupleMember() { } - explicit TypeTupleMember(shared type): type(std::move(type)) { + explicit TypeTupleMember(node type): type(std::move(type)) { } }; struct TypeTuple: BrandKind { - vector> types; + vector> types; }; enum class TypeLiteralType { @@ -258,7 +258,7 @@ namespace tr::vm { delete dynamicString; } - bool equal(const shared &other) { + bool equal(const node &other) { return type == other->type && literal.getHash() == other->literal.getHash(); // if (type != other->type) return false; // if (!literalText && !other->literalText) return literal == other->literal; @@ -273,7 +273,7 @@ namespace tr::vm { }; struct TypeUnion: BrandKind { - vector> types; + vector> types; bool indexed = false; bool onlyLiterals = false; std::unordered_set literalIndex; @@ -298,7 +298,7 @@ namespace tr::vm { return onlyLiterals; } - bool includes(const shared &type) { + bool includes(const node &type) { if (type->kind == TypeKind::Literal) { return literalIndex.contains(to(type)->literal.hash); } @@ -309,16 +309,16 @@ namespace tr::vm { struct TypeParameter: BrandKind { string_view name; //number, string, symbol - shared type; - sharedOpt initializer = nullptr; + node type; + optionalNode initializer = nullptr; bool optional = false; - TypeParameter(const string_view &name, const shared &type): name(name), type(type) {} + TypeParameter(const string_view &name, const node &type): name(name), type(type) {} }; struct TypeFunction: BrandKind { string_view name; //number, string, symbol - vector> parameters; - shared returnType; + vector> parameters; + node returnType; }; struct TypeFunctionRef: BrandKind { @@ -330,45 +330,45 @@ namespace tr::vm { HashString name; //todo change to something that is number | string | symbol, same for MethodSignature bool optional = false; bool readonly = false; - shared type; - TypeProperty(const shared &type): type(type) {} + node type; + TypeProperty(const node &type): type(type) {} }; struct TypePropertySignature: BrandKind { HashString name; //todo change to something that is number | string | symbol, same for MethodSignature bool optional = false; bool readonly = false; - shared type; + node type; TypePropertySignature() {} - TypePropertySignature(const shared &type): type(type) {} + TypePropertySignature(const node &type): type(type) {} }; struct TypeMethodSignature: BrandKind { HashString name; bool optional = false; - vector> parameters; - shared returnType; + vector> parameters; + node returnType; }; struct TypeMethod: BrandKind { HashString name; bool optional = false; - vector> parameters; - shared returnType; + vector> parameters; + node returnType; }; struct TypeIndexSignature: BrandKind { - shared index; - shared type; + node index; + node type; }; struct TypeObjectLiteral: BrandKind { - vector> types; //TypeIndexSignature | TypePropertySignature | TypeMethodSignature + vector> types; //TypeIndexSignature | TypePropertySignature | TypeMethodSignature explicit TypeObjectLiteral() {} - explicit TypeObjectLiteral(vector> types): types(types) {} + explicit TypeObjectLiteral(vector> types): types(types) {} }; - string stringify(shared type) { + string stringify(node type) { //todo: recursive types switch (type->kind) { @@ -474,7 +474,7 @@ namespace tr::vm { return fmt::format("error-{}", type->kind); } - shared unboxUnion(shared type) { + node unboxUnion(node type) { if (type->kind == TypeKind::Union) { auto types = to(type)->types; if (types.size() == 0) return make_shared(); //{ kind: ReflectionKind.never }; @@ -483,7 +483,7 @@ namespace tr::vm { return type; } - bool isOptional(shared type) { + bool isOptional(node type) { switch (type->kind) { case TypeKind::Union: { auto a = to(type); @@ -511,7 +511,7 @@ namespace tr::vm { return false; } - shared widen(shared type) { + node widen(node type) { switch (type->kind) { case TypeKind::Literal: { auto a = to(type); diff --git a/src/checker/utils.h b/src/checker/utils.h index 2c0d06a..344bb76 100644 --- a/src/checker/utils.h +++ b/src/checker/utils.h @@ -100,11 +100,12 @@ namespace tr::vm { } case OP::ClassRef: case OP::FunctionRef: { - *i += 4; + *i += 4 + 4; break; } case OP::New: - case OP::Instantiate: { + case OP::Instantiate: + case OP::InferTypeArguments: { *i += 2; break; } diff --git a/src/checker/vm.cpp b/src/checker/vm.cpp index 70c5ecb..d58d4a2 100644 --- a/src/checker/vm.cpp +++ b/src/checker/vm.cpp @@ -1,6 +1,6 @@ #include "./vm.h" namespace tr::vm { - shared stringToNum(VM &vm) { + node stringToNum(VM &vm) { } } \ No newline at end of file diff --git a/src/checker/vm.h b/src/checker/vm.h index c129275..f4a6220 100644 --- a/src/checker/vm.h +++ b/src/checker/vm.h @@ -24,13 +24,13 @@ namespace tr::vm { using instructions::OP; using instructions::ErrorCode; - inline bool isConditionTruthy(shared node) { + inline bool isConditionTruthy(node node) { if (auto n = to(node)) return n->text() == "true"; return false; } struct CStack { - vector> iterator; + vector> iterator; unsigned int i; unsigned int round; }; @@ -39,7 +39,7 @@ namespace tr::vm { vector stack; public: - shared current(CStack &s) { + node current(CStack &s) { return s.iterator[s.i]; } @@ -47,7 +47,7 @@ namespace tr::vm { return (++s.i == s.iterator.size()) ? (s.i = 0, false) : true; } - vector> toGroup(shared &type) { + vector> toGroup(node &type) { if (type->kind == TypeKind::Boolean) { return {make_shared("false", TypeLiteralType::String), make_shared("true", TypeLiteralType::String)}; } else if (type->kind == TypeKind::Null) { @@ -66,7 +66,7 @@ namespace tr::vm { // // return result; } else if (type->kind == TypeKind::Union) { - vector> result; + vector> result; for (auto &&v: to(type)->types) { auto g = toGroup(v); for (auto &&s: g) result.push_back(s); @@ -78,16 +78,16 @@ namespace tr::vm { } } - void add(shared &item) { + void add(node &item) { stack.push_back({.iterator=toGroup(item), .i= 0, .round= 0}); } - vector>> calculate() { - vector>> result; + vector>> calculate() { + vector>> result; outer: while (true) { - vector> row; + vector> row; for (auto &&s: stack) { auto item = current(s); if (item->kind == TypeKind::TemplateLiteral) { @@ -126,7 +126,7 @@ namespace tr::vm { * e.g. [string, number][0] => string * e.g. [string, number][number] => string | number */ - shared indexAccess(shared &container, shared &index) { + node indexAccess(node &container, node &index) { if (container->kind == TypeKind::Array) { // if ((index.kind == TypeKind::literal && 'number' == typeof index.literal) || index.kind == TypeKind::number) return container.type; // if (index.kind == TypeKind::literal && index.literal == 'length') return { kind: TypeKind::number }; @@ -224,10 +224,10 @@ namespace tr::vm { } struct LoopHelper { - vector> types; + vector> types; unsigned int i = 0; - LoopHelper(const shared &type) { + LoopHelper(const node &type) { if (auto t = to(type)) { types = t->types; } else { @@ -235,7 +235,7 @@ namespace tr::vm { } } - sharedOpt next() { + optionalNode next() { if (i == types.size()) return nullptr; return types[i++]; } @@ -245,7 +245,7 @@ namespace tr::vm { * For each active subroutine this object is created. */ struct ProgressingSubroutine { - shared module; + node module; ModuleSubroutine *subroutine; unsigned int ip = 0; //instruction pointer @@ -256,9 +256,9 @@ namespace tr::vm { bool active = true; unsigned int typeArguments = 0; - sharedOpt previous = nullptr; + optionalNode previous = nullptr; - explicit ProgressingSubroutine(shared module, ModuleSubroutine *subroutine): module(module), subroutine(subroutine) {} + explicit ProgressingSubroutine(node module, ModuleSubroutine *subroutine): module(module), subroutine(subroutine) {} uint32_t parseUint32() { auto val = readUint32(module->bin, ip + 1); @@ -278,7 +278,7 @@ namespace tr::vm { unsigned int initialSp = 0; //initial stack pointer unsigned int variables = 0; //the amount of registered variable slots on the stack. will be subtracted when doing popFrame() // vector variableIPs; //only used when stepper is active - sharedOpt loop = nullptr; + optionalNode loop = nullptr; // ModuleSubroutine *subroutine; unsigned int size() { @@ -317,16 +317,16 @@ namespace tr::vm { class VM; - shared stringToNum(VM &vm); + node stringToNum(VM &vm); class MemoryPool { public: vector typeLiterals; - shared defaultTypeLiteral = make_shared(); - shared defaultTypeTupleMember = make_shared(); - shared defaultTypeObjectLiteral = make_shared(); - shared defaultPropertySignature = make_shared(); - shared defaultUnknown = make_shared(); + node defaultTypeLiteral = make_shared(); + node defaultTypeTupleMember = make_shared(); + node defaultTypeObjectLiteral = make_shared(); + node defaultPropertySignature = make_shared(); + node defaultUnknown = make_shared(); vector unknowns; @@ -341,21 +341,21 @@ namespace tr::vm { // return make_shared(); } - shared makePropertySignature(const shared &type) { + node makePropertySignature(const node &type) { defaultPropertySignature->type = type; return defaultPropertySignature; } - shared makeTupleMember(const shared &type) { + node makeTupleMember(const node &type) { defaultTypeTupleMember->type = type; return defaultTypeTupleMember; } - shared makeObjectLiteral() { + node makeObjectLiteral() { return defaultTypeObjectLiteral; } - shared makeTypeLiteral(const string_view &literal, TypeLiteralType type) { + node makeTypeLiteral(const string_view &literal, TypeLiteralType type) { // return make_shared(literal, type); return defaultTypeLiteral; // auto t = make_shared(std::move(typeLiterals.emplace_back(literal, type))); @@ -369,19 +369,19 @@ namespace tr::vm { /** * Linked list of subroutines to execute. For each external call this subroutine will be changed. */ - sharedOpt subroutine = nullptr; + optionalNode subroutine = nullptr; MemoryPool pool; vector frames; - vector> stack; + vector> stack; //when a OP is processes, its instruction pointer is stores here, and used in push() to set the ip to the new type generated by this OP. //diagnostics/debugger can use this information to map the type to the sourcecode. unsigned int ip{}; bool stepper = false; - vector> modules; + vector> modules; - unordered_map(VM &)>> optimised; + unordered_map(VM &)>> optimised; VM() { // stack.reserve(1000); @@ -404,7 +404,7 @@ namespace tr::vm { return errors; } - void prepare(shared module) { + void prepare(node module) { parseHeader(module); modules.push_back(module); @@ -419,13 +419,13 @@ namespace tr::vm { if (frames.size() > 1) frames.back().fromFrame(frames[frames.size() - 2]); } - void run(shared module) { + void run(node module) { profiler.clear(); prepare(module); process(); } - void call(shared &module, unsigned int index = 0, unsigned int arguments = 0) { + void call(node &module, unsigned int index = 0, unsigned int arguments = 0) { const auto loopRunning = !!subroutine; auto routine = module->getSubroutine(index); @@ -465,17 +465,17 @@ namespace tr::vm { /** * Read frame types without popping frame. */ - span> readFrame() { + span> readFrame() { auto start = frames.back().initialSp + frames.back().variables; return {stack.data() + start, frames.back().sp - start}; } - span> popFrame() { + span> popFrame() { // auto frameSize = frame->initialSp - frame->sp; // while (frameSize--) stack.pop(); auto start = frames.back().initialSp + frames.back().variables; - span> sub{stack.data() + start, frames.back().sp - start}; -// std::span> sub{stack.begin() + frame->initialSp, frameSize}; + span> sub{stack.data() + start, frames.back().sp - start}; +// std::span> sub{stack.begin() + frame->initialSp, frameSize}; frames.pop_back(); return sub; } @@ -490,12 +490,12 @@ namespace tr::vm { // frames.back().subroutine = subroutine->subroutine; } - shared &last() { + node &last() { if (frames.back().sp == 0) throw runtime_error("stack is empty. Can not return last"); return stack[frames.back().sp - 1]; } - shared pop() { + node pop() { if (frames.back().sp == 0) throw runtime_error("stack is empty. Can not pop"); frames.back().sp--; if (frames.back().sp < frames.back().initialSp) { @@ -504,13 +504,13 @@ namespace tr::vm { return std::move(stack[frames.back().sp]); } - sharedOpt frameEntryAt(unsigned int position) { + optionalNode frameEntryAt(unsigned int position) { auto i = frames.back().initialSp + position; if (i > frames.back().sp) return nullptr; return stack[i]; } - void push(const shared &type) { + void push(const node &type) { // type->ip = ip; // if (frames.back().sp >= stack.size()) { // stack.push_back(type); @@ -554,7 +554,7 @@ namespace tr::vm { subroutine->module->errors.push_back(message); } - void report(const string &message, const shared node) { + void report(const string &message, const node node) { report(DiagnosticMessage(message, node->ip)); } @@ -763,7 +763,7 @@ namespace tr::vm { // case OP::CallExpression: { // const auto parameterAmount = subroutine->parseUint16(); // -// span> parameters{stack.data() + frames.back().sp - parameterAmount, parameterAmount}; +// span> parameters{stack.data() + frames.back().sp - parameterAmount, parameterAmount}; // frames.back().sp -= parameterAmount; // // auto typeToCall = pop(); @@ -1075,7 +1075,7 @@ namespace tr::vm { auto templateType = make_shared(); bool hasPlaceholder = false; // let lastLiteral: { kind: TypeKind::literal, literal: string, parent?: Type } | undefined = undefined; - sharedOpt lastLiteral; + optionalNode lastLiteral; //merge a combination of types, e.g. [string, 'abc', '3'] as template literal => `${string}abc3`. for (auto &&item: combination) { @@ -1120,7 +1120,7 @@ namespace tr::vm { push(t); } - void pushObjectLiteralTypes(shared &type, const span> &types) { + void pushObjectLiteralTypes(node &type, const span> &types) { for (auto &&member: types) { switch (member->kind) { case TypeKind::Never: { diff --git a/src/checker/vm2.cpp b/src/checker/vm2.cpp index 889a6d8..9775bb3 100644 --- a/src/checker/vm2.cpp +++ b/src/checker/vm2.cpp @@ -5,7 +5,7 @@ #include "Tracy.hpp" namespace tr::vm2 { - void prepare(shared &module) { + void prepare(shared_ptr &module) { parseHeader(module); subroutine = activeSubroutines.reset(); subroutine->module = module.get(); @@ -156,6 +156,11 @@ namespace tr::vm2 { gc((Type *) type->type); break; } + case TypeKind::ClassInstance: { + ((Type *) type->type)->refCount--; + gc((Type *) type->type); + break; + } } } @@ -294,7 +299,7 @@ namespace tr::vm2 { /** * Unuse all cached types of subroutines and make them available for GC. */ - void clear(shared &module) { + void clear(shared_ptr &module) { for (auto &&subroutine: module->subroutines) { if (subroutine.result) drop(subroutine.result); if (subroutine.narrowed) drop(subroutine.narrowed); @@ -427,6 +432,7 @@ namespace tr::vm2 { for (unsigned int i = 0; iinitialSp + i]); } + return nextSubroutine; } inline bool call(unsigned int address, unsigned int arguments) { @@ -461,7 +467,8 @@ namespace tr::vm2 { Type *resolveObjectIndexType(Type *object, Type *index) { switch (index->kind) { case TypeKind::Literal: { - auto member = findChild(object, index->hash); + auto container = object->kind == TypeKind::ClassInstance ? (Type *) object->type : object; + auto member = findChild(container, index->hash); if (!member) { return allocate(TypeKind::Never); } @@ -497,6 +504,9 @@ namespace tr::vm2 { } return allocate(TypeKind::Never); } + default: { + throw std::runtime_error("Cannot resolve object index"); + } } } @@ -823,7 +833,7 @@ namespace tr::vm2 { auto &bin = subroutine->module->bin; while (true) { ZoneScoped; - //std::chrono::duration took = std::chrono::high_resolution_clock::now() - start; + //std::cron::duration took = std::chrono::high_resolution_clock::now() - start; //fmt::print(" - took {:.9f}ms\n", took.count()); //start = std::chrono::high_resolution_clock::now(); //fmt::print("[{}:{}] OP {} {}\n", subroutine->depth, subroutine->depth, subroutine->ip, (OP) bin[subroutine->ip]); @@ -925,22 +935,6 @@ namespace tr::vm2 { } break; } - case OP::New: { - const auto arguments = subroutine->parseUint16(); - auto ref = pop(); //Class/Object with constructor signature - - switch (ref->kind) { - case TypeKind::ClassInstance: { - report("Can not call new on a class instance."); - break; - } - case TypeKind::Class: { - //todo: convert to ClassInstance. Do we really have to copy all TypeRef? - //push() - } - } - break; - } case OP::Static: { stack[sp - 1]->flag |= TypeFlag::Static; break; @@ -1413,8 +1407,8 @@ namespace tr::vm2 { auto container = pop(); //e.g. container.name switch (container->kind) { + case TypeKind::ClassInstance: case TypeKind::Class: { - //MyClass.name, static access auto type = indexAccess(container, name); push(type); break; @@ -1443,6 +1437,68 @@ namespace tr::vm2 { push(type); break; } + case OP::InferTypeArguments: { + break; + } + case OP::StartInferTypeArguments: { + const auto arguments = subroutine->parseUint16(); + auto ref = pop(); //Class/Object with constructor signature + + switch (ref->kind) { + case TypeKind::ClassRef: { + //instantiate class from constructor arguments + //`new MyClass(123)` + //ref->size contains the address to the subroutine of the class itself + //ref->type the address of the type inferring subroutine of the constructor + break; + } + case TypeKind::FunctionRef: { + //instantiate class from constructor arguments + //`doIt(123)` + //ref->size contains the address to the subroutine of the class itself + //ref->type the address of the type inferring subroutine of the constructor + break; + } + default: { + //todo look for constructor signature + report("Can not infer type arguments from given type"); + } + } + break; + break; + } + case OP::New: { + const auto arguments = subroutine->parseUint16(); + auto ref = pop(); //Class/Object with constructor signature + + switch (ref->kind) { + case TypeKind::ClassInstance: { + report("Can not call new on a class instance."); + break; + } + case TypeKind::Class: { + //todo: validate constructor arguments + auto type = allocate(TypeKind::ClassInstance); + type->type = use(ref); + push(type); + break; + } + case TypeKind::ClassRef: { + //instantiate class from constructor arguments + //`new MyClass(123)` + //todo: simply calling the ClassRef is not right. We need to transformer ClassRef to a ClassInstance + // and while doing so infer from passed JS `arguments` all type arguments. + call(ref->size, arguments); + + break; + } + default: { + //todo look for constructor signature + report("Can not 'new' given type"); + } + } + break; + } case OP::Class: { const auto size = subroutine->parseUint16(); auto type = allocate(TypeKind::Class); diff --git a/src/checker/vm2.h b/src/checker/vm2.h index 42d303c..d181d22 100644 --- a/src/checker/vm2.h +++ b/src/checker/vm2.h @@ -1,6 +1,5 @@ #pragma once -#include #include #include "./pool_single.h" #include "./pool_array.h" @@ -177,8 +176,8 @@ namespace tr::vm2 { void process(); - void clear(shared &module); - void prepare(shared &module); + void clear(shared_ptr &module); + void prepare(shared_ptr &module); void drop(Type *type); void drop(std::span *types); void gc(std::span *types); @@ -195,7 +194,7 @@ namespace tr::vm2 { std::span popFrame(); - static void run(shared module) { + static void run(shared_ptr module) { // profiler.clear(); // pool = MemoryPool(); // poolRef = MemoryPool(); @@ -210,7 +209,7 @@ namespace tr::vm2 { process(); } - void call(shared &module, unsigned int index = 0, unsigned int arguments = 0); + void call(shared_ptr &module, unsigned int index = 0, unsigned int arguments = 0); struct CStack { vector iterator; diff --git a/src/checker/vm3.h b/src/checker/vm3.h index ef8cb07..6a6e94a 100644 --- a/src/checker/vm3.h +++ b/src/checker/vm3.h @@ -59,7 +59,7 @@ namespace tr::vm3 { //// Main //// }; // -// void jump(shared &module) { +// void jump(node &module) { // //https://christopherschwaab.wordpress.com/2018/04/13/generating-a-threaded-arm-interpreter-with-templates/ // // We're using the GNU C, labels-as-values extension here. // void *prog[] = {&&PUSH, (void*)6, @@ -92,7 +92,7 @@ namespace tr::vm3 { // return; // } // -// void run(shared &module) { +// void run(node &module) { // program[0] = Noop; // program[1] = Jump; // program[2] = Halt; @@ -107,7 +107,7 @@ namespace tr::vm3 { // (*program[*ip])(); // } // -// void naive(shared &module) { +// void naive(node &module) { // prepare(module); // auto end = module->bin.size(); // auto &bin = module->bin; @@ -278,7 +278,7 @@ namespace tr::vm3 { //// int result = func(); // } // -// void jit(shared &module) { +// void jit(node &module) { //// a64::Compiler c; //// c.add(Jump); // diff --git a/src/core.h b/src/core.h index f9acffc..1636df1 100644 --- a/src/core.h +++ b/src/core.h @@ -38,17 +38,21 @@ namespace tr { string substring(const string &str, int start, optional end = {}); /** - * shared_ptr has optional semantic already built-in, so we use it instead of std::optional>, - * but instead of using shared_ptr directly, we use sharedOpt to make it clear that it can be empty. + * Used for AST optional nodes that are manually memory managed. It's necessary to check if(node) to make sure not to access invalid memory. */ template - using sharedOpt = shared_ptr; + using optionalNode = T*; /** - * Because shared_ptr is ugly. + * Used for AST nodes that are manually memory managed. */ template - using shared = shared_ptr; + using node = T*; + + template + T *reinterpret_node(node node) { + return reinterpret_cast(node); + } string replaceLeading(const string &text, const string &from, const string &to); @@ -145,7 +149,7 @@ namespace tr { } } } else { - return (*array).size() > 0; + return (*array).size()>0; } } return false; @@ -173,105 +177,116 @@ namespace tr { } template - inline bool has(std::set &s, T item) { - return s.find(item) != s.end(); - } - - template - inline bool has(vector &vector, T item) { - return find(vector.begin(), vector.end(), item) != vector.end(); - }; - - template - inline bool has(const vector &vector, T item) { - return find(vector.begin(), vector.end(), item) != vector.end(); - }; + inline bool has(std::set&s, T + item) { + return s. + find(item) + != s. + end(); +} - template - inline unordered_map combine( - const unordered_map &map1, - const unordered_map &map2 - ) { - unordered_map res(map1); - res.insert(map2.begin(), map2.end()); - return res; - } +template +inline bool has(vector &vector, T item) { + return find(vector.begin(), vector.end(), item) != vector.end(); +}; + +template +inline bool has(const vector &vector, T item) { + return find(vector.begin(), vector.end(), item) != vector.end(); +}; + +template +inline unordered_map combine( + const unordered_map &map1, + const unordered_map &map2 +) { + unordered_map res(map1); + res.insert(map2.begin(), map2.end()); + return res; +} - template - inline unordered_map reverse( - const unordered_map &map1 - ) { - unordered_map res; - for (auto &&i: map1) { - res[i.second] = i.first; - } - return res; +template +inline unordered_map reverse( + const unordered_map &map1 +) { + unordered_map res; + for (auto &&i: map1) { + res[i.second] = i.first; } + return res; +} - template - inline optional get(const unordered_map &m, K key) { - auto v = m.find(key); - if (v == m.end()) return std::nullopt; - return v->second; - } +template +inline optional get(const unordered_map &m, K key) { + auto v = m.find(key); + if (v == m.end()) return std::nullopt; + return v->second; +} - template - inline optional set(unordered_map &m, K key, T v) { +template +inline optional set(unordered_map &m, K key, T v) { // m.insert_or_assign(key, v); - throw std::runtime_error("not implemented"); - std::cout << "set map: " << key << ", " << v << "\n"; + throw std::runtime_error("not implemented"); + std::cout<<"set map: "< - inline bool has(unordered_map &map, T key) { - return map.find(key) != map.end(); - }; - - template - inline bool has(map &map, T key) { - return map.find(key) != map.end(); - }; - - template - inline void debug(T fmt, Args &&...args) { -// fmt::print(fmt, std::forward(args)...); - std::cout << fmt::format(fmt, std::forward(args)...) << "\n"; -// std::cout << fmt::format(fmt, args...) << "\n"; - } +} - inline std::chrono::duration benchRun(int iterations, const function &callback) { - auto start = std::chrono::high_resolution_clock::now(); - for (auto i = 0; i +inline bool has(unordered_map &map, T key) { + return map.find(key) != map.end(); +}; + +template +inline bool has(map &map, T key) { + return map.find(key) != map.end(); +}; + +//template +//inline void debug(T fmt, Args &&...args) { +//// fmt::print(fmt, std::forward(args)...); +// std::vformat(fmt, std::make_format_args(std::forward(args)...)); +// std::cout<(args)...)<<"\n"; +//// std::cout << fmt::format(fmt, args...) << "\n"; +//} + +template +inline void debug(fmt::format_string s, Args&&... args) +{ + std::cout << fmt::format(s, std::forward(args)...); +} - return std::chrono::high_resolution_clock::now() - start; +inline std::chrono::duration benchRun(int iterations, const function &callback) { + auto start = std::chrono::high_resolution_clock::now(); + for (auto i = 0; i &callback) { - auto took = benchRun(iterations, callback); - std::cout << fmt::format("{} {} iterations took {:.9f}ms, {:.9f}ms per iteration\n", title, iterations, took.count(), took.count()/iterations); - } + return std::chrono::high_resolution_clock::now() - start; +} - inline void bench(int iterations, const function &callback) { - bench("", iterations, callback); - } +inline void bench(string title, int iterations, const function &callback) { + auto took = benchRun(iterations, callback); + std::cout< &callback) { + bench("", iterations, callback); +} + +inline std::string red; +inline std::string green; +inline std::string yellow; +inline std::string cyan; +inline std::string magenta; +inline std::string reset; + +inline void enableColors() { + red = "\033[0;31m"; + green = "\033[1;32m"; + yellow = "\033[1;33m"; + cyan = "\033[0;36m"; + magenta = "\033[0;35m"; + reset = "\033[0m"; +} } diff --git a/src/diagnostic_messages.h b/src/diagnostic_messages.h index 439b789..4c33719 100644 --- a/src/diagnostic_messages.h +++ b/src/diagnostic_messages.h @@ -9,1839 +9,1839 @@ namespace tr { using types::DiagnosticMessage; using types::DiagnosticCategory; - inline shared diag(int code, DiagnosticCategory category, const std::string_view &key, const std::string_view &message, bool reportsUnnecessary = false, bool elidedInCompatabilityPyramid = false, bool reportsDeprecated = false) { + inline shared_ptr diag(int code, DiagnosticCategory category, const std::string_view &key, const std::string_view &message, bool reportsUnnecessary = false, bool elidedInCompatabilityPyramid = false, bool reportsDeprecated = false) { return std::make_shared(code, category, key, message, reportsUnnecessary, elidedInCompatabilityPyramid, reportsDeprecated); } namespace Diagnostics { - static shared Unterminated_string_literal(){ return diag(1002, DiagnosticCategory::Error, "Unterminated_string_literal_1002", "Unterminated string literal."); }; - static shared Identifier_expected(){ return diag(1003, DiagnosticCategory::Error, "Identifier_expected_1003", "Identifier expected."); }; - static shared _0_expected(){ return diag(1005, DiagnosticCategory::Error, "_0_expected_1005", "'{0}' expected."); }; - static shared A_file_cannot_have_a_reference_to_itself(){ return diag(1006, DiagnosticCategory::Error, "A_file_cannot_have_a_reference_to_itself_1006", "A file cannot have a reference to itself."); }; - static shared The_parser_expected_to_find_a_1_to_match_the_0_token_here(){ return diag(1007, DiagnosticCategory::Error, "The_parser_expected_to_find_a_1_to_match_the_0_token_here_1007", "The parser expected to find a '{1}' to match the '{0}' token here."); }; - static shared Trailing_comma_not_allowed(){ return diag(1009, DiagnosticCategory::Error, "Trailing_comma_not_allowed_1009", "Trailing comma not allowed."); }; - static shared Asterisk_Slash_expected(){ return diag(1010, DiagnosticCategory::Error, "Asterisk_Slash_expected_1010", "'*/' expected."); }; - static shared An_element_access_expression_should_take_an_argument(){ return diag(1011, DiagnosticCategory::Error, "An_element_access_expression_should_take_an_argument_1011", "An element access expression should take an argument."); }; - static shared Unexpected_token(){ return diag(1012, DiagnosticCategory::Error, "Unexpected_token_1012", "Unexpected token."); }; - static shared A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma(){ return diag(1013, DiagnosticCategory::Error, "A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma_1013", "A rest parameter or binding pattern may not have a trailing comma."); }; - static shared A_rest_parameter_must_be_last_in_a_parameter_list(){ return diag(1014, DiagnosticCategory::Error, "A_rest_parameter_must_be_last_in_a_parameter_list_1014", "A rest parameter must be last in a parameter list."); }; - static shared Parameter_cannot_have_question_mark_and_initializer(){ return diag(1015, DiagnosticCategory::Error, "Parameter_cannot_have_question_mark_and_initializer_1015", "Parameter cannot have question mark and initializer."); }; - static shared A_required_parameter_cannot_follow_an_optional_parameter(){ return diag(1016, DiagnosticCategory::Error, "A_required_parameter_cannot_follow_an_optional_parameter_1016", "A required parameter cannot follow an optional parameter."); }; - static shared An_index_signature_cannot_have_a_rest_parameter(){ return diag(1017, DiagnosticCategory::Error, "An_index_signature_cannot_have_a_rest_parameter_1017", "An index signature cannot have a rest parameter."); }; - static shared An_index_signature_parameter_cannot_have_an_accessibility_modifier(){ return diag(1018, DiagnosticCategory::Error, "An_index_signature_parameter_cannot_have_an_accessibility_modifier_1018", "An index signature parameter cannot have an accessibility modifier."); }; - static shared An_index_signature_parameter_cannot_have_a_question_mark(){ return diag(1019, DiagnosticCategory::Error, "An_index_signature_parameter_cannot_have_a_question_mark_1019", "An index signature parameter cannot have a question mark."); }; - static shared An_index_signature_parameter_cannot_have_an_initializer(){ return diag(1020, DiagnosticCategory::Error, "An_index_signature_parameter_cannot_have_an_initializer_1020", "An index signature parameter cannot have an initializer."); }; - static shared An_index_signature_must_have_a_type_annotation(){ return diag(1021, DiagnosticCategory::Error, "An_index_signature_must_have_a_type_annotation_1021", "An index signature must have a type annotation."); }; - static shared An_index_signature_parameter_must_have_a_type_annotation(){ return diag(1022, DiagnosticCategory::Error, "An_index_signature_parameter_must_have_a_type_annotation_1022", "An index signature parameter must have a type annotation."); }; - static shared readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature(){ return diag(1024, DiagnosticCategory::Error, "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024", "'readonly' modifier can only appear on a property declaration or index signature."); }; - static shared An_index_signature_cannot_have_a_trailing_comma(){ return diag(1025, DiagnosticCategory::Error, "An_index_signature_cannot_have_a_trailing_comma_1025", "An index signature cannot have a trailing comma."); }; - static shared Accessibility_modifier_already_seen(){ return diag(1028, DiagnosticCategory::Error, "Accessibility_modifier_already_seen_1028", "Accessibility modifier already seen."); }; - static shared _0_modifier_must_precede_1_modifier(){ return diag(1029, DiagnosticCategory::Error, "_0_modifier_must_precede_1_modifier_1029", "'{0}' modifier must precede '{1}' modifier."); }; - static shared _0_modifier_already_seen(){ return diag(1030, DiagnosticCategory::Error, "_0_modifier_already_seen_1030", "'{0}' modifier already seen."); }; - static shared _0_modifier_cannot_appear_on_class_elements_of_this_kind(){ return diag(1031, DiagnosticCategory::Error, "_0_modifier_cannot_appear_on_class_elements_of_this_kind_1031", "'{0}' modifier cannot appear on class elements of this kind."); }; - static shared super_must_be_followed_by_an_argument_list_or_member_access(){ return diag(1034, DiagnosticCategory::Error, "super_must_be_followed_by_an_argument_list_or_member_access_1034", "'super' must be followed by an argument list or member access."); }; - static shared Only_ambient_modules_can_use_quoted_names(){ return diag(1035, DiagnosticCategory::Error, "Only_ambient_modules_can_use_quoted_names_1035", "Only ambient modules can use quoted names."); }; - static shared Statements_are_not_allowed_in_ambient_contexts(){ return diag(1036, DiagnosticCategory::Error, "Statements_are_not_allowed_in_ambient_contexts_1036", "Statements are not allowed in ambient contexts."); }; - static shared A_declare_modifier_cannot_be_used_in_an_already_ambient_context(){ return diag(1038, DiagnosticCategory::Error, "A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038", "A 'declare' modifier cannot be used in an already ambient context."); }; - static shared Initializers_are_not_allowed_in_ambient_contexts(){ return diag(1039, DiagnosticCategory::Error, "Initializers_are_not_allowed_in_ambient_contexts_1039", "Initializers are not allowed in ambient contexts."); }; - static shared _0_modifier_cannot_be_used_in_an_ambient_context(){ return diag(1040, DiagnosticCategory::Error, "_0_modifier_cannot_be_used_in_an_ambient_context_1040", "'{0}' modifier cannot be used in an ambient context."); }; - static shared _0_modifier_cannot_be_used_here(){ return diag(1042, DiagnosticCategory::Error, "_0_modifier_cannot_be_used_here_1042", "'{0}' modifier cannot be used here."); }; - static shared _0_modifier_cannot_appear_on_a_module_or_namespace_element(){ return diag(1044, DiagnosticCategory::Error, "_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044", "'{0}' modifier cannot appear on a module or namespace element."); }; - static shared Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier(){ return diag(1046, DiagnosticCategory::Error, "Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046", "Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier."); }; - static shared A_rest_parameter_cannot_be_optional(){ return diag(1047, DiagnosticCategory::Error, "A_rest_parameter_cannot_be_optional_1047", "A rest parameter cannot be optional."); }; - static shared A_rest_parameter_cannot_have_an_initializer(){ return diag(1048, DiagnosticCategory::Error, "A_rest_parameter_cannot_have_an_initializer_1048", "A rest parameter cannot have an initializer."); }; - static shared A_set_accessor_must_have_exactly_one_parameter(){ return diag(1049, DiagnosticCategory::Error, "A_set_accessor_must_have_exactly_one_parameter_1049", "A 'set' accessor must have exactly one parameter."); }; - static shared A_set_accessor_cannot_have_an_optional_parameter(){ return diag(1051, DiagnosticCategory::Error, "A_set_accessor_cannot_have_an_optional_parameter_1051", "A 'set' accessor cannot have an optional parameter."); }; - static shared A_set_accessor_parameter_cannot_have_an_initializer(){ return diag(1052, DiagnosticCategory::Error, "A_set_accessor_parameter_cannot_have_an_initializer_1052", "A 'set' accessor parameter cannot have an initializer."); }; - static shared A_set_accessor_cannot_have_rest_parameter(){ return diag(1053, DiagnosticCategory::Error, "A_set_accessor_cannot_have_rest_parameter_1053", "A 'set' accessor cannot have rest parameter."); }; - static shared A_get_accessor_cannot_have_parameters(){ return diag(1054, DiagnosticCategory::Error, "A_get_accessor_cannot_have_parameters_1054", "A 'get' accessor cannot have parameters."); }; - static shared Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value(){ return diag(1055, DiagnosticCategory::Error, "Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055", "Type '{0}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value."); }; - static shared Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher(){ return diag(1056, DiagnosticCategory::Error, "Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056", "Accessors are only available when targeting ECMAScript 5 and higher."); }; - static shared The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member(){ return diag(1058, DiagnosticCategory::Error, "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058", "The return type of an async function must either be a valid promise or must not contain a callable 'then' member."); }; - static shared A_promise_must_have_a_then_method(){ return diag(1059, DiagnosticCategory::Error, "A_promise_must_have_a_then_method_1059", "A promise must have a 'then' method."); }; - static shared The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback(){ return diag(1060, DiagnosticCategory::Error, "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060", "The first parameter of the 'then' method of a promise must be a callback."); }; - static shared Enum_member_must_have_initializer(){ return diag(1061, DiagnosticCategory::Error, "Enum_member_must_have_initializer_1061", "Enum member must have initializer."); }; - static shared Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method(){ return diag(1062, DiagnosticCategory::Error, "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062", "Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method."); }; - static shared An_export_assignment_cannot_be_used_in_a_namespace(){ return diag(1063, DiagnosticCategory::Error, "An_export_assignment_cannot_be_used_in_a_namespace_1063", "An export assignment cannot be used in a namespace."); }; - static shared The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0(){ return diag(1064, DiagnosticCategory::Error, "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_wri_1064", "The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{0}>'?"); }; - static shared In_ambient_enum_declarations_member_initializer_must_be_constant_expression(){ return diag(1066, DiagnosticCategory::Error, "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066", "In ambient enum declarations member initializer must be constant expression."); }; - static shared Unexpected_token_A_constructor_method_accessor_or_property_was_expected(){ return diag(1068, DiagnosticCategory::Error, "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068", "Unexpected token. A constructor, method, accessor, or property was expected."); }; - static shared Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces(){ return diag(1069, DiagnosticCategory::Error, "Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069", "Unexpected token. A type parameter name was expected without curly braces."); }; - static shared _0_modifier_cannot_appear_on_a_type_member(){ return diag(1070, DiagnosticCategory::Error, "_0_modifier_cannot_appear_on_a_type_member_1070", "'{0}' modifier cannot appear on a type member."); }; - static shared _0_modifier_cannot_appear_on_an_index_signature(){ return diag(1071, DiagnosticCategory::Error, "_0_modifier_cannot_appear_on_an_index_signature_1071", "'{0}' modifier cannot appear on an index signature."); }; - static shared A_0_modifier_cannot_be_used_with_an_import_declaration(){ return diag(1079, DiagnosticCategory::Error, "A_0_modifier_cannot_be_used_with_an_import_declaration_1079", "A '{0}' modifier cannot be used with an import declaration."); }; - static shared Invalid_reference_directive_syntax(){ return diag(1084, DiagnosticCategory::Error, "Invalid_reference_directive_syntax_1084", "Invalid 'reference' directive syntax."); }; - static shared Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0(){ return diag(1085, DiagnosticCategory::Error, "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085", "Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '{0}'."); }; - static shared _0_modifier_cannot_appear_on_a_constructor_declaration(){ return diag(1089, DiagnosticCategory::Error, "_0_modifier_cannot_appear_on_a_constructor_declaration_1089", "'{0}' modifier cannot appear on a constructor declaration."); }; - static shared _0_modifier_cannot_appear_on_a_parameter(){ return diag(1090, DiagnosticCategory::Error, "_0_modifier_cannot_appear_on_a_parameter_1090", "'{0}' modifier cannot appear on a parameter."); }; - static shared Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement(){ return diag(1091, DiagnosticCategory::Error, "Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091", "Only a single variable declaration is allowed in a 'for...in' statement."); }; - static shared Type_parameters_cannot_appear_on_a_constructor_declaration(){ return diag(1092, DiagnosticCategory::Error, "Type_parameters_cannot_appear_on_a_constructor_declaration_1092", "Type parameters cannot appear on a constructor declaration."); }; - static shared Type_annotation_cannot_appear_on_a_constructor_declaration(){ return diag(1093, DiagnosticCategory::Error, "Type_annotation_cannot_appear_on_a_constructor_declaration_1093", "Type annotation cannot appear on a constructor declaration."); }; - static shared An_accessor_cannot_have_type_parameters(){ return diag(1094, DiagnosticCategory::Error, "An_accessor_cannot_have_type_parameters_1094", "An accessor cannot have type parameters."); }; - static shared A_set_accessor_cannot_have_a_return_type_annotation(){ return diag(1095, DiagnosticCategory::Error, "A_set_accessor_cannot_have_a_return_type_annotation_1095", "A 'set' accessor cannot have a return type annotation."); }; - static shared An_index_signature_must_have_exactly_one_parameter(){ return diag(1096, DiagnosticCategory::Error, "An_index_signature_must_have_exactly_one_parameter_1096", "An index signature must have exactly one parameter."); }; - static shared _0_list_cannot_be_empty(){ return diag(1097, DiagnosticCategory::Error, "_0_list_cannot_be_empty_1097", "'{0}' list cannot be empty."); }; - static shared Type_parameter_list_cannot_be_empty(){ return diag(1098, DiagnosticCategory::Error, "Type_parameter_list_cannot_be_empty_1098", "Type parameter list cannot be empty."); }; - static shared Type_argument_list_cannot_be_empty(){ return diag(1099, DiagnosticCategory::Error, "Type_argument_list_cannot_be_empty_1099", "Type argument list cannot be empty."); }; - static shared Invalid_use_of_0_in_strict_mode(){ return diag(1100, DiagnosticCategory::Error, "Invalid_use_of_0_in_strict_mode_1100", "Invalid use of '{0}' in strict mode."); }; - static shared with_statements_are_not_allowed_in_strict_mode(){ return diag(1101, DiagnosticCategory::Error, "with_statements_are_not_allowed_in_strict_mode_1101", "'with' statements are not allowed in strict mode."); }; - static shared delete_cannot_be_called_on_an_identifier_in_strict_mode(){ return diag(1102, DiagnosticCategory::Error, "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102", "'delete' cannot be called on an identifier in strict mode."); }; - static shared for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules(){ return diag(1103, DiagnosticCategory::Error, "for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1103", "'for await' loops are only allowed within async functions and at the top levels of modules."); }; - static shared A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement(){ return diag(1104, DiagnosticCategory::Error, "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104", "A 'continue' statement can only be used within an enclosing iteration statement."); }; - static shared A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement(){ return diag(1105, DiagnosticCategory::Error, "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105", "A 'break' statement can only be used within an enclosing iteration or switch statement."); }; - static shared The_left_hand_side_of_a_for_of_statement_may_not_be_async(){ return diag(1106, DiagnosticCategory::Error, "The_left_hand_side_of_a_for_of_statement_may_not_be_async_1106", "The left-hand side of a 'for...of' statement may not be 'async'."); }; - static shared Jump_target_cannot_cross_function_boundary(){ return diag(1107, DiagnosticCategory::Error, "Jump_target_cannot_cross_function_boundary_1107", "Jump target cannot cross function boundary."); }; - static shared A_return_statement_can_only_be_used_within_a_function_body(){ return diag(1108, DiagnosticCategory::Error, "A_return_statement_can_only_be_used_within_a_function_body_1108", "A 'return' statement can only be used within a function body."); }; - static shared Expression_expected(){ return diag(1109, DiagnosticCategory::Error, "Expression_expected_1109", "Expression expected."); }; - static shared Type_expected(){ return diag(1110, DiagnosticCategory::Error, "Type_expected_1110", "Type expected."); }; - static shared A_default_clause_cannot_appear_more_than_once_in_a_switch_statement(){ return diag(1113, DiagnosticCategory::Error, "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113", "A 'default' clause cannot appear more than once in a 'switch' statement."); }; - static shared Duplicate_label_0(){ return diag(1114, DiagnosticCategory::Error, "Duplicate_label_0_1114", "Duplicate label '{0}'."); }; - static shared A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement(){ return diag(1115, DiagnosticCategory::Error, "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115", "A 'continue' statement can only jump to a label of an enclosing iteration statement."); }; - static shared A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement(){ return diag(1116, DiagnosticCategory::Error, "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116", "A 'break' statement can only jump to a label of an enclosing statement."); }; - static shared An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode(){ return diag(1117, DiagnosticCategory::Error, "An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117", "An object literal cannot have multiple properties with the same name in strict mode."); }; - static shared An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name(){ return diag(1118, DiagnosticCategory::Error, "An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118", "An object literal cannot have multiple get/set accessors with the same name."); }; - static shared An_object_literal_cannot_have_property_and_accessor_with_the_same_name(){ return diag(1119, DiagnosticCategory::Error, "An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119", "An object literal cannot have property and accessor with the same name."); }; - static shared An_export_assignment_cannot_have_modifiers(){ return diag(1120, DiagnosticCategory::Error, "An_export_assignment_cannot_have_modifiers_1120", "An export assignment cannot have modifiers."); }; - static shared Octal_literals_are_not_allowed_in_strict_mode(){ return diag(1121, DiagnosticCategory::Error, "Octal_literals_are_not_allowed_in_strict_mode_1121", "Octal literals are not allowed in strict mode."); }; - static shared Variable_declaration_list_cannot_be_empty(){ return diag(1123, DiagnosticCategory::Error, "Variable_declaration_list_cannot_be_empty_1123", "Variable declaration list cannot be empty."); }; - static shared Digit_expected(){ return diag(1124, DiagnosticCategory::Error, "Digit_expected_1124", "Digit expected."); }; - static shared Hexadecimal_digit_expected(){ return diag(1125, DiagnosticCategory::Error, "Hexadecimal_digit_expected_1125", "Hexadecimal digit expected."); }; - static shared Unexpected_end_of_text(){ return diag(1126, DiagnosticCategory::Error, "Unexpected_end_of_text_1126", "Unexpected end of text."); }; - static shared Invalid_character(){ return diag(1127, DiagnosticCategory::Error, "Invalid_character_1127", "Invalid character."); }; - static shared Declaration_or_statement_expected(){ return diag(1128, DiagnosticCategory::Error, "Declaration_or_statement_expected_1128", "Declaration or statement expected."); }; - static shared Statement_expected(){ return diag(1129, DiagnosticCategory::Error, "Statement_expected_1129", "Statement expected."); }; - static shared case_or_default_expected(){ return diag(1130, DiagnosticCategory::Error, "case_or_default_expected_1130", "'case' or 'default' expected."); }; - static shared Property_or_signature_expected(){ return diag(1131, DiagnosticCategory::Error, "Property_or_signature_expected_1131", "Property or signature expected."); }; - static shared Enum_member_expected(){ return diag(1132, DiagnosticCategory::Error, "Enum_member_expected_1132", "Enum member expected."); }; - static shared Variable_declaration_expected(){ return diag(1134, DiagnosticCategory::Error, "Variable_declaration_expected_1134", "Variable declaration expected."); }; - static shared Argument_expression_expected(){ return diag(1135, DiagnosticCategory::Error, "Argument_expression_expected_1135", "Argument expression expected."); }; - static shared Property_assignment_expected(){ return diag(1136, DiagnosticCategory::Error, "Property_assignment_expected_1136", "Property assignment expected."); }; - static shared Expression_or_comma_expected(){ return diag(1137, DiagnosticCategory::Error, "Expression_or_comma_expected_1137", "Expression or comma expected."); }; - static shared Parameter_declaration_expected(){ return diag(1138, DiagnosticCategory::Error, "Parameter_declaration_expected_1138", "Parameter declaration expected."); }; - static shared Type_parameter_declaration_expected(){ return diag(1139, DiagnosticCategory::Error, "Type_parameter_declaration_expected_1139", "Type parameter declaration expected."); }; - static shared Type_argument_expected(){ return diag(1140, DiagnosticCategory::Error, "Type_argument_expected_1140", "Type argument expected."); }; - static shared String_literal_expected(){ return diag(1141, DiagnosticCategory::Error, "String_literal_expected_1141", "String literal expected."); }; - static shared Line_break_not_permitted_here(){ return diag(1142, DiagnosticCategory::Error, "Line_break_not_permitted_here_1142", "Line break not permitted here."); }; - static shared or_expected(){ return diag(1144, DiagnosticCategory::Error, "or_expected_1144", "'{' or ';' expected."); }; - static shared or_JSX_element_expected(){ return diag(1145, DiagnosticCategory::Error, "or_JSX_element_expected_1145", "{' or JSX element expected."); }; - static shared Declaration_expected(){ return diag(1146, DiagnosticCategory::Error, "Declaration_expected_1146", "Declaration expected."); }; - static shared Import_declarations_in_a_namespace_cannot_reference_a_module(){ return diag(1147, DiagnosticCategory::Error, "Import_declarations_in_a_namespace_cannot_reference_a_module_1147", "Import declarations in a namespace cannot reference a module."); }; - static shared Cannot_use_imports_exports_or_module_augmentations_when_module_is_none(){ return diag(1148, DiagnosticCategory::Error, "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148", "Cannot use imports, exports, or module augmentations when '--module' is 'none'."); }; - static shared File_name_0_differs_from_already_included_file_name_1_only_in_casing(){ return diag(1149, DiagnosticCategory::Error, "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149", "File name '{0}' differs from already included file name '{1}' only in casing."); }; - static shared const_declarations_must_be_initialized(){ return diag(1155, DiagnosticCategory::Error, "const_declarations_must_be_initialized_1155", "'const' declarations must be initialized."); }; - static shared const_declarations_can_only_be_declared_inside_a_block(){ return diag(1156, DiagnosticCategory::Error, "const_declarations_can_only_be_declared_inside_a_block_1156", "'const' declarations can only be declared inside a block."); }; - static shared let_declarations_can_only_be_declared_inside_a_block(){ return diag(1157, DiagnosticCategory::Error, "let_declarations_can_only_be_declared_inside_a_block_1157", "'let' declarations can only be declared inside a block."); }; - static shared Unterminated_template_literal(){ return diag(1160, DiagnosticCategory::Error, "Unterminated_template_literal_1160", "Unterminated template literal."); }; - static shared Unterminated_regular_expression_literal(){ return diag(1161, DiagnosticCategory::Error, "Unterminated_regular_expression_literal_1161", "Unterminated regular expression literal."); }; - static shared An_object_member_cannot_be_declared_optional(){ return diag(1162, DiagnosticCategory::Error, "An_object_member_cannot_be_declared_optional_1162", "An object member cannot be declared optional."); }; - static shared A_yield_expression_is_only_allowed_in_a_generator_body(){ return diag(1163, DiagnosticCategory::Error, "A_yield_expression_is_only_allowed_in_a_generator_body_1163", "A 'yield' expression is only allowed in a generator body."); }; - static shared Computed_property_names_are_not_allowed_in_enums(){ return diag(1164, DiagnosticCategory::Error, "Computed_property_names_are_not_allowed_in_enums_1164", "Computed property names are not allowed in enums."); }; - static shared A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type(){ return diag(1165, DiagnosticCategory::Error, "A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165", "A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type."); }; - static shared A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type(){ return diag(1166, DiagnosticCategory::Error, "A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_1166", "A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type."); }; - static shared A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type(){ return diag(1168, DiagnosticCategory::Error, "A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_ty_1168", "A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type."); }; - static shared A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type(){ return diag(1169, DiagnosticCategory::Error, "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169", "A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type."); }; - static shared A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type(){ return diag(1170, DiagnosticCategory::Error, "A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type__1170", "A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type."); }; - static shared A_comma_expression_is_not_allowed_in_a_computed_property_name(){ return diag(1171, DiagnosticCategory::Error, "A_comma_expression_is_not_allowed_in_a_computed_property_name_1171", "A comma expression is not allowed in a computed property name."); }; - static shared extends_clause_already_seen(){ return diag(1172, DiagnosticCategory::Error, "extends_clause_already_seen_1172", "'extends' clause already seen."); }; - static shared extends_clause_must_precede_implements_clause(){ return diag(1173, DiagnosticCategory::Error, "extends_clause_must_precede_implements_clause_1173", "'extends' clause must precede 'implements' clause."); }; - static shared Classes_can_only_extend_a_single_class(){ return diag(1174, DiagnosticCategory::Error, "Classes_can_only_extend_a_single_class_1174", "Classes can only extend a single class."); }; - static shared implements_clause_already_seen(){ return diag(1175, DiagnosticCategory::Error, "implements_clause_already_seen_1175", "'implements' clause already seen."); }; - static shared Interface_declaration_cannot_have_implements_clause(){ return diag(1176, DiagnosticCategory::Error, "Interface_declaration_cannot_have_implements_clause_1176", "Interface declaration cannot have 'implements' clause."); }; - static shared Binary_digit_expected(){ return diag(1177, DiagnosticCategory::Error, "Binary_digit_expected_1177", "Binary digit expected."); }; - static shared Octal_digit_expected(){ return diag(1178, DiagnosticCategory::Error, "Octal_digit_expected_1178", "Octal digit expected."); }; - static shared Unexpected_token_expected(){ return diag(1179, DiagnosticCategory::Error, "Unexpected_token_expected_1179", "Unexpected token. '{' expected."); }; - static shared Property_destructuring_pattern_expected(){ return diag(1180, DiagnosticCategory::Error, "Property_destructuring_pattern_expected_1180", "Property destructuring pattern expected."); }; - static shared Array_element_destructuring_pattern_expected(){ return diag(1181, DiagnosticCategory::Error, "Array_element_destructuring_pattern_expected_1181", "Array element destructuring pattern expected."); }; - static shared A_destructuring_declaration_must_have_an_initializer(){ return diag(1182, DiagnosticCategory::Error, "A_destructuring_declaration_must_have_an_initializer_1182", "A destructuring declaration must have an initializer."); }; - static shared An_implementation_cannot_be_declared_in_ambient_contexts(){ return diag(1183, DiagnosticCategory::Error, "An_implementation_cannot_be_declared_in_ambient_contexts_1183", "An implementation cannot be declared in ambient contexts."); }; - static shared Modifiers_cannot_appear_here(){ return diag(1184, DiagnosticCategory::Error, "Modifiers_cannot_appear_here_1184", "Modifiers cannot appear here."); }; - static shared Merge_conflict_marker_encountered(){ return diag(1185, DiagnosticCategory::Error, "Merge_conflict_marker_encountered_1185", "Merge conflict marker encountered."); }; - static shared A_rest_element_cannot_have_an_initializer(){ return diag(1186, DiagnosticCategory::Error, "A_rest_element_cannot_have_an_initializer_1186", "A rest element cannot have an initializer."); }; - static shared A_parameter_property_may_not_be_declared_using_a_binding_pattern(){ return diag(1187, DiagnosticCategory::Error, "A_parameter_property_may_not_be_declared_using_a_binding_pattern_1187", "A parameter property may not be declared using a binding pattern."); }; - static shared Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement(){ return diag(1188, DiagnosticCategory::Error, "Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188", "Only a single variable declaration is allowed in a 'for...of' statement."); }; - static shared The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer(){ return diag(1189, DiagnosticCategory::Error, "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189", "The variable declaration of a 'for...in' statement cannot have an initializer."); }; - static shared The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer(){ return diag(1190, DiagnosticCategory::Error, "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190", "The variable declaration of a 'for...of' statement cannot have an initializer."); }; - static shared An_import_declaration_cannot_have_modifiers(){ return diag(1191, DiagnosticCategory::Error, "An_import_declaration_cannot_have_modifiers_1191", "An import declaration cannot have modifiers."); }; - static shared Module_0_has_no_default_export(){ return diag(1192, DiagnosticCategory::Error, "Module_0_has_no_default_export_1192", "Module '{0}' has no default export."); }; - static shared An_export_declaration_cannot_have_modifiers(){ return diag(1193, DiagnosticCategory::Error, "An_export_declaration_cannot_have_modifiers_1193", "An export declaration cannot have modifiers."); }; - static shared Export_declarations_are_not_permitted_in_a_namespace(){ return diag(1194, DiagnosticCategory::Error, "Export_declarations_are_not_permitted_in_a_namespace_1194", "Export declarations are not permitted in a namespace."); }; - static shared export_Asterisk_does_not_re_export_a_default(){ return diag(1195, DiagnosticCategory::Error, "export_Asterisk_does_not_re_export_a_default_1195", "'export *' does not re-export a default."); }; - static shared Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified(){ return diag(1196, DiagnosticCategory::Error, "Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified_1196", "Catch clause variable type annotation must be 'any' or 'unknown' if specified."); }; - static shared Catch_clause_variable_cannot_have_an_initializer(){ return diag(1197, DiagnosticCategory::Error, "Catch_clause_variable_cannot_have_an_initializer_1197", "Catch clause variable cannot have an initializer."); }; - static shared An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive(){ return diag(1198, DiagnosticCategory::Error, "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198", "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive."); }; - static shared Unterminated_Unicode_escape_sequence(){ return diag(1199, DiagnosticCategory::Error, "Unterminated_Unicode_escape_sequence_1199", "Unterminated Unicode escape sequence."); }; - static shared Line_terminator_not_permitted_before_arrow(){ return diag(1200, DiagnosticCategory::Error, "Line_terminator_not_permitted_before_arrow_1200", "Line terminator not permitted before arrow."); }; - static shared Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead(){ return diag(1202, DiagnosticCategory::Error, "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202", + static shared_ptr Unterminated_string_literal(){ return diag(1002, DiagnosticCategory::Error, "Unterminated_string_literal_1002", "Unterminated string literal."); }; + static shared_ptr Identifier_expected(){ return diag(1003, DiagnosticCategory::Error, "Identifier_expected_1003", "Identifier expected."); }; + static shared_ptr _0_expected(){ return diag(1005, DiagnosticCategory::Error, "_0_expected_1005", "'{0}' expected."); }; + static shared_ptr A_file_cannot_have_a_reference_to_itself(){ return diag(1006, DiagnosticCategory::Error, "A_file_cannot_have_a_reference_to_itself_1006", "A file cannot have a reference to itself."); }; + static shared_ptr The_parser_expected_to_find_a_1_to_match_the_0_token_here(){ return diag(1007, DiagnosticCategory::Error, "The_parser_expected_to_find_a_1_to_match_the_0_token_here_1007", "The parser expected to find a '{1}' to match the '{0}' token here."); }; + static shared_ptr Trailing_comma_not_allowed(){ return diag(1009, DiagnosticCategory::Error, "Trailing_comma_not_allowed_1009", "Trailing comma not allowed."); }; + static shared_ptr Asterisk_Slash_expected(){ return diag(1010, DiagnosticCategory::Error, "Asterisk_Slash_expected_1010", "'*/' expected."); }; + static shared_ptr An_element_access_expression_should_take_an_argument(){ return diag(1011, DiagnosticCategory::Error, "An_element_access_expression_should_take_an_argument_1011", "An element access expression should take an argument."); }; + static shared_ptr Unexpected_token(){ return diag(1012, DiagnosticCategory::Error, "Unexpected_token_1012", "Unexpected token."); }; + static shared_ptr A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma(){ return diag(1013, DiagnosticCategory::Error, "A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma_1013", "A rest parameter or binding pattern may not have a trailing comma."); }; + static shared_ptr A_rest_parameter_must_be_last_in_a_parameter_list(){ return diag(1014, DiagnosticCategory::Error, "A_rest_parameter_must_be_last_in_a_parameter_list_1014", "A rest parameter must be last in a parameter list."); }; + static shared_ptr Parameter_cannot_have_question_mark_and_initializer(){ return diag(1015, DiagnosticCategory::Error, "Parameter_cannot_have_question_mark_and_initializer_1015", "Parameter cannot have question mark and initializer."); }; + static shared_ptr A_required_parameter_cannot_follow_an_optional_parameter(){ return diag(1016, DiagnosticCategory::Error, "A_required_parameter_cannot_follow_an_optional_parameter_1016", "A required parameter cannot follow an optional parameter."); }; + static shared_ptr An_index_signature_cannot_have_a_rest_parameter(){ return diag(1017, DiagnosticCategory::Error, "An_index_signature_cannot_have_a_rest_parameter_1017", "An index signature cannot have a rest parameter."); }; + static shared_ptr An_index_signature_parameter_cannot_have_an_accessibility_modifier(){ return diag(1018, DiagnosticCategory::Error, "An_index_signature_parameter_cannot_have_an_accessibility_modifier_1018", "An index signature parameter cannot have an accessibility modifier."); }; + static shared_ptr An_index_signature_parameter_cannot_have_a_question_mark(){ return diag(1019, DiagnosticCategory::Error, "An_index_signature_parameter_cannot_have_a_question_mark_1019", "An index signature parameter cannot have a question mark."); }; + static shared_ptr An_index_signature_parameter_cannot_have_an_initializer(){ return diag(1020, DiagnosticCategory::Error, "An_index_signature_parameter_cannot_have_an_initializer_1020", "An index signature parameter cannot have an initializer."); }; + static shared_ptr An_index_signature_must_have_a_type_annotation(){ return diag(1021, DiagnosticCategory::Error, "An_index_signature_must_have_a_type_annotation_1021", "An index signature must have a type annotation."); }; + static shared_ptr An_index_signature_parameter_must_have_a_type_annotation(){ return diag(1022, DiagnosticCategory::Error, "An_index_signature_parameter_must_have_a_type_annotation_1022", "An index signature parameter must have a type annotation."); }; + static shared_ptr readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature(){ return diag(1024, DiagnosticCategory::Error, "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024", "'readonly' modifier can only appear on a property declaration or index signature."); }; + static shared_ptr An_index_signature_cannot_have_a_trailing_comma(){ return diag(1025, DiagnosticCategory::Error, "An_index_signature_cannot_have_a_trailing_comma_1025", "An index signature cannot have a trailing comma."); }; + static shared_ptr Accessibility_modifier_already_seen(){ return diag(1028, DiagnosticCategory::Error, "Accessibility_modifier_already_seen_1028", "Accessibility modifier already seen."); }; + static shared_ptr _0_modifier_must_precede_1_modifier(){ return diag(1029, DiagnosticCategory::Error, "_0_modifier_must_precede_1_modifier_1029", "'{0}' modifier must precede '{1}' modifier."); }; + static shared_ptr _0_modifier_already_seen(){ return diag(1030, DiagnosticCategory::Error, "_0_modifier_already_seen_1030", "'{0}' modifier already seen."); }; + static shared_ptr _0_modifier_cannot_appear_on_class_elements_of_this_kind(){ return diag(1031, DiagnosticCategory::Error, "_0_modifier_cannot_appear_on_class_elements_of_this_kind_1031", "'{0}' modifier cannot appear on class elements of this kind."); }; + static shared_ptr super_must_be_followed_by_an_argument_list_or_member_access(){ return diag(1034, DiagnosticCategory::Error, "super_must_be_followed_by_an_argument_list_or_member_access_1034", "'super' must be followed by an argument list or member access."); }; + static shared_ptr Only_ambient_modules_can_use_quoted_names(){ return diag(1035, DiagnosticCategory::Error, "Only_ambient_modules_can_use_quoted_names_1035", "Only ambient modules can use quoted names."); }; + static shared_ptr Statements_are_not_allowed_in_ambient_contexts(){ return diag(1036, DiagnosticCategory::Error, "Statements_are_not_allowed_in_ambient_contexts_1036", "Statements are not allowed in ambient contexts."); }; + static shared_ptr A_declare_modifier_cannot_be_used_in_an_already_ambient_context(){ return diag(1038, DiagnosticCategory::Error, "A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038", "A 'declare' modifier cannot be used in an already ambient context."); }; + static shared_ptr Initializers_are_not_allowed_in_ambient_contexts(){ return diag(1039, DiagnosticCategory::Error, "Initializers_are_not_allowed_in_ambient_contexts_1039", "Initializers are not allowed in ambient contexts."); }; + static shared_ptr _0_modifier_cannot_be_used_in_an_ambient_context(){ return diag(1040, DiagnosticCategory::Error, "_0_modifier_cannot_be_used_in_an_ambient_context_1040", "'{0}' modifier cannot be used in an ambient context."); }; + static shared_ptr _0_modifier_cannot_be_used_here(){ return diag(1042, DiagnosticCategory::Error, "_0_modifier_cannot_be_used_here_1042", "'{0}' modifier cannot be used here."); }; + static shared_ptr _0_modifier_cannot_appear_on_a_module_or_namespace_element(){ return diag(1044, DiagnosticCategory::Error, "_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044", "'{0}' modifier cannot appear on a module or namespace element."); }; + static shared_ptr Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier(){ return diag(1046, DiagnosticCategory::Error, "Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046", "Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier."); }; + static shared_ptr A_rest_parameter_cannot_be_optional(){ return diag(1047, DiagnosticCategory::Error, "A_rest_parameter_cannot_be_optional_1047", "A rest parameter cannot be optional."); }; + static shared_ptr A_rest_parameter_cannot_have_an_initializer(){ return diag(1048, DiagnosticCategory::Error, "A_rest_parameter_cannot_have_an_initializer_1048", "A rest parameter cannot have an initializer."); }; + static shared_ptr A_set_accessor_must_have_exactly_one_parameter(){ return diag(1049, DiagnosticCategory::Error, "A_set_accessor_must_have_exactly_one_parameter_1049", "A 'set' accessor must have exactly one parameter."); }; + static shared_ptr A_set_accessor_cannot_have_an_optional_parameter(){ return diag(1051, DiagnosticCategory::Error, "A_set_accessor_cannot_have_an_optional_parameter_1051", "A 'set' accessor cannot have an optional parameter."); }; + static shared_ptr A_set_accessor_parameter_cannot_have_an_initializer(){ return diag(1052, DiagnosticCategory::Error, "A_set_accessor_parameter_cannot_have_an_initializer_1052", "A 'set' accessor parameter cannot have an initializer."); }; + static shared_ptr A_set_accessor_cannot_have_rest_parameter(){ return diag(1053, DiagnosticCategory::Error, "A_set_accessor_cannot_have_rest_parameter_1053", "A 'set' accessor cannot have rest parameter."); }; + static shared_ptr A_get_accessor_cannot_have_parameters(){ return diag(1054, DiagnosticCategory::Error, "A_get_accessor_cannot_have_parameters_1054", "A 'get' accessor cannot have parameters."); }; + static shared_ptr Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value(){ return diag(1055, DiagnosticCategory::Error, "Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055", "Type '{0}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value."); }; + static shared_ptr Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher(){ return diag(1056, DiagnosticCategory::Error, "Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056", "Accessors are only available when targeting ECMAScript 5 and higher."); }; + static shared_ptr The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member(){ return diag(1058, DiagnosticCategory::Error, "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058", "The return type of an async function must either be a valid promise or must not contain a callable 'then' member."); }; + static shared_ptr A_promise_must_have_a_then_method(){ return diag(1059, DiagnosticCategory::Error, "A_promise_must_have_a_then_method_1059", "A promise must have a 'then' method."); }; + static shared_ptr The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback(){ return diag(1060, DiagnosticCategory::Error, "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060", "The first parameter of the 'then' method of a promise must be a callback."); }; + static shared_ptr Enum_member_must_have_initializer(){ return diag(1061, DiagnosticCategory::Error, "Enum_member_must_have_initializer_1061", "Enum member must have initializer."); }; + static shared_ptr Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method(){ return diag(1062, DiagnosticCategory::Error, "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062", "Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method."); }; + static shared_ptr An_export_assignment_cannot_be_used_in_a_namespace(){ return diag(1063, DiagnosticCategory::Error, "An_export_assignment_cannot_be_used_in_a_namespace_1063", "An export assignment cannot be used in a namespace."); }; + static shared_ptr The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0(){ return diag(1064, DiagnosticCategory::Error, "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_wri_1064", "The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{0}>'?"); }; + static shared_ptr In_ambient_enum_declarations_member_initializer_must_be_constant_expression(){ return diag(1066, DiagnosticCategory::Error, "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066", "In ambient enum declarations member initializer must be constant expression."); }; + static shared_ptr Unexpected_token_A_constructor_method_accessor_or_property_was_expected(){ return diag(1068, DiagnosticCategory::Error, "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068", "Unexpected token. A constructor, method, accessor, or property was expected."); }; + static shared_ptr Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces(){ return diag(1069, DiagnosticCategory::Error, "Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069", "Unexpected token. A type parameter name was expected without curly braces."); }; + static shared_ptr _0_modifier_cannot_appear_on_a_type_member(){ return diag(1070, DiagnosticCategory::Error, "_0_modifier_cannot_appear_on_a_type_member_1070", "'{0}' modifier cannot appear on a type member."); }; + static shared_ptr _0_modifier_cannot_appear_on_an_index_signature(){ return diag(1071, DiagnosticCategory::Error, "_0_modifier_cannot_appear_on_an_index_signature_1071", "'{0}' modifier cannot appear on an index signature."); }; + static shared_ptr A_0_modifier_cannot_be_used_with_an_import_declaration(){ return diag(1079, DiagnosticCategory::Error, "A_0_modifier_cannot_be_used_with_an_import_declaration_1079", "A '{0}' modifier cannot be used with an import declaration."); }; + static shared_ptr Invalid_reference_directive_syntax(){ return diag(1084, DiagnosticCategory::Error, "Invalid_reference_directive_syntax_1084", "Invalid 'reference' directive syntax."); }; + static shared_ptr Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0(){ return diag(1085, DiagnosticCategory::Error, "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085", "Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '{0}'."); }; + static shared_ptr _0_modifier_cannot_appear_on_a_constructor_declaration(){ return diag(1089, DiagnosticCategory::Error, "_0_modifier_cannot_appear_on_a_constructor_declaration_1089", "'{0}' modifier cannot appear on a constructor declaration."); }; + static shared_ptr _0_modifier_cannot_appear_on_a_parameter(){ return diag(1090, DiagnosticCategory::Error, "_0_modifier_cannot_appear_on_a_parameter_1090", "'{0}' modifier cannot appear on a parameter."); }; + static shared_ptr Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement(){ return diag(1091, DiagnosticCategory::Error, "Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091", "Only a single variable declaration is allowed in a 'for...in' statement."); }; + static shared_ptr Type_parameters_cannot_appear_on_a_constructor_declaration(){ return diag(1092, DiagnosticCategory::Error, "Type_parameters_cannot_appear_on_a_constructor_declaration_1092", "Type parameters cannot appear on a constructor declaration."); }; + static shared_ptr Type_annotation_cannot_appear_on_a_constructor_declaration(){ return diag(1093, DiagnosticCategory::Error, "Type_annotation_cannot_appear_on_a_constructor_declaration_1093", "Type annotation cannot appear on a constructor declaration."); }; + static shared_ptr An_accessor_cannot_have_type_parameters(){ return diag(1094, DiagnosticCategory::Error, "An_accessor_cannot_have_type_parameters_1094", "An accessor cannot have type parameters."); }; + static shared_ptr A_set_accessor_cannot_have_a_return_type_annotation(){ return diag(1095, DiagnosticCategory::Error, "A_set_accessor_cannot_have_a_return_type_annotation_1095", "A 'set' accessor cannot have a return type annotation."); }; + static shared_ptr An_index_signature_must_have_exactly_one_parameter(){ return diag(1096, DiagnosticCategory::Error, "An_index_signature_must_have_exactly_one_parameter_1096", "An index signature must have exactly one parameter."); }; + static shared_ptr _0_list_cannot_be_empty(){ return diag(1097, DiagnosticCategory::Error, "_0_list_cannot_be_empty_1097", "'{0}' list cannot be empty."); }; + static shared_ptr Type_parameter_list_cannot_be_empty(){ return diag(1098, DiagnosticCategory::Error, "Type_parameter_list_cannot_be_empty_1098", "Type parameter list cannot be empty."); }; + static shared_ptr Type_argument_list_cannot_be_empty(){ return diag(1099, DiagnosticCategory::Error, "Type_argument_list_cannot_be_empty_1099", "Type argument list cannot be empty."); }; + static shared_ptr Invalid_use_of_0_in_strict_mode(){ return diag(1100, DiagnosticCategory::Error, "Invalid_use_of_0_in_strict_mode_1100", "Invalid use of '{0}' in strict mode."); }; + static shared_ptr with_statements_are_not_allowed_in_strict_mode(){ return diag(1101, DiagnosticCategory::Error, "with_statements_are_not_allowed_in_strict_mode_1101", "'with' statements are not allowed in strict mode."); }; + static shared_ptr delete_cannot_be_called_on_an_identifier_in_strict_mode(){ return diag(1102, DiagnosticCategory::Error, "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102", "'delete' cannot be called on an identifier in strict mode."); }; + static shared_ptr for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules(){ return diag(1103, DiagnosticCategory::Error, "for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1103", "'for await' loops are only allowed within async functions and at the top levels of modules."); }; + static shared_ptr A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement(){ return diag(1104, DiagnosticCategory::Error, "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104", "A 'continue' statement can only be used within an enclosing iteration statement."); }; + static shared_ptr A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement(){ return diag(1105, DiagnosticCategory::Error, "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105", "A 'break' statement can only be used within an enclosing iteration or switch statement."); }; + static shared_ptr The_left_hand_side_of_a_for_of_statement_may_not_be_async(){ return diag(1106, DiagnosticCategory::Error, "The_left_hand_side_of_a_for_of_statement_may_not_be_async_1106", "The left-hand side of a 'for...of' statement may not be 'async'."); }; + static shared_ptr Jump_target_cannot_cross_function_boundary(){ return diag(1107, DiagnosticCategory::Error, "Jump_target_cannot_cross_function_boundary_1107", "Jump target cannot cross function boundary."); }; + static shared_ptr A_return_statement_can_only_be_used_within_a_function_body(){ return diag(1108, DiagnosticCategory::Error, "A_return_statement_can_only_be_used_within_a_function_body_1108", "A 'return' statement can only be used within a function body."); }; + static shared_ptr Expression_expected(){ return diag(1109, DiagnosticCategory::Error, "Expression_expected_1109", "Expression expected."); }; + static shared_ptr Type_expected(){ return diag(1110, DiagnosticCategory::Error, "Type_expected_1110", "Type expected."); }; + static shared_ptr A_default_clause_cannot_appear_more_than_once_in_a_switch_statement(){ return diag(1113, DiagnosticCategory::Error, "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113", "A 'default' clause cannot appear more than once in a 'switch' statement."); }; + static shared_ptr Duplicate_label_0(){ return diag(1114, DiagnosticCategory::Error, "Duplicate_label_0_1114", "Duplicate label '{0}'."); }; + static shared_ptr A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement(){ return diag(1115, DiagnosticCategory::Error, "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115", "A 'continue' statement can only jump to a label of an enclosing iteration statement."); }; + static shared_ptr A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement(){ return diag(1116, DiagnosticCategory::Error, "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116", "A 'break' statement can only jump to a label of an enclosing statement."); }; + static shared_ptr An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode(){ return diag(1117, DiagnosticCategory::Error, "An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117", "An object literal cannot have multiple properties with the same name in strict mode."); }; + static shared_ptr An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name(){ return diag(1118, DiagnosticCategory::Error, "An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118", "An object literal cannot have multiple get/set accessors with the same name."); }; + static shared_ptr An_object_literal_cannot_have_property_and_accessor_with_the_same_name(){ return diag(1119, DiagnosticCategory::Error, "An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119", "An object literal cannot have property and accessor with the same name."); }; + static shared_ptr An_export_assignment_cannot_have_modifiers(){ return diag(1120, DiagnosticCategory::Error, "An_export_assignment_cannot_have_modifiers_1120", "An export assignment cannot have modifiers."); }; + static shared_ptr Octal_literals_are_not_allowed_in_strict_mode(){ return diag(1121, DiagnosticCategory::Error, "Octal_literals_are_not_allowed_in_strict_mode_1121", "Octal literals are not allowed in strict mode."); }; + static shared_ptr Variable_declaration_list_cannot_be_empty(){ return diag(1123, DiagnosticCategory::Error, "Variable_declaration_list_cannot_be_empty_1123", "Variable declaration list cannot be empty."); }; + static shared_ptr Digit_expected(){ return diag(1124, DiagnosticCategory::Error, "Digit_expected_1124", "Digit expected."); }; + static shared_ptr Hexadecimal_digit_expected(){ return diag(1125, DiagnosticCategory::Error, "Hexadecimal_digit_expected_1125", "Hexadecimal digit expected."); }; + static shared_ptr Unexpected_end_of_text(){ return diag(1126, DiagnosticCategory::Error, "Unexpected_end_of_text_1126", "Unexpected end of text."); }; + static shared_ptr Invalid_character(){ return diag(1127, DiagnosticCategory::Error, "Invalid_character_1127", "Invalid character."); }; + static shared_ptr Declaration_or_statement_expected(){ return diag(1128, DiagnosticCategory::Error, "Declaration_or_statement_expected_1128", "Declaration or statement expected."); }; + static shared_ptr Statement_expected(){ return diag(1129, DiagnosticCategory::Error, "Statement_expected_1129", "Statement expected."); }; + static shared_ptr case_or_default_expected(){ return diag(1130, DiagnosticCategory::Error, "case_or_default_expected_1130", "'case' or 'default' expected."); }; + static shared_ptr Property_or_signature_expected(){ return diag(1131, DiagnosticCategory::Error, "Property_or_signature_expected_1131", "Property or signature expected."); }; + static shared_ptr Enum_member_expected(){ return diag(1132, DiagnosticCategory::Error, "Enum_member_expected_1132", "Enum member expected."); }; + static shared_ptr Variable_declaration_expected(){ return diag(1134, DiagnosticCategory::Error, "Variable_declaration_expected_1134", "Variable declaration expected."); }; + static shared_ptr Argument_expression_expected(){ return diag(1135, DiagnosticCategory::Error, "Argument_expression_expected_1135", "Argument expression expected."); }; + static shared_ptr Property_assignment_expected(){ return diag(1136, DiagnosticCategory::Error, "Property_assignment_expected_1136", "Property assignment expected."); }; + static shared_ptr Expression_or_comma_expected(){ return diag(1137, DiagnosticCategory::Error, "Expression_or_comma_expected_1137", "Expression or comma expected."); }; + static shared_ptr Parameter_declaration_expected(){ return diag(1138, DiagnosticCategory::Error, "Parameter_declaration_expected_1138", "Parameter declaration expected."); }; + static shared_ptr Type_parameter_declaration_expected(){ return diag(1139, DiagnosticCategory::Error, "Type_parameter_declaration_expected_1139", "Type parameter declaration expected."); }; + static shared_ptr Type_argument_expected(){ return diag(1140, DiagnosticCategory::Error, "Type_argument_expected_1140", "Type argument expected."); }; + static shared_ptr String_literal_expected(){ return diag(1141, DiagnosticCategory::Error, "String_literal_expected_1141", "String literal expected."); }; + static shared_ptr Line_break_not_permitted_here(){ return diag(1142, DiagnosticCategory::Error, "Line_break_not_permitted_here_1142", "Line break not permitted here."); }; + static shared_ptr or_expected(){ return diag(1144, DiagnosticCategory::Error, "or_expected_1144", "'{' or ';' expected."); }; + static shared_ptr or_JSX_element_expected(){ return diag(1145, DiagnosticCategory::Error, "or_JSX_element_expected_1145", "{' or JSX element expected."); }; + static shared_ptr Declaration_expected(){ return diag(1146, DiagnosticCategory::Error, "Declaration_expected_1146", "Declaration expected."); }; + static shared_ptr Import_declarations_in_a_namespace_cannot_reference_a_module(){ return diag(1147, DiagnosticCategory::Error, "Import_declarations_in_a_namespace_cannot_reference_a_module_1147", "Import declarations in a namespace cannot reference a module."); }; + static shared_ptr Cannot_use_imports_exports_or_module_augmentations_when_module_is_none(){ return diag(1148, DiagnosticCategory::Error, "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148", "Cannot use imports, exports, or module augmentations when '--module' is 'none'."); }; + static shared_ptr File_name_0_differs_from_already_included_file_name_1_only_in_casing(){ return diag(1149, DiagnosticCategory::Error, "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149", "File name '{0}' differs from already included file name '{1}' only in casing."); }; + static shared_ptr const_declarations_must_be_initialized(){ return diag(1155, DiagnosticCategory::Error, "const_declarations_must_be_initialized_1155", "'const' declarations must be initialized."); }; + static shared_ptr const_declarations_can_only_be_declared_inside_a_block(){ return diag(1156, DiagnosticCategory::Error, "const_declarations_can_only_be_declared_inside_a_block_1156", "'const' declarations can only be declared inside a block."); }; + static shared_ptr let_declarations_can_only_be_declared_inside_a_block(){ return diag(1157, DiagnosticCategory::Error, "let_declarations_can_only_be_declared_inside_a_block_1157", "'let' declarations can only be declared inside a block."); }; + static shared_ptr Unterminated_template_literal(){ return diag(1160, DiagnosticCategory::Error, "Unterminated_template_literal_1160", "Unterminated template literal."); }; + static shared_ptr Unterminated_regular_expression_literal(){ return diag(1161, DiagnosticCategory::Error, "Unterminated_regular_expression_literal_1161", "Unterminated regular expression literal."); }; + static shared_ptr An_object_member_cannot_be_declared_optional(){ return diag(1162, DiagnosticCategory::Error, "An_object_member_cannot_be_declared_optional_1162", "An object member cannot be declared optional."); }; + static shared_ptr A_yield_expression_is_only_allowed_in_a_generator_body(){ return diag(1163, DiagnosticCategory::Error, "A_yield_expression_is_only_allowed_in_a_generator_body_1163", "A 'yield' expression is only allowed in a generator body."); }; + static shared_ptr Computed_property_names_are_not_allowed_in_enums(){ return diag(1164, DiagnosticCategory::Error, "Computed_property_names_are_not_allowed_in_enums_1164", "Computed property names are not allowed in enums."); }; + static shared_ptr A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type(){ return diag(1165, DiagnosticCategory::Error, "A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165", "A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type."); }; + static shared_ptr A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type(){ return diag(1166, DiagnosticCategory::Error, "A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_1166", "A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type."); }; + static shared_ptr A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type(){ return diag(1168, DiagnosticCategory::Error, "A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_ty_1168", "A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type."); }; + static shared_ptr A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type(){ return diag(1169, DiagnosticCategory::Error, "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169", "A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type."); }; + static shared_ptr A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type(){ return diag(1170, DiagnosticCategory::Error, "A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type__1170", "A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type."); }; + static shared_ptr A_comma_expression_is_not_allowed_in_a_computed_property_name(){ return diag(1171, DiagnosticCategory::Error, "A_comma_expression_is_not_allowed_in_a_computed_property_name_1171", "A comma expression is not allowed in a computed property name."); }; + static shared_ptr extends_clause_already_seen(){ return diag(1172, DiagnosticCategory::Error, "extends_clause_already_seen_1172", "'extends' clause already seen."); }; + static shared_ptr extends_clause_must_precede_implements_clause(){ return diag(1173, DiagnosticCategory::Error, "extends_clause_must_precede_implements_clause_1173", "'extends' clause must precede 'implements' clause."); }; + static shared_ptr Classes_can_only_extend_a_single_class(){ return diag(1174, DiagnosticCategory::Error, "Classes_can_only_extend_a_single_class_1174", "Classes can only extend a single class."); }; + static shared_ptr implements_clause_already_seen(){ return diag(1175, DiagnosticCategory::Error, "implements_clause_already_seen_1175", "'implements' clause already seen."); }; + static shared_ptr Interface_declaration_cannot_have_implements_clause(){ return diag(1176, DiagnosticCategory::Error, "Interface_declaration_cannot_have_implements_clause_1176", "Interface declaration cannot have 'implements' clause."); }; + static shared_ptr Binary_digit_expected(){ return diag(1177, DiagnosticCategory::Error, "Binary_digit_expected_1177", "Binary digit expected."); }; + static shared_ptr Octal_digit_expected(){ return diag(1178, DiagnosticCategory::Error, "Octal_digit_expected_1178", "Octal digit expected."); }; + static shared_ptr Unexpected_token_expected(){ return diag(1179, DiagnosticCategory::Error, "Unexpected_token_expected_1179", "Unexpected token. '{' expected."); }; + static shared_ptr Property_destructuring_pattern_expected(){ return diag(1180, DiagnosticCategory::Error, "Property_destructuring_pattern_expected_1180", "Property destructuring pattern expected."); }; + static shared_ptr Array_element_destructuring_pattern_expected(){ return diag(1181, DiagnosticCategory::Error, "Array_element_destructuring_pattern_expected_1181", "Array element destructuring pattern expected."); }; + static shared_ptr A_destructuring_declaration_must_have_an_initializer(){ return diag(1182, DiagnosticCategory::Error, "A_destructuring_declaration_must_have_an_initializer_1182", "A destructuring declaration must have an initializer."); }; + static shared_ptr An_implementation_cannot_be_declared_in_ambient_contexts(){ return diag(1183, DiagnosticCategory::Error, "An_implementation_cannot_be_declared_in_ambient_contexts_1183", "An implementation cannot be declared in ambient contexts."); }; + static shared_ptr Modifiers_cannot_appear_here(){ return diag(1184, DiagnosticCategory::Error, "Modifiers_cannot_appear_here_1184", "Modifiers cannot appear here."); }; + static shared_ptr Merge_conflict_marker_encountered(){ return diag(1185, DiagnosticCategory::Error, "Merge_conflict_marker_encountered_1185", "Merge conflict marker encountered."); }; + static shared_ptr A_rest_element_cannot_have_an_initializer(){ return diag(1186, DiagnosticCategory::Error, "A_rest_element_cannot_have_an_initializer_1186", "A rest element cannot have an initializer."); }; + static shared_ptr A_parameter_property_may_not_be_declared_using_a_binding_pattern(){ return diag(1187, DiagnosticCategory::Error, "A_parameter_property_may_not_be_declared_using_a_binding_pattern_1187", "A parameter property may not be declared using a binding pattern."); }; + static shared_ptr Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement(){ return diag(1188, DiagnosticCategory::Error, "Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188", "Only a single variable declaration is allowed in a 'for...of' statement."); }; + static shared_ptr The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer(){ return diag(1189, DiagnosticCategory::Error, "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189", "The variable declaration of a 'for...in' statement cannot have an initializer."); }; + static shared_ptr The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer(){ return diag(1190, DiagnosticCategory::Error, "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190", "The variable declaration of a 'for...of' statement cannot have an initializer."); }; + static shared_ptr An_import_declaration_cannot_have_modifiers(){ return diag(1191, DiagnosticCategory::Error, "An_import_declaration_cannot_have_modifiers_1191", "An import declaration cannot have modifiers."); }; + static shared_ptr Module_0_has_no_default_export(){ return diag(1192, DiagnosticCategory::Error, "Module_0_has_no_default_export_1192", "Module '{0}' has no default export."); }; + static shared_ptr An_export_declaration_cannot_have_modifiers(){ return diag(1193, DiagnosticCategory::Error, "An_export_declaration_cannot_have_modifiers_1193", "An export declaration cannot have modifiers."); }; + static shared_ptr Export_declarations_are_not_permitted_in_a_namespace(){ return diag(1194, DiagnosticCategory::Error, "Export_declarations_are_not_permitted_in_a_namespace_1194", "Export declarations are not permitted in a namespace."); }; + static shared_ptr export_Asterisk_does_not_re_export_a_default(){ return diag(1195, DiagnosticCategory::Error, "export_Asterisk_does_not_re_export_a_default_1195", "'export *' does not re-export a default."); }; + static shared_ptr Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified(){ return diag(1196, DiagnosticCategory::Error, "Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified_1196", "Catch clause variable type annotation must be 'any' or 'unknown' if specified."); }; + static shared_ptr Catch_clause_variable_cannot_have_an_initializer(){ return diag(1197, DiagnosticCategory::Error, "Catch_clause_variable_cannot_have_an_initializer_1197", "Catch clause variable cannot have an initializer."); }; + static shared_ptr An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive(){ return diag(1198, DiagnosticCategory::Error, "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198", "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive."); }; + static shared_ptr Unterminated_Unicode_escape_sequence(){ return diag(1199, DiagnosticCategory::Error, "Unterminated_Unicode_escape_sequence_1199", "Unterminated Unicode escape sequence."); }; + static shared_ptr Line_terminator_not_permitted_before_arrow(){ return diag(1200, DiagnosticCategory::Error, "Line_terminator_not_permitted_before_arrow_1200", "Line terminator not permitted before arrow."); }; + static shared_ptr Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead(){ return diag(1202, DiagnosticCategory::Error, "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202", "Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"', or another module format instead."); }; - static shared Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead(){ return diag(1203, DiagnosticCategory::Error, "Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203", "Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead."); }; - static shared Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type(){ return diag(1205, DiagnosticCategory::Error, "Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type_1205", "Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'."); }; - static shared Decorators_are_not_valid_here(){ return diag(1206, DiagnosticCategory::Error, "Decorators_are_not_valid_here_1206", "Decorators are not valid here."); }; - static shared Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name(){ return diag(1207, DiagnosticCategory::Error, "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207", "Decorators cannot be applied to multiple get/set accessors of the same name."); }; - static shared _0_cannot_be_compiled_under_isolatedModules_because_it_is_considered_a_global_script_file_Add_an_import_export_or_an_empty_export_statement_to_make_it_a_module(){ return diag(1208, DiagnosticCategory::Error, "_0_cannot_be_compiled_under_isolatedModules_because_it_is_considered_a_global_script_file_Add_an_imp_1208", + static shared_ptr Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead(){ return diag(1203, DiagnosticCategory::Error, "Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203", "Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead."); }; + static shared_ptr Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type(){ return diag(1205, DiagnosticCategory::Error, "Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type_1205", "Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'."); }; + static shared_ptr Decorators_are_not_valid_here(){ return diag(1206, DiagnosticCategory::Error, "Decorators_are_not_valid_here_1206", "Decorators are not valid here."); }; + static shared_ptr Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name(){ return diag(1207, DiagnosticCategory::Error, "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207", "Decorators cannot be applied to multiple get/set accessors of the same name."); }; + static shared_ptr _0_cannot_be_compiled_under_isolatedModules_because_it_is_considered_a_global_script_file_Add_an_import_export_or_an_empty_export_statement_to_make_it_a_module(){ return diag(1208, DiagnosticCategory::Error, "_0_cannot_be_compiled_under_isolatedModules_because_it_is_considered_a_global_script_file_Add_an_imp_1208", "'{0}' cannot be compiled under '--isolatedModules' because it is considered a global script file. Add an import, export, or an empty 'export {}' statement to make it a module."); }; - static shared Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode(){ return diag(1210, DiagnosticCategory::Error, "Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of__1210", + static shared_ptr Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode(){ return diag(1210, DiagnosticCategory::Error, "Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of__1210", "Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of '{0}'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode."); }; - static shared A_class_declaration_without_the_default_modifier_must_have_a_name(){ return diag(1211, DiagnosticCategory::Error, "A_class_declaration_without_the_default_modifier_must_have_a_name_1211", "A class declaration without the 'default' modifier must have a name."); }; - static shared Identifier_expected_0_is_a_reserved_word_in_strict_mode(){ return diag(1212, DiagnosticCategory::Error, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212", "Identifier expected. '{0}' is a reserved word in strict mode."); }; - static shared Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode(){ return diag(1213, DiagnosticCategory::Error, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213", "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode."); }; - static shared Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode(){ return diag(1214, DiagnosticCategory::Error, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214", "Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode."); }; - static shared Invalid_use_of_0_Modules_are_automatically_in_strict_mode(){ return diag(1215, DiagnosticCategory::Error, "Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215", "Invalid use of '{0}'. Modules are automatically in strict mode."); }; - static shared Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules(){ return diag(1216, DiagnosticCategory::Error, "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216", "Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules."); }; - static shared Export_assignment_is_not_supported_when_module_flag_is_system(){ return diag(1218, DiagnosticCategory::Error, "Export_assignment_is_not_supported_when_module_flag_is_system_1218", "Export assignment is not supported when '--module' flag is 'system'."); }; - static shared Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_in_your_tsconfig_or_jsconfig_to_remove_this_warning(){ return diag(1219, DiagnosticCategory::Error, "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219", + static shared_ptr A_class_declaration_without_the_default_modifier_must_have_a_name(){ return diag(1211, DiagnosticCategory::Error, "A_class_declaration_without_the_default_modifier_must_have_a_name_1211", "A class declaration without the 'default' modifier must have a name."); }; + static shared_ptr Identifier_expected_0_is_a_reserved_word_in_strict_mode(){ return diag(1212, DiagnosticCategory::Error, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212", "Identifier expected. '{0}' is a reserved word in strict mode."); }; + static shared_ptr Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode(){ return diag(1213, DiagnosticCategory::Error, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213", "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode."); }; + static shared_ptr Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode(){ return diag(1214, DiagnosticCategory::Error, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214", "Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode."); }; + static shared_ptr Invalid_use_of_0_Modules_are_automatically_in_strict_mode(){ return diag(1215, DiagnosticCategory::Error, "Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215", "Invalid use of '{0}'. Modules are automatically in strict mode."); }; + static shared_ptr Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules(){ return diag(1216, DiagnosticCategory::Error, "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216", "Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules."); }; + static shared_ptr Export_assignment_is_not_supported_when_module_flag_is_system(){ return diag(1218, DiagnosticCategory::Error, "Export_assignment_is_not_supported_when_module_flag_is_system_1218", "Export assignment is not supported when '--module' flag is 'system'."); }; + static shared_ptr Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_in_your_tsconfig_or_jsconfig_to_remove_this_warning(){ return diag(1219, DiagnosticCategory::Error, "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219", "Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning."); }; - static shared Generators_are_not_allowed_in_an_ambient_context(){ return diag(1221, DiagnosticCategory::Error, "Generators_are_not_allowed_in_an_ambient_context_1221", "Generators are not allowed in an ambient context."); }; - static shared An_overload_signature_cannot_be_declared_as_a_generator(){ return diag(1222, DiagnosticCategory::Error, "An_overload_signature_cannot_be_declared_as_a_generator_1222", "An overload signature cannot be declared as a generator."); }; - static shared _0_tag_already_specified(){ return diag(1223, DiagnosticCategory::Error, "_0_tag_already_specified_1223", "'{0}' tag already specified."); }; - static shared Signature_0_must_be_a_type_predicate(){ return diag(1224, DiagnosticCategory::Error, "Signature_0_must_be_a_type_predicate_1224", "Signature '{0}' must be a type predicate."); }; - static shared Cannot_find_parameter_0(){ return diag(1225, DiagnosticCategory::Error, "Cannot_find_parameter_0_1225", "Cannot find parameter '{0}'."); }; - static shared Type_predicate_0_is_not_assignable_to_1(){ return diag(1226, DiagnosticCategory::Error, "Type_predicate_0_is_not_assignable_to_1_1226", "Type predicate '{0}' is not assignable to '{1}'."); }; - static shared Parameter_0_is_not_in_the_same_position_as_parameter_1(){ return diag(1227, DiagnosticCategory::Error, "Parameter_0_is_not_in_the_same_position_as_parameter_1_1227", "Parameter '{0}' is not in the same position as parameter '{1}'."); }; - static shared A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods(){ return diag(1228, DiagnosticCategory::Error, "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228", "A type predicate is only allowed in return type position for functions and methods."); }; - static shared A_type_predicate_cannot_reference_a_rest_parameter(){ return diag(1229, DiagnosticCategory::Error, "A_type_predicate_cannot_reference_a_rest_parameter_1229", "A type predicate cannot reference a rest parameter."); }; - static shared A_type_predicate_cannot_reference_element_0_in_a_binding_pattern(){ return diag(1230, DiagnosticCategory::Error, "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230", "A type predicate cannot reference element '{0}' in a binding pattern."); }; - static shared An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration(){ return diag(1231, DiagnosticCategory::Error, "An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration_1231", "An export assignment must be at the top level of a file or module declaration."); }; - static shared An_import_declaration_can_only_be_used_in_a_namespace_or_module(){ return diag(1232, DiagnosticCategory::Error, "An_import_declaration_can_only_be_used_in_a_namespace_or_module_1232", "An import declaration can only be used in a namespace or module."); }; - static shared An_export_declaration_can_only_be_used_in_a_module(){ return diag(1233, DiagnosticCategory::Error, "An_export_declaration_can_only_be_used_in_a_module_1233", "An export declaration can only be used in a module."); }; - static shared An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file(){ return diag(1234, DiagnosticCategory::Error, "An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234", "An ambient module declaration is only allowed at the top level in a file."); }; - static shared A_namespace_declaration_is_only_allowed_in_a_namespace_or_module(){ return diag(1235, DiagnosticCategory::Error, "A_namespace_declaration_is_only_allowed_in_a_namespace_or_module_1235", "A namespace declaration is only allowed in a namespace or module."); }; - static shared The_return_type_of_a_property_decorator_function_must_be_either_void_or_any(){ return diag(1236, DiagnosticCategory::Error, "The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236", "The return type of a property decorator function must be either 'void' or 'any'."); }; - static shared The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any(){ return diag(1237, DiagnosticCategory::Error, "The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237", "The return type of a parameter decorator function must be either 'void' or 'any'."); }; - static shared Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression(){ return diag(1238, DiagnosticCategory::Error, "Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression_1238", "Unable to resolve signature of class decorator when called as an expression."); }; - static shared Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression(){ return diag(1239, DiagnosticCategory::Error, "Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression_1239", "Unable to resolve signature of parameter decorator when called as an expression."); }; - static shared Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression(){ return diag(1240, DiagnosticCategory::Error, "Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression_1240", "Unable to resolve signature of property decorator when called as an expression."); }; - static shared Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression(){ return diag(1241, DiagnosticCategory::Error, "Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression_1241", "Unable to resolve signature of method decorator when called as an expression."); }; - static shared abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration(){ return diag(1242, DiagnosticCategory::Error, "abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242", "'abstract' modifier can only appear on a class, method, or property declaration."); }; - static shared _0_modifier_cannot_be_used_with_1_modifier(){ return diag(1243, DiagnosticCategory::Error, "_0_modifier_cannot_be_used_with_1_modifier_1243", "'{0}' modifier cannot be used with '{1}' modifier."); }; - static shared Abstract_methods_can_only_appear_within_an_abstract_class(){ return diag(1244, DiagnosticCategory::Error, "Abstract_methods_can_only_appear_within_an_abstract_class_1244", "Abstract methods can only appear within an abstract class."); }; - static shared Method_0_cannot_have_an_implementation_because_it_is_marked_abstract(){ return diag(1245, DiagnosticCategory::Error, "Method_0_cannot_have_an_implementation_because_it_is_marked_abstract_1245", "Method '{0}' cannot have an implementation because it is marked abstract."); }; - static shared An_interface_property_cannot_have_an_initializer(){ return diag(1246, DiagnosticCategory::Error, "An_interface_property_cannot_have_an_initializer_1246", "An interface property cannot have an initializer."); }; - static shared A_type_literal_property_cannot_have_an_initializer(){ return diag(1247, DiagnosticCategory::Error, "A_type_literal_property_cannot_have_an_initializer_1247", "A type literal property cannot have an initializer."); }; - static shared A_class_member_cannot_have_the_0_keyword(){ return diag(1248, DiagnosticCategory::Error, "A_class_member_cannot_have_the_0_keyword_1248", "A class member cannot have the '{0}' keyword."); }; - static shared A_decorator_can_only_decorate_a_method_implementation_not_an_overload(){ return diag(1249, DiagnosticCategory::Error, "A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249", "A decorator can only decorate a method implementation, not an overload."); }; - static shared Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5(){ return diag(1250, DiagnosticCategory::Error, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'."); }; - static shared Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_definitions_are_automatically_in_strict_mode(){ return diag(1251, DiagnosticCategory::Error, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Class definitions are automatically in strict mode."); }; - static shared Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_are_automatically_in_strict_mode(){ return diag(1252, DiagnosticCategory::Error, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_1252", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Modules are automatically in strict mode."); }; - static shared A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference(){ return diag(1254, DiagnosticCategory::Error, "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254", "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference."); }; - static shared A_definite_assignment_assertion_is_not_permitted_in_this_context(){ return diag(1255, DiagnosticCategory::Error, "A_definite_assignment_assertion_is_not_permitted_in_this_context_1255", "A definite assignment assertion '!' is not permitted in this context."); }; - static shared A_required_element_cannot_follow_an_optional_element(){ return diag(1257, DiagnosticCategory::Error, "A_required_element_cannot_follow_an_optional_element_1257", "A required element cannot follow an optional element."); }; - static shared A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration(){ return diag(1258, DiagnosticCategory::Error, "A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration_1258", "A default export must be at the top level of a file or module declaration."); }; - static shared Module_0_can_only_be_default_imported_using_the_1_flag(){ return diag(1259, DiagnosticCategory::Error, "Module_0_can_only_be_default_imported_using_the_1_flag_1259", "Module '{0}' can only be default-imported using the '{1}' flag"); }; - static shared Keywords_cannot_contain_escape_characters(){ return diag(1260, DiagnosticCategory::Error, "Keywords_cannot_contain_escape_characters_1260", "Keywords cannot contain escape characters."); }; - static shared Already_included_file_name_0_differs_from_file_name_1_only_in_casing(){ return diag(1261, DiagnosticCategory::Error, "Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261", "Already included file name '{0}' differs from file name '{1}' only in casing."); }; - static shared Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module(){ return diag(1262, DiagnosticCategory::Error, "Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module_1262", "Identifier expected. '{0}' is a reserved word at the top-level of a module."); }; - static shared Declarations_with_initializers_cannot_also_have_definite_assignment_assertions(){ return diag(1263, DiagnosticCategory::Error, "Declarations_with_initializers_cannot_also_have_definite_assignment_assertions_1263", "Declarations with initializers cannot also have definite assignment assertions."); }; - static shared Declarations_with_definite_assignment_assertions_must_also_have_type_annotations(){ return diag(1264, DiagnosticCategory::Error, "Declarations_with_definite_assignment_assertions_must_also_have_type_annotations_1264", "Declarations with definite assignment assertions must also have type annotations."); }; - static shared A_rest_element_cannot_follow_another_rest_element(){ return diag(1265, DiagnosticCategory::Error, "A_rest_element_cannot_follow_another_rest_element_1265", "A rest element cannot follow another rest element."); }; - static shared An_optional_element_cannot_follow_a_rest_element(){ return diag(1266, DiagnosticCategory::Error, "An_optional_element_cannot_follow_a_rest_element_1266", "An optional element cannot follow a rest element."); }; - static shared Property_0_cannot_have_an_initializer_because_it_is_marked_abstract(){ return diag(1267, DiagnosticCategory::Error, "Property_0_cannot_have_an_initializer_because_it_is_marked_abstract_1267", "Property '{0}' cannot have an initializer because it is marked abstract."); }; - static shared An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type(){ return diag(1268, DiagnosticCategory::Error, "An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type_1268", "An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type."); }; - static shared with_statements_are_not_allowed_in_an_async_function_block(){ return diag(1300, DiagnosticCategory::Error, "with_statements_are_not_allowed_in_an_async_function_block_1300", "'with' statements are not allowed in an async function block."); }; - static shared await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules(){ return diag(1308, DiagnosticCategory::Error, "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308", "'await' expressions are only allowed within async functions and at the top levels of modules."); }; - static shared Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern(){ return diag(1312, DiagnosticCategory::Error, "Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_1312", "Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern."); }; - static shared The_body_of_an_if_statement_cannot_be_the_empty_statement(){ return diag(1313, DiagnosticCategory::Error, "The_body_of_an_if_statement_cannot_be_the_empty_statement_1313", "The body of an 'if' statement cannot be the empty statement."); }; - static shared Global_module_exports_may_only_appear_in_module_files(){ return diag(1314, DiagnosticCategory::Error, "Global_module_exports_may_only_appear_in_module_files_1314", "Global module exports may only appear in module files."); }; - static shared Global_module_exports_may_only_appear_in_declaration_files(){ return diag(1315, DiagnosticCategory::Error, "Global_module_exports_may_only_appear_in_declaration_files_1315", "Global module exports may only appear in declaration files."); }; - static shared Global_module_exports_may_only_appear_at_top_level(){ return diag(1316, DiagnosticCategory::Error, "Global_module_exports_may_only_appear_at_top_level_1316", "Global module exports may only appear at top level."); }; - static shared A_parameter_property_cannot_be_declared_using_a_rest_parameter(){ return diag(1317, DiagnosticCategory::Error, "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317", "A parameter property cannot be declared using a rest parameter."); }; - static shared An_abstract_accessor_cannot_have_an_implementation(){ return diag(1318, DiagnosticCategory::Error, "An_abstract_accessor_cannot_have_an_implementation_1318", "An abstract accessor cannot have an implementation."); }; - static shared A_default_export_can_only_be_used_in_an_ECMAScript_style_module(){ return diag(1319, DiagnosticCategory::Error, "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319", "A default export can only be used in an ECMAScript-style module."); }; - static shared Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member(){ return diag(1320, DiagnosticCategory::Error, "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320", "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."); }; - static shared Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member(){ return diag(1321, DiagnosticCategory::Error, "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."); }; - static shared Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member(){ return diag(1322, DiagnosticCategory::Error, "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."); }; - static shared Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node12_or_nodenext(){ return diag(1323, DiagnosticCategory::Error, "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323", "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'."); }; - static shared Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext(){ return diag(1324, DiagnosticCategory::Error, "Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324", "Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'."); }; - static shared Argument_of_dynamic_import_cannot_be_spread_element(){ return diag(1325, DiagnosticCategory::Error, "Argument_of_dynamic_import_cannot_be_spread_element_1325", "Argument of dynamic import cannot be spread element."); }; - static shared Dynamic_import_cannot_have_type_arguments(){ return diag(1326, DiagnosticCategory::Error, "Dynamic_import_cannot_have_type_arguments_1326", "Dynamic import cannot have type arguments."); }; - static shared String_literal_with_double_quotes_expected(){ return diag(1327, DiagnosticCategory::Error, "String_literal_with_double_quotes_expected_1327", "String literal with double quotes expected."); }; - static shared Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal(){ return diag(1328, DiagnosticCategory::Error, "Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328", "Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal."); }; - static shared _0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0(){ return diag(1329, DiagnosticCategory::Error, "_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329", "'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?"); }; - static shared A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly(){ return diag(1330, DiagnosticCategory::Error, "A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330", "A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'."); }; - static shared A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly(){ return diag(1331, DiagnosticCategory::Error, "A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331", "A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'."); }; - static shared A_variable_whose_type_is_a_unique_symbol_type_must_be_const(){ return diag(1332, DiagnosticCategory::Error, "A_variable_whose_type_is_a_unique_symbol_type_must_be_const_1332", "A variable whose type is a 'unique symbol' type must be 'const'."); }; - static shared unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name(){ return diag(1333, DiagnosticCategory::Error, "unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333", "'unique symbol' types may not be used on a variable declaration with a binding name."); }; - static shared unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement(){ return diag(1334, DiagnosticCategory::Error, "unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334", "'unique symbol' types are only allowed on variables in a variable statement."); }; - static shared unique_symbol_types_are_not_allowed_here(){ return diag(1335, DiagnosticCategory::Error, "unique_symbol_types_are_not_allowed_here_1335", "'unique symbol' types are not allowed here."); }; - static shared An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead(){ return diag(1337, DiagnosticCategory::Error, "An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_o_1337", "An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead."); }; - static shared infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type(){ return diag(1338, DiagnosticCategory::Error, "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338", "'infer' declarations are only permitted in the 'extends' clause of a conditional type."); }; - static shared Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here(){ return diag(1339, DiagnosticCategory::Error, "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339", "Module '{0}' does not refer to a value, but is used as a value here."); }; - static shared Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0(){ return diag(1340, DiagnosticCategory::Error, "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340", "Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"); }; - static shared Type_arguments_cannot_be_used_here(){ return diag(1342, DiagnosticCategory::Error, "Type_arguments_cannot_be_used_here_1342", "Type arguments cannot be used here."); }; - static shared The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node12_or_nodenext(){ return diag(1343, DiagnosticCategory::Error, "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343", "The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'."); }; - static shared A_label_is_not_allowed_here(){ return diag(1344, DiagnosticCategory::Error, "A_label_is_not_allowed_here_1344", "'A label is not allowed here."); }; - static shared An_expression_of_type_void_cannot_be_tested_for_truthiness(){ return diag(1345, DiagnosticCategory::Error, "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345", "An expression of type 'void' cannot be tested for truthiness."); }; - static shared This_parameter_is_not_allowed_with_use_strict_directive(){ return diag(1346, DiagnosticCategory::Error, "This_parameter_is_not_allowed_with_use_strict_directive_1346", "This parameter is not allowed with 'use strict' directive."); }; - static shared use_strict_directive_cannot_be_used_with_non_simple_parameter_list(){ return diag(1347, DiagnosticCategory::Error, "use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347", "'use strict' directive cannot be used with non-simple parameter list."); }; - static shared Non_simple_parameter_declared_here(){ return diag(1348, DiagnosticCategory::Error, "Non_simple_parameter_declared_here_1348", "Non-simple parameter declared here."); }; - static shared use_strict_directive_used_here(){ return diag(1349, DiagnosticCategory::Error, "use_strict_directive_used_here_1349", "'use strict' directive used here."); }; - static shared Print_the_final_configuration_instead_of_building(){ return diag(1350, DiagnosticCategory::Message, "Print_the_final_configuration_instead_of_building_1350", "Print the final configuration instead of building."); }; - static shared An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal(){ return diag(1351, DiagnosticCategory::Error, "An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351", "An identifier or keyword cannot immediately follow a numeric literal."); }; - static shared A_bigint_literal_cannot_use_exponential_notation(){ return diag(1352, DiagnosticCategory::Error, "A_bigint_literal_cannot_use_exponential_notation_1352", "A bigint literal cannot use exponential notation."); }; - static shared A_bigint_literal_must_be_an_integer(){ return diag(1353, DiagnosticCategory::Error, "A_bigint_literal_must_be_an_integer_1353", "A bigint literal must be an integer."); }; - static shared readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types(){ return diag(1354, DiagnosticCategory::Error, "readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354", "'readonly' type modifier is only permitted on array and tuple literal types."); }; - static shared A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals(){ return diag(1355, DiagnosticCategory::Error, "A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355", "A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals."); }; - static shared Did_you_mean_to_mark_this_function_as_async(){ return diag(1356, DiagnosticCategory::Error, "Did_you_mean_to_mark_this_function_as_async_1356", "Did you mean to mark this function as 'async'?"); }; - static shared An_enum_member_name_must_be_followed_by_a_or(){ return diag(1357, DiagnosticCategory::Error, "An_enum_member_name_must_be_followed_by_a_or_1357", "An enum member name must be followed by a ',', '=', or '}'."); }; - static shared Tagged_template_expressions_are_not_permitted_in_an_optional_chain(){ return diag(1358, DiagnosticCategory::Error, "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358", "Tagged template expressions are not permitted in an optional chain."); }; - static shared Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here(){ return diag(1359, DiagnosticCategory::Error, "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359", "Identifier expected. '{0}' is a reserved word that cannot be used here."); }; - static shared _0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type(){ return diag(1361, DiagnosticCategory::Error, "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361", "'{0}' cannot be used as a value because it was imported using 'import type'."); }; - static shared _0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type(){ return diag(1362, DiagnosticCategory::Error, "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362", "'{0}' cannot be used as a value because it was exported using 'export type'."); }; - static shared A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both(){ return diag(1363, DiagnosticCategory::Error, "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363", "A type-only import can specify a default import or named bindings, but not both."); }; - static shared Convert_to_type_only_export(){ return diag(1364, DiagnosticCategory::Message, "Convert_to_type_only_export_1364", "Convert to type-only export"); }; - static shared Convert_all_re_exported_types_to_type_only_exports(){ return diag(1365, DiagnosticCategory::Message, "Convert_all_re_exported_types_to_type_only_exports_1365", "Convert all re-exported types to type-only exports"); }; - static shared Split_into_two_separate_import_declarations(){ return diag(1366, DiagnosticCategory::Message, "Split_into_two_separate_import_declarations_1366", "Split into two separate import declarations"); }; - static shared Split_all_invalid_type_only_imports(){ return diag(1367, DiagnosticCategory::Message, "Split_all_invalid_type_only_imports_1367", "Split all invalid type-only imports"); }; - static shared Did_you_mean_0(){ return diag(1369, DiagnosticCategory::Message, "Did_you_mean_0_1369", "Did you mean '{0}'?"); }; - static shared This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set_to_error(){ return diag(1371, DiagnosticCategory::Error, "This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set__1371", "This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'."); }; - static shared Convert_to_type_only_import(){ return diag(1373, DiagnosticCategory::Message, "Convert_to_type_only_import_1373", "Convert to type-only import"); }; - static shared Convert_all_imports_not_used_as_a_value_to_type_only_imports(){ return diag(1374, DiagnosticCategory::Message, "Convert_all_imports_not_used_as_a_value_to_type_only_imports_1374", "Convert all imports not used as a value to type-only imports"); }; - static shared await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module(){ return diag(1375, DiagnosticCategory::Error, "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375", + static shared_ptr Generators_are_not_allowed_in_an_ambient_context(){ return diag(1221, DiagnosticCategory::Error, "Generators_are_not_allowed_in_an_ambient_context_1221", "Generators are not allowed in an ambient context."); }; + static shared_ptr An_overload_signature_cannot_be_declared_as_a_generator(){ return diag(1222, DiagnosticCategory::Error, "An_overload_signature_cannot_be_declared_as_a_generator_1222", "An overload signature cannot be declared as a generator."); }; + static shared_ptr _0_tag_already_specified(){ return diag(1223, DiagnosticCategory::Error, "_0_tag_already_specified_1223", "'{0}' tag already specified."); }; + static shared_ptr Signature_0_must_be_a_type_predicate(){ return diag(1224, DiagnosticCategory::Error, "Signature_0_must_be_a_type_predicate_1224", "Signature '{0}' must be a type predicate."); }; + static shared_ptr Cannot_find_parameter_0(){ return diag(1225, DiagnosticCategory::Error, "Cannot_find_parameter_0_1225", "Cannot find parameter '{0}'."); }; + static shared_ptr Type_predicate_0_is_not_assignable_to_1(){ return diag(1226, DiagnosticCategory::Error, "Type_predicate_0_is_not_assignable_to_1_1226", "Type predicate '{0}' is not assignable to '{1}'."); }; + static shared_ptr Parameter_0_is_not_in_the_same_position_as_parameter_1(){ return diag(1227, DiagnosticCategory::Error, "Parameter_0_is_not_in_the_same_position_as_parameter_1_1227", "Parameter '{0}' is not in the same position as parameter '{1}'."); }; + static shared_ptr A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods(){ return diag(1228, DiagnosticCategory::Error, "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228", "A type predicate is only allowed in return type position for functions and methods."); }; + static shared_ptr A_type_predicate_cannot_reference_a_rest_parameter(){ return diag(1229, DiagnosticCategory::Error, "A_type_predicate_cannot_reference_a_rest_parameter_1229", "A type predicate cannot reference a rest parameter."); }; + static shared_ptr A_type_predicate_cannot_reference_element_0_in_a_binding_pattern(){ return diag(1230, DiagnosticCategory::Error, "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230", "A type predicate cannot reference element '{0}' in a binding pattern."); }; + static shared_ptr An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration(){ return diag(1231, DiagnosticCategory::Error, "An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration_1231", "An export assignment must be at the top level of a file or module declaration."); }; + static shared_ptr An_import_declaration_can_only_be_used_in_a_namespace_or_module(){ return diag(1232, DiagnosticCategory::Error, "An_import_declaration_can_only_be_used_in_a_namespace_or_module_1232", "An import declaration can only be used in a namespace or module."); }; + static shared_ptr An_export_declaration_can_only_be_used_in_a_module(){ return diag(1233, DiagnosticCategory::Error, "An_export_declaration_can_only_be_used_in_a_module_1233", "An export declaration can only be used in a module."); }; + static shared_ptr An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file(){ return diag(1234, DiagnosticCategory::Error, "An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234", "An ambient module declaration is only allowed at the top level in a file."); }; + static shared_ptr A_namespace_declaration_is_only_allowed_in_a_namespace_or_module(){ return diag(1235, DiagnosticCategory::Error, "A_namespace_declaration_is_only_allowed_in_a_namespace_or_module_1235", "A namespace declaration is only allowed in a namespace or module."); }; + static shared_ptr The_return_type_of_a_property_decorator_function_must_be_either_void_or_any(){ return diag(1236, DiagnosticCategory::Error, "The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236", "The return type of a property decorator function must be either 'void' or 'any'."); }; + static shared_ptr The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any(){ return diag(1237, DiagnosticCategory::Error, "The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237", "The return type of a parameter decorator function must be either 'void' or 'any'."); }; + static shared_ptr Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression(){ return diag(1238, DiagnosticCategory::Error, "Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression_1238", "Unable to resolve signature of class decorator when called as an expression."); }; + static shared_ptr Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression(){ return diag(1239, DiagnosticCategory::Error, "Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression_1239", "Unable to resolve signature of parameter decorator when called as an expression."); }; + static shared_ptr Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression(){ return diag(1240, DiagnosticCategory::Error, "Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression_1240", "Unable to resolve signature of property decorator when called as an expression."); }; + static shared_ptr Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression(){ return diag(1241, DiagnosticCategory::Error, "Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression_1241", "Unable to resolve signature of method decorator when called as an expression."); }; + static shared_ptr abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration(){ return diag(1242, DiagnosticCategory::Error, "abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242", "'abstract' modifier can only appear on a class, method, or property declaration."); }; + static shared_ptr _0_modifier_cannot_be_used_with_1_modifier(){ return diag(1243, DiagnosticCategory::Error, "_0_modifier_cannot_be_used_with_1_modifier_1243", "'{0}' modifier cannot be used with '{1}' modifier."); }; + static shared_ptr Abstract_methods_can_only_appear_within_an_abstract_class(){ return diag(1244, DiagnosticCategory::Error, "Abstract_methods_can_only_appear_within_an_abstract_class_1244", "Abstract methods can only appear within an abstract class."); }; + static shared_ptr Method_0_cannot_have_an_implementation_because_it_is_marked_abstract(){ return diag(1245, DiagnosticCategory::Error, "Method_0_cannot_have_an_implementation_because_it_is_marked_abstract_1245", "Method '{0}' cannot have an implementation because it is marked abstract."); }; + static shared_ptr An_interface_property_cannot_have_an_initializer(){ return diag(1246, DiagnosticCategory::Error, "An_interface_property_cannot_have_an_initializer_1246", "An interface property cannot have an initializer."); }; + static shared_ptr A_type_literal_property_cannot_have_an_initializer(){ return diag(1247, DiagnosticCategory::Error, "A_type_literal_property_cannot_have_an_initializer_1247", "A type literal property cannot have an initializer."); }; + static shared_ptr A_class_member_cannot_have_the_0_keyword(){ return diag(1248, DiagnosticCategory::Error, "A_class_member_cannot_have_the_0_keyword_1248", "A class member cannot have the '{0}' keyword."); }; + static shared_ptr A_decorator_can_only_decorate_a_method_implementation_not_an_overload(){ return diag(1249, DiagnosticCategory::Error, "A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249", "A decorator can only decorate a method implementation, not an overload."); }; + static shared_ptr Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5(){ return diag(1250, DiagnosticCategory::Error, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'."); }; + static shared_ptr Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_definitions_are_automatically_in_strict_mode(){ return diag(1251, DiagnosticCategory::Error, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Class definitions are automatically in strict mode."); }; + static shared_ptr Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_are_automatically_in_strict_mode(){ return diag(1252, DiagnosticCategory::Error, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_1252", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Modules are automatically in strict mode."); }; + static shared_ptr A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference(){ return diag(1254, DiagnosticCategory::Error, "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254", "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference."); }; + static shared_ptr A_definite_assignment_assertion_is_not_permitted_in_this_context(){ return diag(1255, DiagnosticCategory::Error, "A_definite_assignment_assertion_is_not_permitted_in_this_context_1255", "A definite assignment assertion '!' is not permitted in this context."); }; + static shared_ptr A_required_element_cannot_follow_an_optional_element(){ return diag(1257, DiagnosticCategory::Error, "A_required_element_cannot_follow_an_optional_element_1257", "A required element cannot follow an optional element."); }; + static shared_ptr A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration(){ return diag(1258, DiagnosticCategory::Error, "A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration_1258", "A default export must be at the top level of a file or module declaration."); }; + static shared_ptr Module_0_can_only_be_default_imported_using_the_1_flag(){ return diag(1259, DiagnosticCategory::Error, "Module_0_can_only_be_default_imported_using_the_1_flag_1259", "Module '{0}' can only be default-imported using the '{1}' flag"); }; + static shared_ptr Keywords_cannot_contain_escape_characters(){ return diag(1260, DiagnosticCategory::Error, "Keywords_cannot_contain_escape_characters_1260", "Keywords cannot contain escape characters."); }; + static shared_ptr Already_included_file_name_0_differs_from_file_name_1_only_in_casing(){ return diag(1261, DiagnosticCategory::Error, "Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261", "Already included file name '{0}' differs from file name '{1}' only in casing."); }; + static shared_ptr Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module(){ return diag(1262, DiagnosticCategory::Error, "Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module_1262", "Identifier expected. '{0}' is a reserved word at the top-level of a module."); }; + static shared_ptr Declarations_with_initializers_cannot_also_have_definite_assignment_assertions(){ return diag(1263, DiagnosticCategory::Error, "Declarations_with_initializers_cannot_also_have_definite_assignment_assertions_1263", "Declarations with initializers cannot also have definite assignment assertions."); }; + static shared_ptr Declarations_with_definite_assignment_assertions_must_also_have_type_annotations(){ return diag(1264, DiagnosticCategory::Error, "Declarations_with_definite_assignment_assertions_must_also_have_type_annotations_1264", "Declarations with definite assignment assertions must also have type annotations."); }; + static shared_ptr A_rest_element_cannot_follow_another_rest_element(){ return diag(1265, DiagnosticCategory::Error, "A_rest_element_cannot_follow_another_rest_element_1265", "A rest element cannot follow another rest element."); }; + static shared_ptr An_optional_element_cannot_follow_a_rest_element(){ return diag(1266, DiagnosticCategory::Error, "An_optional_element_cannot_follow_a_rest_element_1266", "An optional element cannot follow a rest element."); }; + static shared_ptr Property_0_cannot_have_an_initializer_because_it_is_marked_abstract(){ return diag(1267, DiagnosticCategory::Error, "Property_0_cannot_have_an_initializer_because_it_is_marked_abstract_1267", "Property '{0}' cannot have an initializer because it is marked abstract."); }; + static shared_ptr An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type(){ return diag(1268, DiagnosticCategory::Error, "An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type_1268", "An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type."); }; + static shared_ptr with_statements_are_not_allowed_in_an_async_function_block(){ return diag(1300, DiagnosticCategory::Error, "with_statements_are_not_allowed_in_an_async_function_block_1300", "'with' statements are not allowed in an async function block."); }; + static shared_ptr await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules(){ return diag(1308, DiagnosticCategory::Error, "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308", "'await' expressions are only allowed within async functions and at the top levels of modules."); }; + static shared_ptr Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern(){ return diag(1312, DiagnosticCategory::Error, "Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_1312", "Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern."); }; + static shared_ptr The_body_of_an_if_statement_cannot_be_the_empty_statement(){ return diag(1313, DiagnosticCategory::Error, "The_body_of_an_if_statement_cannot_be_the_empty_statement_1313", "The body of an 'if' statement cannot be the empty statement."); }; + static shared_ptr Global_module_exports_may_only_appear_in_module_files(){ return diag(1314, DiagnosticCategory::Error, "Global_module_exports_may_only_appear_in_module_files_1314", "Global module exports may only appear in module files."); }; + static shared_ptr Global_module_exports_may_only_appear_in_declaration_files(){ return diag(1315, DiagnosticCategory::Error, "Global_module_exports_may_only_appear_in_declaration_files_1315", "Global module exports may only appear in declaration files."); }; + static shared_ptr Global_module_exports_may_only_appear_at_top_level(){ return diag(1316, DiagnosticCategory::Error, "Global_module_exports_may_only_appear_at_top_level_1316", "Global module exports may only appear at top level."); }; + static shared_ptr A_parameter_property_cannot_be_declared_using_a_rest_parameter(){ return diag(1317, DiagnosticCategory::Error, "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317", "A parameter property cannot be declared using a rest parameter."); }; + static shared_ptr An_abstract_accessor_cannot_have_an_implementation(){ return diag(1318, DiagnosticCategory::Error, "An_abstract_accessor_cannot_have_an_implementation_1318", "An abstract accessor cannot have an implementation."); }; + static shared_ptr A_default_export_can_only_be_used_in_an_ECMAScript_style_module(){ return diag(1319, DiagnosticCategory::Error, "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319", "A default export can only be used in an ECMAScript-style module."); }; + static shared_ptr Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member(){ return diag(1320, DiagnosticCategory::Error, "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320", "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."); }; + static shared_ptr Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member(){ return diag(1321, DiagnosticCategory::Error, "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."); }; + static shared_ptr Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member(){ return diag(1322, DiagnosticCategory::Error, "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."); }; + static shared_ptr Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node12_or_nodenext(){ return diag(1323, DiagnosticCategory::Error, "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323", "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'."); }; + static shared_ptr Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext(){ return diag(1324, DiagnosticCategory::Error, "Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324", "Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'."); }; + static shared_ptr Argument_of_dynamic_import_cannot_be_spread_element(){ return diag(1325, DiagnosticCategory::Error, "Argument_of_dynamic_import_cannot_be_spread_element_1325", "Argument of dynamic import cannot be spread element."); }; + static shared_ptr Dynamic_import_cannot_have_type_arguments(){ return diag(1326, DiagnosticCategory::Error, "Dynamic_import_cannot_have_type_arguments_1326", "Dynamic import cannot have type arguments."); }; + static shared_ptr String_literal_with_double_quotes_expected(){ return diag(1327, DiagnosticCategory::Error, "String_literal_with_double_quotes_expected_1327", "String literal with double quotes expected."); }; + static shared_ptr Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal(){ return diag(1328, DiagnosticCategory::Error, "Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328", "Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal."); }; + static shared_ptr _0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0(){ return diag(1329, DiagnosticCategory::Error, "_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329", "'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?"); }; + static shared_ptr A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly(){ return diag(1330, DiagnosticCategory::Error, "A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330", "A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'."); }; + static shared_ptr A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly(){ return diag(1331, DiagnosticCategory::Error, "A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331", "A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'."); }; + static shared_ptr A_variable_whose_type_is_a_unique_symbol_type_must_be_const(){ return diag(1332, DiagnosticCategory::Error, "A_variable_whose_type_is_a_unique_symbol_type_must_be_const_1332", "A variable whose type is a 'unique symbol' type must be 'const'."); }; + static shared_ptr unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name(){ return diag(1333, DiagnosticCategory::Error, "unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333", "'unique symbol' types may not be used on a variable declaration with a binding name."); }; + static shared_ptr unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement(){ return diag(1334, DiagnosticCategory::Error, "unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334", "'unique symbol' types are only allowed on variables in a variable statement."); }; + static shared_ptr unique_symbol_types_are_not_allowed_here(){ return diag(1335, DiagnosticCategory::Error, "unique_symbol_types_are_not_allowed_here_1335", "'unique symbol' types are not allowed here."); }; + static shared_ptr An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead(){ return diag(1337, DiagnosticCategory::Error, "An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_o_1337", "An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead."); }; + static shared_ptr infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type(){ return diag(1338, DiagnosticCategory::Error, "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338", "'infer' declarations are only permitted in the 'extends' clause of a conditional type."); }; + static shared_ptr Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here(){ return diag(1339, DiagnosticCategory::Error, "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339", "Module '{0}' does not refer to a value, but is used as a value here."); }; + static shared_ptr Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0(){ return diag(1340, DiagnosticCategory::Error, "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340", "Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"); }; + static shared_ptr Type_arguments_cannot_be_used_here(){ return diag(1342, DiagnosticCategory::Error, "Type_arguments_cannot_be_used_here_1342", "Type arguments cannot be used here."); }; + static shared_ptr The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node12_or_nodenext(){ return diag(1343, DiagnosticCategory::Error, "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343", "The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'."); }; + static shared_ptr A_label_is_not_allowed_here(){ return diag(1344, DiagnosticCategory::Error, "A_label_is_not_allowed_here_1344", "'A label is not allowed here."); }; + static shared_ptr An_expression_of_type_void_cannot_be_tested_for_truthiness(){ return diag(1345, DiagnosticCategory::Error, "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345", "An expression of type 'void' cannot be tested for truthiness."); }; + static shared_ptr This_parameter_is_not_allowed_with_use_strict_directive(){ return diag(1346, DiagnosticCategory::Error, "This_parameter_is_not_allowed_with_use_strict_directive_1346", "This parameter is not allowed with 'use strict' directive."); }; + static shared_ptr use_strict_directive_cannot_be_used_with_non_simple_parameter_list(){ return diag(1347, DiagnosticCategory::Error, "use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347", "'use strict' directive cannot be used with non-simple parameter list."); }; + static shared_ptr Non_simple_parameter_declared_here(){ return diag(1348, DiagnosticCategory::Error, "Non_simple_parameter_declared_here_1348", "Non-simple parameter declared here."); }; + static shared_ptr use_strict_directive_used_here(){ return diag(1349, DiagnosticCategory::Error, "use_strict_directive_used_here_1349", "'use strict' directive used here."); }; + static shared_ptr Print_the_final_configuration_instead_of_building(){ return diag(1350, DiagnosticCategory::Message, "Print_the_final_configuration_instead_of_building_1350", "Print the final configuration instead of building."); }; + static shared_ptr An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal(){ return diag(1351, DiagnosticCategory::Error, "An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351", "An identifier or keyword cannot immediately follow a numeric literal."); }; + static shared_ptr A_bigint_literal_cannot_use_exponential_notation(){ return diag(1352, DiagnosticCategory::Error, "A_bigint_literal_cannot_use_exponential_notation_1352", "A bigint literal cannot use exponential notation."); }; + static shared_ptr A_bigint_literal_must_be_an_integer(){ return diag(1353, DiagnosticCategory::Error, "A_bigint_literal_must_be_an_integer_1353", "A bigint literal must be an integer."); }; + static shared_ptr readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types(){ return diag(1354, DiagnosticCategory::Error, "readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354", "'readonly' type modifier is only permitted on array and tuple literal types."); }; + static shared_ptr A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals(){ return diag(1355, DiagnosticCategory::Error, "A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355", "A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals."); }; + static shared_ptr Did_you_mean_to_mark_this_function_as_async(){ return diag(1356, DiagnosticCategory::Error, "Did_you_mean_to_mark_this_function_as_async_1356", "Did you mean to mark this function as 'async'?"); }; + static shared_ptr An_enum_member_name_must_be_followed_by_a_or(){ return diag(1357, DiagnosticCategory::Error, "An_enum_member_name_must_be_followed_by_a_or_1357", "An enum member name must be followed by a ',', '=', or '}'."); }; + static shared_ptr Tagged_template_expressions_are_not_permitted_in_an_optional_chain(){ return diag(1358, DiagnosticCategory::Error, "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358", "Tagged template expressions are not permitted in an optional chain."); }; + static shared_ptr Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here(){ return diag(1359, DiagnosticCategory::Error, "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359", "Identifier expected. '{0}' is a reserved word that cannot be used here."); }; + static shared_ptr _0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type(){ return diag(1361, DiagnosticCategory::Error, "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361", "'{0}' cannot be used as a value because it was imported using 'import type'."); }; + static shared_ptr _0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type(){ return diag(1362, DiagnosticCategory::Error, "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362", "'{0}' cannot be used as a value because it was exported using 'export type'."); }; + static shared_ptr A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both(){ return diag(1363, DiagnosticCategory::Error, "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363", "A type-only import can specify a default import or named bindings, but not both."); }; + static shared_ptr Convert_to_type_only_export(){ return diag(1364, DiagnosticCategory::Message, "Convert_to_type_only_export_1364", "Convert to type-only export"); }; + static shared_ptr Convert_all_re_exported_types_to_type_only_exports(){ return diag(1365, DiagnosticCategory::Message, "Convert_all_re_exported_types_to_type_only_exports_1365", "Convert all re-exported types to type-only exports"); }; + static shared_ptr Split_into_two_separate_import_declarations(){ return diag(1366, DiagnosticCategory::Message, "Split_into_two_separate_import_declarations_1366", "Split into two separate import declarations"); }; + static shared_ptr Split_all_invalid_type_only_imports(){ return diag(1367, DiagnosticCategory::Message, "Split_all_invalid_type_only_imports_1367", "Split all invalid type-only imports"); }; + static shared_ptr Did_you_mean_0(){ return diag(1369, DiagnosticCategory::Message, "Did_you_mean_0_1369", "Did you mean '{0}'?"); }; + static shared_ptr This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set_to_error(){ return diag(1371, DiagnosticCategory::Error, "This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set__1371", "This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'."); }; + static shared_ptr Convert_to_type_only_import(){ return diag(1373, DiagnosticCategory::Message, "Convert_to_type_only_import_1373", "Convert to type-only import"); }; + static shared_ptr Convert_all_imports_not_used_as_a_value_to_type_only_imports(){ return diag(1374, DiagnosticCategory::Message, "Convert_all_imports_not_used_as_a_value_to_type_only_imports_1374", "Convert all imports not used as a value to type-only imports"); }; + static shared_ptr await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module(){ return diag(1375, DiagnosticCategory::Error, "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375", "'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."); }; - static shared _0_was_imported_here(){ return diag(1376, DiagnosticCategory::Message, "_0_was_imported_here_1376", "'{0}' was imported here."); }; - static shared _0_was_exported_here(){ return diag(1377, DiagnosticCategory::Message, "_0_was_exported_here_1377", "'{0}' was exported here."); }; - static shared Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher(){ return diag(1378, DiagnosticCategory::Error, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_o_1378", + static shared_ptr _0_was_imported_here(){ return diag(1376, DiagnosticCategory::Message, "_0_was_imported_here_1376", "'{0}' was imported here."); }; + static shared_ptr _0_was_exported_here(){ return diag(1377, DiagnosticCategory::Message, "_0_was_exported_here_1377", "'{0}' was exported here."); }; + static shared_ptr Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher(){ return diag(1378, DiagnosticCategory::Error, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_o_1378", "Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher."); }; - static shared An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type(){ return diag(1379, DiagnosticCategory::Error, "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379", "An import alias cannot reference a declaration that was exported using 'export type'."); }; - static shared An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type(){ return diag(1380, DiagnosticCategory::Error, "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380", "An import alias cannot reference a declaration that was imported using 'import type'."); }; - static shared Unexpected_token_Did_you_mean_or_rbrace(){ return diag(1381, DiagnosticCategory::Error, "Unexpected_token_Did_you_mean_or_rbrace_1381", "Unexpected token. Did you mean `{'}'}` or `}`?"); }; - static shared Unexpected_token_Did_you_mean_or_gt(){ return diag(1382, DiagnosticCategory::Error, "Unexpected_token_Did_you_mean_or_gt_1382", "Unexpected token. Did you mean `{'>'}` or `>`?"); }; - static shared Only_named_exports_may_use_export_type(){ return diag(1383, DiagnosticCategory::Error, "Only_named_exports_may_use_export_type_1383", "Only named exports may use 'export type'."); }; - static shared A_new_expression_with_type_arguments_must_always_be_followed_by_a_parenthesized_argument_list(){ return diag(1384, DiagnosticCategory::Error, "A_new_expression_with_type_arguments_must_always_be_followed_by_a_parenthesized_argument_list_1384", "A 'new' expression with type arguments must always be followed by a parenthesized argument list."); }; - static shared Function_type_notation_must_be_parenthesized_when_used_in_a_union_type(){ return diag(1385, DiagnosticCategory::Error, "Function_type_notation_must_be_parenthesized_when_used_in_a_union_type_1385", "Function type notation must be parenthesized when used in a union type."); }; - static shared Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type(){ return diag(1386, DiagnosticCategory::Error, "Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type_1386", "Constructor type notation must be parenthesized when used in a union type."); }; - static shared Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type(){ return diag(1387, DiagnosticCategory::Error, "Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1387", "Function type notation must be parenthesized when used in an intersection type."); }; - static shared Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type(){ return diag(1388, DiagnosticCategory::Error, "Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1388", "Constructor type notation must be parenthesized when used in an intersection type."); }; - static shared _0_is_not_allowed_as_a_variable_declaration_name(){ return diag(1389, DiagnosticCategory::Error, "_0_is_not_allowed_as_a_variable_declaration_name_1389", "'{0}' is not allowed as a variable declaration name."); }; - static shared _0_is_not_allowed_as_a_parameter_name(){ return diag(1390, DiagnosticCategory::Error, "_0_is_not_allowed_as_a_parameter_name_1390", "'{0}' is not allowed as a parameter name."); }; - static shared An_import_alias_cannot_use_import_type(){ return diag(1392, DiagnosticCategory::Error, "An_import_alias_cannot_use_import_type_1392", "An import alias cannot use 'import type'"); }; - static shared Imported_via_0_from_file_1(){ return diag(1393, DiagnosticCategory::Message, "Imported_via_0_from_file_1_1393", "Imported via {0} from file '{1}'"); }; - static shared Imported_via_0_from_file_1_with_packageId_2(){ return diag(1394, DiagnosticCategory::Message, "Imported_via_0_from_file_1_with_packageId_2_1394", "Imported via {0} from file '{1}' with packageId '{2}'"); }; - static shared Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions(){ return diag(1395, DiagnosticCategory::Message, "Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions_1395", "Imported via {0} from file '{1}' to import 'importHelpers' as specified in compilerOptions"); }; - static shared Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions(){ return diag(1396, DiagnosticCategory::Message, "Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions_1396", "Imported via {0} from file '{1}' with packageId '{2}' to import 'importHelpers' as specified in compilerOptions"); }; - static shared Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions(){ return diag(1397, DiagnosticCategory::Message, "Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions_1397", "Imported via {0} from file '{1}' to import 'jsx' and 'jsxs' factory functions"); }; - static shared Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions(){ return diag(1398, DiagnosticCategory::Message, "Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions_1398", "Imported via {0} from file '{1}' with packageId '{2}' to import 'jsx' and 'jsxs' factory functions"); }; - static shared File_is_included_via_import_here(){ return diag(1399, DiagnosticCategory::Message, "File_is_included_via_import_here_1399", "File is included via import here."); }; - static shared Referenced_via_0_from_file_1(){ return diag(1400, DiagnosticCategory::Message, "Referenced_via_0_from_file_1_1400", "Referenced via '{0}' from file '{1}'"); }; - static shared File_is_included_via_reference_here(){ return diag(1401, DiagnosticCategory::Message, "File_is_included_via_reference_here_1401", "File is included via reference here."); }; - static shared Type_library_referenced_via_0_from_file_1(){ return diag(1402, DiagnosticCategory::Message, "Type_library_referenced_via_0_from_file_1_1402", "Type library referenced via '{0}' from file '{1}'"); }; - static shared Type_library_referenced_via_0_from_file_1_with_packageId_2(){ return diag(1403, DiagnosticCategory::Message, "Type_library_referenced_via_0_from_file_1_with_packageId_2_1403", "Type library referenced via '{0}' from file '{1}' with packageId '{2}'"); }; - static shared File_is_included_via_type_library_reference_here(){ return diag(1404, DiagnosticCategory::Message, "File_is_included_via_type_library_reference_here_1404", "File is included via type library reference here."); }; - static shared Library_referenced_via_0_from_file_1(){ return diag(1405, DiagnosticCategory::Message, "Library_referenced_via_0_from_file_1_1405", "Library referenced via '{0}' from file '{1}'"); }; - static shared File_is_included_via_library_reference_here(){ return diag(1406, DiagnosticCategory::Message, "File_is_included_via_library_reference_here_1406", "File is included via library reference here."); }; - static shared Matched_by_include_pattern_0_in_1(){ return diag(1407, DiagnosticCategory::Message, "Matched_by_include_pattern_0_in_1_1407", "Matched by include pattern '{0}' in '{1}'"); }; - static shared File_is_matched_by_include_pattern_specified_here(){ return diag(1408, DiagnosticCategory::Message, "File_is_matched_by_include_pattern_specified_here_1408", "File is matched by include pattern specified here."); }; - static shared Part_of_files_list_in_tsconfig_json(){ return diag(1409, DiagnosticCategory::Message, "Part_of_files_list_in_tsconfig_json_1409", "Part of 'files' list in tsconfig.json"); }; - static shared File_is_matched_by_files_list_specified_here(){ return diag(1410, DiagnosticCategory::Message, "File_is_matched_by_files_list_specified_here_1410", "File is matched by 'files' list specified here."); }; - static shared Output_from_referenced_project_0_included_because_1_specified(){ return diag(1411, DiagnosticCategory::Message, "Output_from_referenced_project_0_included_because_1_specified_1411", "Output from referenced project '{0}' included because '{1}' specified"); }; - static shared Output_from_referenced_project_0_included_because_module_is_specified_as_none(){ return diag(1412, DiagnosticCategory::Message, "Output_from_referenced_project_0_included_because_module_is_specified_as_none_1412", "Output from referenced project '{0}' included because '--module' is specified as 'none'"); }; - static shared File_is_output_from_referenced_project_specified_here(){ return diag(1413, DiagnosticCategory::Message, "File_is_output_from_referenced_project_specified_here_1413", "File is output from referenced project specified here."); }; - static shared Source_from_referenced_project_0_included_because_1_specified(){ return diag(1414, DiagnosticCategory::Message, "Source_from_referenced_project_0_included_because_1_specified_1414", "Source from referenced project '{0}' included because '{1}' specified"); }; - static shared Source_from_referenced_project_0_included_because_module_is_specified_as_none(){ return diag(1415, DiagnosticCategory::Message, "Source_from_referenced_project_0_included_because_module_is_specified_as_none_1415", "Source from referenced project '{0}' included because '--module' is specified as 'none'"); }; - static shared File_is_source_from_referenced_project_specified_here(){ return diag(1416, DiagnosticCategory::Message, "File_is_source_from_referenced_project_specified_here_1416", "File is source from referenced project specified here."); }; - static shared Entry_point_of_type_library_0_specified_in_compilerOptions(){ return diag(1417, DiagnosticCategory::Message, "Entry_point_of_type_library_0_specified_in_compilerOptions_1417", "Entry point of type library '{0}' specified in compilerOptions"); }; - static shared Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1(){ return diag(1418, DiagnosticCategory::Message, "Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1_1418", "Entry point of type library '{0}' specified in compilerOptions with packageId '{1}'"); }; - static shared File_is_entry_point_of_type_library_specified_here(){ return diag(1419, DiagnosticCategory::Message, "File_is_entry_point_of_type_library_specified_here_1419", "File is entry point of type library specified here."); }; - static shared Entry_point_for_implicit_type_library_0(){ return diag(1420, DiagnosticCategory::Message, "Entry_point_for_implicit_type_library_0_1420", "Entry point for implicit type library '{0}'"); }; - static shared Entry_point_for_implicit_type_library_0_with_packageId_1(){ return diag(1421, DiagnosticCategory::Message, "Entry_point_for_implicit_type_library_0_with_packageId_1_1421", "Entry point for implicit type library '{0}' with packageId '{1}'"); }; - static shared Library_0_specified_in_compilerOptions(){ return diag(1422, DiagnosticCategory::Message, "Library_0_specified_in_compilerOptions_1422", "Library '{0}' specified in compilerOptions"); }; - static shared File_is_library_specified_here(){ return diag(1423, DiagnosticCategory::Message, "File_is_library_specified_here_1423", "File is library specified here."); }; - static shared Default_library(){ return diag(1424, DiagnosticCategory::Message, "Default_library_1424", "Default library"); }; - static shared Default_library_for_target_0(){ return diag(1425, DiagnosticCategory::Message, "Default_library_for_target_0_1425", "Default library for target '{0}'"); }; - static shared File_is_default_library_for_target_specified_here(){ return diag(1426, DiagnosticCategory::Message, "File_is_default_library_for_target_specified_here_1426", "File is default library for target specified here."); }; - static shared Root_file_specified_for_compilation(){ return diag(1427, DiagnosticCategory::Message, "Root_file_specified_for_compilation_1427", "Root file specified for compilation"); }; - static shared File_is_output_of_project_reference_source_0(){ return diag(1428, DiagnosticCategory::Message, "File_is_output_of_project_reference_source_0_1428", "File is output of project reference source '{0}'"); }; - static shared File_redirects_to_file_0(){ return diag(1429, DiagnosticCategory::Message, "File_redirects_to_file_0_1429", "File redirects to file '{0}'"); }; - static shared The_file_is_in_the_program_because_Colon(){ return diag(1430, DiagnosticCategory::Message, "The_file_is_in_the_program_because_Colon_1430", "The file is in the program because:"); }; - static shared for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module(){ return diag(1431, DiagnosticCategory::Error, "for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431", + static shared_ptr An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type(){ return diag(1379, DiagnosticCategory::Error, "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379", "An import alias cannot reference a declaration that was exported using 'export type'."); }; + static shared_ptr An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type(){ return diag(1380, DiagnosticCategory::Error, "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380", "An import alias cannot reference a declaration that was imported using 'import type'."); }; + static shared_ptr Unexpected_token_Did_you_mean_or_rbrace(){ return diag(1381, DiagnosticCategory::Error, "Unexpected_token_Did_you_mean_or_rbrace_1381", "Unexpected token. Did you mean `{'}'}` or `}`?"); }; + static shared_ptr Unexpected_token_Did_you_mean_or_gt(){ return diag(1382, DiagnosticCategory::Error, "Unexpected_token_Did_you_mean_or_gt_1382", "Unexpected token. Did you mean `{'>'}` or `>`?"); }; + static shared_ptr Only_named_exports_may_use_export_type(){ return diag(1383, DiagnosticCategory::Error, "Only_named_exports_may_use_export_type_1383", "Only named exports may use 'export type'."); }; + static shared_ptr A_new_expression_with_type_arguments_must_always_be_followed_by_a_parenthesized_argument_list(){ return diag(1384, DiagnosticCategory::Error, "A_new_expression_with_type_arguments_must_always_be_followed_by_a_parenthesized_argument_list_1384", "A 'new' expression with type arguments must always be followed by a parenthesized argument list."); }; + static shared_ptr Function_type_notation_must_be_parenthesized_when_used_in_a_union_type(){ return diag(1385, DiagnosticCategory::Error, "Function_type_notation_must_be_parenthesized_when_used_in_a_union_type_1385", "Function type notation must be parenthesized when used in a union type."); }; + static shared_ptr Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type(){ return diag(1386, DiagnosticCategory::Error, "Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type_1386", "Constructor type notation must be parenthesized when used in a union type."); }; + static shared_ptr Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type(){ return diag(1387, DiagnosticCategory::Error, "Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1387", "Function type notation must be parenthesized when used in an intersection type."); }; + static shared_ptr Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type(){ return diag(1388, DiagnosticCategory::Error, "Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1388", "Constructor type notation must be parenthesized when used in an intersection type."); }; + static shared_ptr _0_is_not_allowed_as_a_variable_declaration_name(){ return diag(1389, DiagnosticCategory::Error, "_0_is_not_allowed_as_a_variable_declaration_name_1389", "'{0}' is not allowed as a variable declaration name."); }; + static shared_ptr _0_is_not_allowed_as_a_parameter_name(){ return diag(1390, DiagnosticCategory::Error, "_0_is_not_allowed_as_a_parameter_name_1390", "'{0}' is not allowed as a parameter name."); }; + static shared_ptr An_import_alias_cannot_use_import_type(){ return diag(1392, DiagnosticCategory::Error, "An_import_alias_cannot_use_import_type_1392", "An import alias cannot use 'import type'"); }; + static shared_ptr Imported_via_0_from_file_1(){ return diag(1393, DiagnosticCategory::Message, "Imported_via_0_from_file_1_1393", "Imported via {0} from file '{1}'"); }; + static shared_ptr Imported_via_0_from_file_1_with_packageId_2(){ return diag(1394, DiagnosticCategory::Message, "Imported_via_0_from_file_1_with_packageId_2_1394", "Imported via {0} from file '{1}' with packageId '{2}'"); }; + static shared_ptr Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions(){ return diag(1395, DiagnosticCategory::Message, "Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions_1395", "Imported via {0} from file '{1}' to import 'importHelpers' as specified in compilerOptions"); }; + static shared_ptr Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions(){ return diag(1396, DiagnosticCategory::Message, "Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions_1396", "Imported via {0} from file '{1}' with packageId '{2}' to import 'importHelpers' as specified in compilerOptions"); }; + static shared_ptr Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions(){ return diag(1397, DiagnosticCategory::Message, "Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions_1397", "Imported via {0} from file '{1}' to import 'jsx' and 'jsxs' factory functions"); }; + static shared_ptr Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions(){ return diag(1398, DiagnosticCategory::Message, "Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions_1398", "Imported via {0} from file '{1}' with packageId '{2}' to import 'jsx' and 'jsxs' factory functions"); }; + static shared_ptr File_is_included_via_import_here(){ return diag(1399, DiagnosticCategory::Message, "File_is_included_via_import_here_1399", "File is included via import here."); }; + static shared_ptr Referenced_via_0_from_file_1(){ return diag(1400, DiagnosticCategory::Message, "Referenced_via_0_from_file_1_1400", "Referenced via '{0}' from file '{1}'"); }; + static shared_ptr File_is_included_via_reference_here(){ return diag(1401, DiagnosticCategory::Message, "File_is_included_via_reference_here_1401", "File is included via reference here."); }; + static shared_ptr Type_library_referenced_via_0_from_file_1(){ return diag(1402, DiagnosticCategory::Message, "Type_library_referenced_via_0_from_file_1_1402", "Type library referenced via '{0}' from file '{1}'"); }; + static shared_ptr Type_library_referenced_via_0_from_file_1_with_packageId_2(){ return diag(1403, DiagnosticCategory::Message, "Type_library_referenced_via_0_from_file_1_with_packageId_2_1403", "Type library referenced via '{0}' from file '{1}' with packageId '{2}'"); }; + static shared_ptr File_is_included_via_type_library_reference_here(){ return diag(1404, DiagnosticCategory::Message, "File_is_included_via_type_library_reference_here_1404", "File is included via type library reference here."); }; + static shared_ptr Library_referenced_via_0_from_file_1(){ return diag(1405, DiagnosticCategory::Message, "Library_referenced_via_0_from_file_1_1405", "Library referenced via '{0}' from file '{1}'"); }; + static shared_ptr File_is_included_via_library_reference_here(){ return diag(1406, DiagnosticCategory::Message, "File_is_included_via_library_reference_here_1406", "File is included via library reference here."); }; + static shared_ptr Matched_by_include_pattern_0_in_1(){ return diag(1407, DiagnosticCategory::Message, "Matched_by_include_pattern_0_in_1_1407", "Matched by include pattern '{0}' in '{1}'"); }; + static shared_ptr File_is_matched_by_include_pattern_specified_here(){ return diag(1408, DiagnosticCategory::Message, "File_is_matched_by_include_pattern_specified_here_1408", "File is matched by include pattern specified here."); }; + static shared_ptr Part_of_files_list_in_tsconfig_json(){ return diag(1409, DiagnosticCategory::Message, "Part_of_files_list_in_tsconfig_json_1409", "Part of 'files' list in tsconfig.json"); }; + static shared_ptr File_is_matched_by_files_list_specified_here(){ return diag(1410, DiagnosticCategory::Message, "File_is_matched_by_files_list_specified_here_1410", "File is matched by 'files' list specified here."); }; + static shared_ptr Output_from_referenced_project_0_included_because_1_specified(){ return diag(1411, DiagnosticCategory::Message, "Output_from_referenced_project_0_included_because_1_specified_1411", "Output from referenced project '{0}' included because '{1}' specified"); }; + static shared_ptr Output_from_referenced_project_0_included_because_module_is_specified_as_none(){ return diag(1412, DiagnosticCategory::Message, "Output_from_referenced_project_0_included_because_module_is_specified_as_none_1412", "Output from referenced project '{0}' included because '--module' is specified as 'none'"); }; + static shared_ptr File_is_output_from_referenced_project_specified_here(){ return diag(1413, DiagnosticCategory::Message, "File_is_output_from_referenced_project_specified_here_1413", "File is output from referenced project specified here."); }; + static shared_ptr Source_from_referenced_project_0_included_because_1_specified(){ return diag(1414, DiagnosticCategory::Message, "Source_from_referenced_project_0_included_because_1_specified_1414", "Source from referenced project '{0}' included because '{1}' specified"); }; + static shared_ptr Source_from_referenced_project_0_included_because_module_is_specified_as_none(){ return diag(1415, DiagnosticCategory::Message, "Source_from_referenced_project_0_included_because_module_is_specified_as_none_1415", "Source from referenced project '{0}' included because '--module' is specified as 'none'"); }; + static shared_ptr File_is_source_from_referenced_project_specified_here(){ return diag(1416, DiagnosticCategory::Message, "File_is_source_from_referenced_project_specified_here_1416", "File is source from referenced project specified here."); }; + static shared_ptr Entry_point_of_type_library_0_specified_in_compilerOptions(){ return diag(1417, DiagnosticCategory::Message, "Entry_point_of_type_library_0_specified_in_compilerOptions_1417", "Entry point of type library '{0}' specified in compilerOptions"); }; + static shared_ptr Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1(){ return diag(1418, DiagnosticCategory::Message, "Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1_1418", "Entry point of type library '{0}' specified in compilerOptions with packageId '{1}'"); }; + static shared_ptr File_is_entry_point_of_type_library_specified_here(){ return diag(1419, DiagnosticCategory::Message, "File_is_entry_point_of_type_library_specified_here_1419", "File is entry point of type library specified here."); }; + static shared_ptr Entry_point_for_implicit_type_library_0(){ return diag(1420, DiagnosticCategory::Message, "Entry_point_for_implicit_type_library_0_1420", "Entry point for implicit type library '{0}'"); }; + static shared_ptr Entry_point_for_implicit_type_library_0_with_packageId_1(){ return diag(1421, DiagnosticCategory::Message, "Entry_point_for_implicit_type_library_0_with_packageId_1_1421", "Entry point for implicit type library '{0}' with packageId '{1}'"); }; + static shared_ptr Library_0_specified_in_compilerOptions(){ return diag(1422, DiagnosticCategory::Message, "Library_0_specified_in_compilerOptions_1422", "Library '{0}' specified in compilerOptions"); }; + static shared_ptr File_is_library_specified_here(){ return diag(1423, DiagnosticCategory::Message, "File_is_library_specified_here_1423", "File is library specified here."); }; + static shared_ptr Default_library(){ return diag(1424, DiagnosticCategory::Message, "Default_library_1424", "Default library"); }; + static shared_ptr Default_library_for_target_0(){ return diag(1425, DiagnosticCategory::Message, "Default_library_for_target_0_1425", "Default library for target '{0}'"); }; + static shared_ptr File_is_default_library_for_target_specified_here(){ return diag(1426, DiagnosticCategory::Message, "File_is_default_library_for_target_specified_here_1426", "File is default library for target specified here."); }; + static shared_ptr Root_file_specified_for_compilation(){ return diag(1427, DiagnosticCategory::Message, "Root_file_specified_for_compilation_1427", "Root file specified for compilation"); }; + static shared_ptr File_is_output_of_project_reference_source_0(){ return diag(1428, DiagnosticCategory::Message, "File_is_output_of_project_reference_source_0_1428", "File is output of project reference source '{0}'"); }; + static shared_ptr File_redirects_to_file_0(){ return diag(1429, DiagnosticCategory::Message, "File_redirects_to_file_0_1429", "File redirects to file '{0}'"); }; + static shared_ptr The_file_is_in_the_program_because_Colon(){ return diag(1430, DiagnosticCategory::Message, "The_file_is_in_the_program_because_Colon_1430", "The file is in the program because:"); }; + static shared_ptr for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module(){ return diag(1431, DiagnosticCategory::Error, "for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431", "'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."); }; - static shared Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher(){ return diag(1432, DiagnosticCategory::Error, "Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or__1432", + static shared_ptr Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher(){ return diag(1432, DiagnosticCategory::Error, "Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or__1432", "Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher."); }; - static shared Decorators_may_not_be_applied_to_this_parameters(){ return diag(1433, DiagnosticCategory::Error, "Decorators_may_not_be_applied_to_this_parameters_1433", "Decorators may not be applied to 'this' parameters."); }; - static shared Unexpected_keyword_or_identifier(){ return diag(1434, DiagnosticCategory::Error, "Unexpected_keyword_or_identifier_1434", "Unexpected keyword or identifier."); }; - static shared Unknown_keyword_or_identifier_Did_you_mean_0(){ return diag(1435, DiagnosticCategory::Error, "Unknown_keyword_or_identifier_Did_you_mean_0_1435", "Unknown keyword or identifier. Did you mean '{0}'?"); }; - static shared Decorators_must_precede_the_name_and_all_keywords_of_property_declarations(){ return diag(1436, DiagnosticCategory::Error, "Decorators_must_precede_the_name_and_all_keywords_of_property_declarations_1436", "Decorators must precede the name and all keywords of property declarations."); }; - static shared Namespace_must_be_given_a_name(){ return diag(1437, DiagnosticCategory::Error, "Namespace_must_be_given_a_name_1437", "Namespace must be given a name."); }; - static shared Interface_must_be_given_a_name(){ return diag(1438, DiagnosticCategory::Error, "Interface_must_be_given_a_name_1438", "Interface must be given a name."); }; - static shared Type_alias_must_be_given_a_name(){ return diag(1439, DiagnosticCategory::Error, "Type_alias_must_be_given_a_name_1439", "Type alias must be given a name."); }; - static shared Variable_declaration_not_allowed_at_this_location(){ return diag(1440, DiagnosticCategory::Error, "Variable_declaration_not_allowed_at_this_location_1440", "Variable declaration not allowed at this location."); }; - static shared Cannot_start_a_function_call_in_a_type_annotation(){ return diag(1441, DiagnosticCategory::Error, "Cannot_start_a_function_call_in_a_type_annotation_1441", "Cannot start a function call in a type annotation."); }; - static shared Expected_for_property_initializer(){ return diag(1442, DiagnosticCategory::Error, "Expected_for_property_initializer_1442", "Expected '=' for property initializer."); }; - static shared Module_declaration_names_may_only_use_or_quoted_strings(){ return diag(1443, DiagnosticCategory::Error, "Module_declaration_names_may_only_use_or_quoted_strings_1443", "Module declaration names may only use ' or \" quoted strings."); }; - static shared _0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled(){ return diag(1444, DiagnosticCategory::Error, "_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedMod_1444", "'{0}' is a type and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."); }; - static shared _0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled(){ return diag(1446, DiagnosticCategory::Error, "_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveVa_1446", "'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."); }; - static shared _0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_isolatedModules_is_enabled(){ return diag(1448, DiagnosticCategory::Error, "_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_isol_1448", "'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when 'isolatedModules' is enabled."); }; - static shared Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed(){ return diag(1449, DiagnosticCategory::Message, "Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449", "Preserve unused imported values in the JavaScript output that would otherwise be removed."); }; - static shared Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments(){ return diag(1450, DiagnosticCategory::Message, "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments_1450", "Dynamic imports can only accept a module specifier and an optional assertion as arguments"); }; - static shared Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression(){ return diag(1451, DiagnosticCategory::Error, "Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451", + static shared_ptr Decorators_may_not_be_applied_to_this_parameters(){ return diag(1433, DiagnosticCategory::Error, "Decorators_may_not_be_applied_to_this_parameters_1433", "Decorators may not be applied to 'this' parameters."); }; + static shared_ptr Unexpected_keyword_or_identifier(){ return diag(1434, DiagnosticCategory::Error, "Unexpected_keyword_or_identifier_1434", "Unexpected keyword or identifier."); }; + static shared_ptr Unknown_keyword_or_identifier_Did_you_mean_0(){ return diag(1435, DiagnosticCategory::Error, "Unknown_keyword_or_identifier_Did_you_mean_0_1435", "Unknown keyword or identifier. Did you mean '{0}'?"); }; + static shared_ptr Decorators_must_precede_the_name_and_all_keywords_of_property_declarations(){ return diag(1436, DiagnosticCategory::Error, "Decorators_must_precede_the_name_and_all_keywords_of_property_declarations_1436", "Decorators must precede the name and all keywords of property declarations."); }; + static shared_ptr Namespace_must_be_given_a_name(){ return diag(1437, DiagnosticCategory::Error, "Namespace_must_be_given_a_name_1437", "Namespace must be given a name."); }; + static shared_ptr Interface_must_be_given_a_name(){ return diag(1438, DiagnosticCategory::Error, "Interface_must_be_given_a_name_1438", "Interface must be given a name."); }; + static shared_ptr Type_alias_must_be_given_a_name(){ return diag(1439, DiagnosticCategory::Error, "Type_alias_must_be_given_a_name_1439", "Type alias must be given a name."); }; + static shared_ptr Variable_declaration_not_allowed_at_this_location(){ return diag(1440, DiagnosticCategory::Error, "Variable_declaration_not_allowed_at_this_location_1440", "Variable declaration not allowed at this location."); }; + static shared_ptr Cannot_start_a_function_call_in_a_type_annotation(){ return diag(1441, DiagnosticCategory::Error, "Cannot_start_a_function_call_in_a_type_annotation_1441", "Cannot start a function call in a type annotation."); }; + static shared_ptr Expected_for_property_initializer(){ return diag(1442, DiagnosticCategory::Error, "Expected_for_property_initializer_1442", "Expected '=' for property initializer."); }; + static shared_ptr Module_declaration_names_may_only_use_or_quoted_strings(){ return diag(1443, DiagnosticCategory::Error, "Module_declaration_names_may_only_use_or_quoted_strings_1443", "Module declaration names may only use ' or \" quoted strings."); }; + static shared_ptr _0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled(){ return diag(1444, DiagnosticCategory::Error, "_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedMod_1444", "'{0}' is a type and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."); }; + static shared_ptr _0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled(){ return diag(1446, DiagnosticCategory::Error, "_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveVa_1446", "'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."); }; + static shared_ptr _0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_isolatedModules_is_enabled(){ return diag(1448, DiagnosticCategory::Error, "_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_isol_1448", "'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when 'isolatedModules' is enabled."); }; + static shared_ptr Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed(){ return diag(1449, DiagnosticCategory::Message, "Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449", "Preserve unused imported values in the JavaScript output that would otherwise be removed."); }; + static shared_ptr Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments(){ return diag(1450, DiagnosticCategory::Message, "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments_1450", "Dynamic imports can only accept a module specifier and an optional assertion as arguments"); }; + static shared_ptr Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression(){ return diag(1451, DiagnosticCategory::Error, "Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451", "Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"); }; - static shared The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output(){ return diag(1470, DiagnosticCategory::Error, "The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470", "The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."); }; - static shared Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_synchronously_Use_dynamic_import_instead(){ return diag(1471, DiagnosticCategory::Error, "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471", + static shared_ptr The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output(){ return diag(1470, DiagnosticCategory::Error, "The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470", "The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."); }; + static shared_ptr Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_synchronously_Use_dynamic_import_instead(){ return diag(1471, DiagnosticCategory::Error, "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471", "Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead."); }; - static shared The_types_of_0_are_incompatible_between_these_types(){ return diag(2200, DiagnosticCategory::Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."); }; - static shared The_types_returned_by_0_are_incompatible_between_these_types(){ return diag(2201, DiagnosticCategory::Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."); }; - static shared Call_signature_return_types_0_and_1_are_incompatible(){ return diag(2202, DiagnosticCategory::Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", /*reportsUnnecessary*/ false, /*elidedInCompatabilityPyramid*/ true); }; - static shared Construct_signature_return_types_0_and_1_are_incompatible(){ return diag(2203, DiagnosticCategory::Error, "Construct_signature_return_types_0_and_1_are_incompatible_2203", "Construct signature return types '{0}' and '{1}' are incompatible.", /*reportsUnnecessary*/ false, /*elidedInCompatabilityPyramid*/ true); }; - static shared Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1(){ return diag(2204, DiagnosticCategory::Error, "Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204", "Call signatures with no arguments have incompatible return types '{0}' and '{1}'.", /*reportsUnnecessary*/ false, /*elidedInCompatabilityPyramid*/ true); }; - static shared Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1(){ return diag(2205, DiagnosticCategory::Error, "Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205", "Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.", /*reportsUnnecessary*/ false, /*elidedInCompatabilityPyramid*/ true); }; - static shared The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement(){ return diag(2206, DiagnosticCategory::Error, "The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206", "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement."); }; - static shared The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement(){ return diag(2207, DiagnosticCategory::Error, "The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207", "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement."); }; - static shared Duplicate_identifier_0(){ return diag(2300, DiagnosticCategory::Error, "Duplicate_identifier_0_2300", "Duplicate identifier '{0}'."); }; - static shared Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor(){ return diag(2301, DiagnosticCategory::Error, "Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301", "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."); }; - static shared Static_members_cannot_reference_class_type_parameters(){ return diag(2302, DiagnosticCategory::Error, "Static_members_cannot_reference_class_type_parameters_2302", "Static members cannot reference class type parameters."); }; - static shared Circular_definition_of_import_alias_0(){ return diag(2303, DiagnosticCategory::Error, "Circular_definition_of_import_alias_0_2303", "Circular definition of import alias '{0}'."); }; - static shared Cannot_find_name_0(){ return diag(2304, DiagnosticCategory::Error, "Cannot_find_name_0_2304", "Cannot find name '{0}'."); }; - static shared Module_0_has_no_exported_member_1(){ return diag(2305, DiagnosticCategory::Error, "Module_0_has_no_exported_member_1_2305", "Module '{0}' has no exported member '{1}'."); }; - static shared File_0_is_not_a_module(){ return diag(2306, DiagnosticCategory::Error, "File_0_is_not_a_module_2306", "File '{0}' is not a module."); }; - static shared Cannot_find_module_0_or_its_corresponding_type_declarations(){ return diag(2307, DiagnosticCategory::Error, "Cannot_find_module_0_or_its_corresponding_type_declarations_2307", "Cannot find module '{0}' or its corresponding type declarations."); }; - static shared Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity(){ return diag(2308, DiagnosticCategory::Error, "Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308", "Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity."); }; - static shared An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements(){ return diag(2309, DiagnosticCategory::Error, "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309", "An export assignment cannot be used in a module with other exported elements."); }; - static shared Type_0_recursively_references_itself_as_a_base_type(){ return diag(2310, DiagnosticCategory::Error, "Type_0_recursively_references_itself_as_a_base_type_2310", "Type '{0}' recursively references itself as a base type."); }; - static shared An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members(){ return diag(2312, DiagnosticCategory::Error, "An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312", "An interface can only extend an object type or intersection of object types with statically known members."); }; - static shared Type_parameter_0_has_a_circular_constraint(){ return diag(2313, DiagnosticCategory::Error, "Type_parameter_0_has_a_circular_constraint_2313", "Type parameter '{0}' has a circular constraint."); }; - static shared Generic_type_0_requires_1_type_argument_s(){ return diag(2314, DiagnosticCategory::Error, "Generic_type_0_requires_1_type_argument_s_2314", "Generic type '{0}' requires {1} type argument(s)."); }; - static shared Type_0_is_not_generic(){ return diag(2315, DiagnosticCategory::Error, "Type_0_is_not_generic_2315", "Type '{0}' is not generic."); }; - static shared Global_type_0_must_be_a_class_or_interface_type(){ return diag(2316, DiagnosticCategory::Error, "Global_type_0_must_be_a_class_or_interface_type_2316", "Global type '{0}' must be a class or interface type."); }; - static shared Global_type_0_must_have_1_type_parameter_s(){ return diag(2317, DiagnosticCategory::Error, "Global_type_0_must_have_1_type_parameter_s_2317", "Global type '{0}' must have {1} type parameter(s)."); }; - static shared Cannot_find_global_type_0(){ return diag(2318, DiagnosticCategory::Error, "Cannot_find_global_type_0_2318", "Cannot find global type '{0}'."); }; - static shared Named_property_0_of_types_1_and_2_are_not_identical(){ return diag(2319, DiagnosticCategory::Error, "Named_property_0_of_types_1_and_2_are_not_identical_2319", "Named property '{0}' of types '{1}' and '{2}' are not identical."); }; - static shared Interface_0_cannot_simultaneously_extend_types_1_and_2(){ return diag(2320, DiagnosticCategory::Error, "Interface_0_cannot_simultaneously_extend_types_1_and_2_2320", "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'."); }; - static shared Excessive_stack_depth_comparing_types_0_and_1(){ return diag(2321, DiagnosticCategory::Error, "Excessive_stack_depth_comparing_types_0_and_1_2321", "Excessive stack depth comparing types '{0}' and '{1}'."); }; - static shared Type_0_is_not_assignable_to_type_1(){ return diag(2322, DiagnosticCategory::Error, "Type_0_is_not_assignable_to_type_1_2322", "Type '{0}' is not assignable to type '{1}'."); }; - static shared Cannot_redeclare_exported_variable_0(){ return diag(2323, DiagnosticCategory::Error, "Cannot_redeclare_exported_variable_0_2323", "Cannot redeclare exported variable '{0}'."); }; - static shared Property_0_is_missing_in_type_1(){ return diag(2324, DiagnosticCategory::Error, "Property_0_is_missing_in_type_1_2324", "Property '{0}' is missing in type '{1}'."); }; - static shared Property_0_is_private_in_type_1_but_not_in_type_2(){ return diag(2325, DiagnosticCategory::Error, "Property_0_is_private_in_type_1_but_not_in_type_2_2325", "Property '{0}' is private in type '{1}' but not in type '{2}'."); }; - static shared Types_of_property_0_are_incompatible(){ return diag(2326, DiagnosticCategory::Error, "Types_of_property_0_are_incompatible_2326", "Types of property '{0}' are incompatible."); }; - static shared Property_0_is_optional_in_type_1_but_required_in_type_2(){ return diag(2327, DiagnosticCategory::Error, "Property_0_is_optional_in_type_1_but_required_in_type_2_2327", "Property '{0}' is optional in type '{1}' but required in type '{2}'."); }; - static shared Types_of_parameters_0_and_1_are_incompatible(){ return diag(2328, DiagnosticCategory::Error, "Types_of_parameters_0_and_1_are_incompatible_2328", "Types of parameters '{0}' and '{1}' are incompatible."); }; - static shared Index_signature_for_type_0_is_missing_in_type_1(){ return diag(2329, DiagnosticCategory::Error, "Index_signature_for_type_0_is_missing_in_type_1_2329", "Index signature for type '{0}' is missing in type '{1}'."); }; - static shared _0_and_1_index_signatures_are_incompatible(){ return diag(2330, DiagnosticCategory::Error, "_0_and_1_index_signatures_are_incompatible_2330", "'{0}' and '{1}' index signatures are incompatible."); }; - static shared this_cannot_be_referenced_in_a_module_or_namespace_body(){ return diag(2331, DiagnosticCategory::Error, "this_cannot_be_referenced_in_a_module_or_namespace_body_2331", "'this' cannot be referenced in a module or namespace body."); }; - static shared this_cannot_be_referenced_in_current_location(){ return diag(2332, DiagnosticCategory::Error, "this_cannot_be_referenced_in_current_location_2332", "'this' cannot be referenced in current location."); }; - static shared this_cannot_be_referenced_in_constructor_arguments(){ return diag(2333, DiagnosticCategory::Error, "this_cannot_be_referenced_in_constructor_arguments_2333", "'this' cannot be referenced in constructor arguments."); }; - static shared this_cannot_be_referenced_in_a_static_property_initializer(){ return diag(2334, DiagnosticCategory::Error, "this_cannot_be_referenced_in_a_static_property_initializer_2334", "'this' cannot be referenced in a static property initializer."); }; - static shared super_can_only_be_referenced_in_a_derived_class(){ return diag(2335, DiagnosticCategory::Error, "super_can_only_be_referenced_in_a_derived_class_2335", "'super' can only be referenced in a derived class."); }; - static shared super_cannot_be_referenced_in_constructor_arguments(){ return diag(2336, DiagnosticCategory::Error, "super_cannot_be_referenced_in_constructor_arguments_2336", "'super' cannot be referenced in constructor arguments."); }; - static shared Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors(){ return diag(2337, DiagnosticCategory::Error, "Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors_2337", "Super calls are not permitted outside constructors or in nested functions inside constructors."); }; - static shared super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class(){ return diag(2338, DiagnosticCategory::Error, "super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_der_2338", "'super' property access is permitted only in a constructor, member function, or member accessor of a derived class."); }; - static shared Property_0_does_not_exist_on_type_1(){ return diag(2339, DiagnosticCategory::Error, "Property_0_does_not_exist_on_type_1_2339", "Property '{0}' does not exist on type '{1}'."); }; - static shared Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword(){ return diag(2340, DiagnosticCategory::Error, "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340", "Only public and protected methods of the base class are accessible via the 'super' keyword."); }; - static shared Property_0_is_private_and_only_accessible_within_class_1(){ return diag(2341, DiagnosticCategory::Error, "Property_0_is_private_and_only_accessible_within_class_1_2341", "Property '{0}' is private and only accessible within class '{1}'."); }; - static shared This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0(){ return diag(2343, DiagnosticCategory::Error, "This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343", "This syntax requires an imported helper named '{1}' which does not exist in '{0}'. Consider upgrading your version of '{0}'."); }; - static shared Type_0_does_not_satisfy_the_constraint_1(){ return diag(2344, DiagnosticCategory::Error, "Type_0_does_not_satisfy_the_constraint_1_2344", "Type '{0}' does not satisfy the constraint '{1}'."); }; - static shared Argument_of_type_0_is_not_assignable_to_parameter_of_type_1(){ return diag(2345, DiagnosticCategory::Error, "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345", "Argument of type '{0}' is not assignable to parameter of type '{1}'."); }; - static shared Call_target_does_not_contain_any_signatures(){ return diag(2346, DiagnosticCategory::Error, "Call_target_does_not_contain_any_signatures_2346", "Call target does not contain any signatures."); }; - static shared Untyped_function_calls_may_not_accept_type_arguments(){ return diag(2347, DiagnosticCategory::Error, "Untyped_function_calls_may_not_accept_type_arguments_2347", "Untyped function calls may not accept type arguments."); }; - static shared Value_of_type_0_is_not_callable_Did_you_mean_to_include_new(){ return diag(2348, DiagnosticCategory::Error, "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348", "Value of type '{0}' is not callable. Did you mean to include 'new'?"); }; - static shared This_expression_is_not_callable(){ return diag(2349, DiagnosticCategory::Error, "This_expression_is_not_callable_2349", "This expression is not callable."); }; - static shared Only_a_void_function_can_be_called_with_the_new_keyword(){ return diag(2350, DiagnosticCategory::Error, "Only_a_void_function_can_be_called_with_the_new_keyword_2350", "Only a void function can be called with the 'new' keyword."); }; - static shared This_expression_is_not_constructable(){ return diag(2351, DiagnosticCategory::Error, "This_expression_is_not_constructable_2351", "This expression is not constructable."); }; - static shared Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first(){ return diag(2352, DiagnosticCategory::Error, "Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352", + static shared_ptr The_types_of_0_are_incompatible_between_these_types(){ return diag(2200, DiagnosticCategory::Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."); }; + static shared_ptr The_types_returned_by_0_are_incompatible_between_these_types(){ return diag(2201, DiagnosticCategory::Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."); }; + static shared_ptr Call_signature_return_types_0_and_1_are_incompatible(){ return diag(2202, DiagnosticCategory::Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", /*reportsUnnecessary*/ false, /*elidedInCompatabilityPyramid*/ true); }; + static shared_ptr Construct_signature_return_types_0_and_1_are_incompatible(){ return diag(2203, DiagnosticCategory::Error, "Construct_signature_return_types_0_and_1_are_incompatible_2203", "Construct signature return types '{0}' and '{1}' are incompatible.", /*reportsUnnecessary*/ false, /*elidedInCompatabilityPyramid*/ true); }; + static shared_ptr Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1(){ return diag(2204, DiagnosticCategory::Error, "Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204", "Call signatures with no arguments have incompatible return types '{0}' and '{1}'.", /*reportsUnnecessary*/ false, /*elidedInCompatabilityPyramid*/ true); }; + static shared_ptr Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1(){ return diag(2205, DiagnosticCategory::Error, "Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205", "Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.", /*reportsUnnecessary*/ false, /*elidedInCompatabilityPyramid*/ true); }; + static shared_ptr The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement(){ return diag(2206, DiagnosticCategory::Error, "The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206", "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement."); }; + static shared_ptr The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement(){ return diag(2207, DiagnosticCategory::Error, "The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207", "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement."); }; + static shared_ptr Duplicate_identifier_0(){ return diag(2300, DiagnosticCategory::Error, "Duplicate_identifier_0_2300", "Duplicate identifier '{0}'."); }; + static shared_ptr Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor(){ return diag(2301, DiagnosticCategory::Error, "Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301", "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."); }; + static shared_ptr Static_members_cannot_reference_class_type_parameters(){ return diag(2302, DiagnosticCategory::Error, "Static_members_cannot_reference_class_type_parameters_2302", "Static members cannot reference class type parameters."); }; + static shared_ptr Circular_definition_of_import_alias_0(){ return diag(2303, DiagnosticCategory::Error, "Circular_definition_of_import_alias_0_2303", "Circular definition of import alias '{0}'."); }; + static shared_ptr Cannot_find_name_0(){ return diag(2304, DiagnosticCategory::Error, "Cannot_find_name_0_2304", "Cannot find name '{0}'."); }; + static shared_ptr Module_0_has_no_exported_member_1(){ return diag(2305, DiagnosticCategory::Error, "Module_0_has_no_exported_member_1_2305", "Module '{0}' has no exported member '{1}'."); }; + static shared_ptr File_0_is_not_a_module(){ return diag(2306, DiagnosticCategory::Error, "File_0_is_not_a_module_2306", "File '{0}' is not a module."); }; + static shared_ptr Cannot_find_module_0_or_its_corresponding_type_declarations(){ return diag(2307, DiagnosticCategory::Error, "Cannot_find_module_0_or_its_corresponding_type_declarations_2307", "Cannot find module '{0}' or its corresponding type declarations."); }; + static shared_ptr Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity(){ return diag(2308, DiagnosticCategory::Error, "Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308", "Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity."); }; + static shared_ptr An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements(){ return diag(2309, DiagnosticCategory::Error, "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309", "An export assignment cannot be used in a module with other exported elements."); }; + static shared_ptr Type_0_recursively_references_itself_as_a_base_type(){ return diag(2310, DiagnosticCategory::Error, "Type_0_recursively_references_itself_as_a_base_type_2310", "Type '{0}' recursively references itself as a base type."); }; + static shared_ptr An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members(){ return diag(2312, DiagnosticCategory::Error, "An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312", "An interface can only extend an object type or intersection of object types with statically known members."); }; + static shared_ptr Type_parameter_0_has_a_circular_constraint(){ return diag(2313, DiagnosticCategory::Error, "Type_parameter_0_has_a_circular_constraint_2313", "Type parameter '{0}' has a circular constraint."); }; + static shared_ptr Generic_type_0_requires_1_type_argument_s(){ return diag(2314, DiagnosticCategory::Error, "Generic_type_0_requires_1_type_argument_s_2314", "Generic type '{0}' requires {1} type argument(s)."); }; + static shared_ptr Type_0_is_not_generic(){ return diag(2315, DiagnosticCategory::Error, "Type_0_is_not_generic_2315", "Type '{0}' is not generic."); }; + static shared_ptr Global_type_0_must_be_a_class_or_interface_type(){ return diag(2316, DiagnosticCategory::Error, "Global_type_0_must_be_a_class_or_interface_type_2316", "Global type '{0}' must be a class or interface type."); }; + static shared_ptr Global_type_0_must_have_1_type_parameter_s(){ return diag(2317, DiagnosticCategory::Error, "Global_type_0_must_have_1_type_parameter_s_2317", "Global type '{0}' must have {1} type parameter(s)."); }; + static shared_ptr Cannot_find_global_type_0(){ return diag(2318, DiagnosticCategory::Error, "Cannot_find_global_type_0_2318", "Cannot find global type '{0}'."); }; + static shared_ptr Named_property_0_of_types_1_and_2_are_not_identical(){ return diag(2319, DiagnosticCategory::Error, "Named_property_0_of_types_1_and_2_are_not_identical_2319", "Named property '{0}' of types '{1}' and '{2}' are not identical."); }; + static shared_ptr Interface_0_cannot_simultaneously_extend_types_1_and_2(){ return diag(2320, DiagnosticCategory::Error, "Interface_0_cannot_simultaneously_extend_types_1_and_2_2320", "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'."); }; + static shared_ptr Excessive_stack_depth_comparing_types_0_and_1(){ return diag(2321, DiagnosticCategory::Error, "Excessive_stack_depth_comparing_types_0_and_1_2321", "Excessive stack depth comparing types '{0}' and '{1}'."); }; + static shared_ptr Type_0_is_not_assignable_to_type_1(){ return diag(2322, DiagnosticCategory::Error, "Type_0_is_not_assignable_to_type_1_2322", "Type '{0}' is not assignable to type '{1}'."); }; + static shared_ptr Cannot_redeclare_exported_variable_0(){ return diag(2323, DiagnosticCategory::Error, "Cannot_redeclare_exported_variable_0_2323", "Cannot redeclare exported variable '{0}'."); }; + static shared_ptr Property_0_is_missing_in_type_1(){ return diag(2324, DiagnosticCategory::Error, "Property_0_is_missing_in_type_1_2324", "Property '{0}' is missing in type '{1}'."); }; + static shared_ptr Property_0_is_private_in_type_1_but_not_in_type_2(){ return diag(2325, DiagnosticCategory::Error, "Property_0_is_private_in_type_1_but_not_in_type_2_2325", "Property '{0}' is private in type '{1}' but not in type '{2}'."); }; + static shared_ptr Types_of_property_0_are_incompatible(){ return diag(2326, DiagnosticCategory::Error, "Types_of_property_0_are_incompatible_2326", "Types of property '{0}' are incompatible."); }; + static shared_ptr Property_0_is_optional_in_type_1_but_required_in_type_2(){ return diag(2327, DiagnosticCategory::Error, "Property_0_is_optional_in_type_1_but_required_in_type_2_2327", "Property '{0}' is optional in type '{1}' but required in type '{2}'."); }; + static shared_ptr Types_of_parameters_0_and_1_are_incompatible(){ return diag(2328, DiagnosticCategory::Error, "Types_of_parameters_0_and_1_are_incompatible_2328", "Types of parameters '{0}' and '{1}' are incompatible."); }; + static shared_ptr Index_signature_for_type_0_is_missing_in_type_1(){ return diag(2329, DiagnosticCategory::Error, "Index_signature_for_type_0_is_missing_in_type_1_2329", "Index signature for type '{0}' is missing in type '{1}'."); }; + static shared_ptr _0_and_1_index_signatures_are_incompatible(){ return diag(2330, DiagnosticCategory::Error, "_0_and_1_index_signatures_are_incompatible_2330", "'{0}' and '{1}' index signatures are incompatible."); }; + static shared_ptr this_cannot_be_referenced_in_a_module_or_namespace_body(){ return diag(2331, DiagnosticCategory::Error, "this_cannot_be_referenced_in_a_module_or_namespace_body_2331", "'this' cannot be referenced in a module or namespace body."); }; + static shared_ptr this_cannot_be_referenced_in_current_location(){ return diag(2332, DiagnosticCategory::Error, "this_cannot_be_referenced_in_current_location_2332", "'this' cannot be referenced in current location."); }; + static shared_ptr this_cannot_be_referenced_in_constructor_arguments(){ return diag(2333, DiagnosticCategory::Error, "this_cannot_be_referenced_in_constructor_arguments_2333", "'this' cannot be referenced in constructor arguments."); }; + static shared_ptr this_cannot_be_referenced_in_a_static_property_initializer(){ return diag(2334, DiagnosticCategory::Error, "this_cannot_be_referenced_in_a_static_property_initializer_2334", "'this' cannot be referenced in a static property initializer."); }; + static shared_ptr super_can_only_be_referenced_in_a_derived_class(){ return diag(2335, DiagnosticCategory::Error, "super_can_only_be_referenced_in_a_derived_class_2335", "'super' can only be referenced in a derived class."); }; + static shared_ptr super_cannot_be_referenced_in_constructor_arguments(){ return diag(2336, DiagnosticCategory::Error, "super_cannot_be_referenced_in_constructor_arguments_2336", "'super' cannot be referenced in constructor arguments."); }; + static shared_ptr Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors(){ return diag(2337, DiagnosticCategory::Error, "Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors_2337", "Super calls are not permitted outside constructors or in nested functions inside constructors."); }; + static shared_ptr super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class(){ return diag(2338, DiagnosticCategory::Error, "super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_der_2338", "'super' property access is permitted only in a constructor, member function, or member accessor of a derived class."); }; + static shared_ptr Property_0_does_not_exist_on_type_1(){ return diag(2339, DiagnosticCategory::Error, "Property_0_does_not_exist_on_type_1_2339", "Property '{0}' does not exist on type '{1}'."); }; + static shared_ptr Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword(){ return diag(2340, DiagnosticCategory::Error, "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340", "Only public and protected methods of the base class are accessible via the 'super' keyword."); }; + static shared_ptr Property_0_is_private_and_only_accessible_within_class_1(){ return diag(2341, DiagnosticCategory::Error, "Property_0_is_private_and_only_accessible_within_class_1_2341", "Property '{0}' is private and only accessible within class '{1}'."); }; + static shared_ptr This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0(){ return diag(2343, DiagnosticCategory::Error, "This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343", "This syntax requires an imported helper named '{1}' which does not exist in '{0}'. Consider upgrading your version of '{0}'."); }; + static shared_ptr Type_0_does_not_satisfy_the_constraint_1(){ return diag(2344, DiagnosticCategory::Error, "Type_0_does_not_satisfy_the_constraint_1_2344", "Type '{0}' does not satisfy the constraint '{1}'."); }; + static shared_ptr Argument_of_type_0_is_not_assignable_to_parameter_of_type_1(){ return diag(2345, DiagnosticCategory::Error, "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345", "Argument of type '{0}' is not assignable to parameter of type '{1}'."); }; + static shared_ptr Call_target_does_not_contain_any_signatures(){ return diag(2346, DiagnosticCategory::Error, "Call_target_does_not_contain_any_signatures_2346", "Call target does not contain any signatures."); }; + static shared_ptr Untyped_function_calls_may_not_accept_type_arguments(){ return diag(2347, DiagnosticCategory::Error, "Untyped_function_calls_may_not_accept_type_arguments_2347", "Untyped function calls may not accept type arguments."); }; + static shared_ptr Value_of_type_0_is_not_callable_Did_you_mean_to_include_new(){ return diag(2348, DiagnosticCategory::Error, "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348", "Value of type '{0}' is not callable. Did you mean to include 'new'?"); }; + static shared_ptr This_expression_is_not_callable(){ return diag(2349, DiagnosticCategory::Error, "This_expression_is_not_callable_2349", "This expression is not callable."); }; + static shared_ptr Only_a_void_function_can_be_called_with_the_new_keyword(){ return diag(2350, DiagnosticCategory::Error, "Only_a_void_function_can_be_called_with_the_new_keyword_2350", "Only a void function can be called with the 'new' keyword."); }; + static shared_ptr This_expression_is_not_constructable(){ return diag(2351, DiagnosticCategory::Error, "This_expression_is_not_constructable_2351", "This expression is not constructable."); }; + static shared_ptr Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first(){ return diag(2352, DiagnosticCategory::Error, "Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352", "Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first."); }; - static shared Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1(){ return diag(2353, DiagnosticCategory::Error, "Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353", "Object literal may only specify known properties, and '{0}' does not exist in type '{1}'."); }; - static shared This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found(){ return diag(2354, DiagnosticCategory::Error, "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354", "This syntax requires an imported helper but module '{0}' cannot be found."); }; - static shared A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value(){ return diag(2355, DiagnosticCategory::Error, "A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_2355", "A function whose declared type is neither 'void' nor 'any' must return a value."); }; - static shared An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type(){ return diag(2356, DiagnosticCategory::Error, "An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356", "An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type."); }; - static shared The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access(){ return diag(2357, DiagnosticCategory::Error, "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357", "The operand of an increment or decrement operator must be a variable or a property access."); }; - static shared The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter(){ return diag(2358, DiagnosticCategory::Error, "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358", "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter."); }; - static shared The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type(){ return diag(2359, DiagnosticCategory::Error, "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359", "The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type."); }; - static shared The_left_hand_side_of_an_in_expression_must_be_a_private_identifier_or_of_type_any_string_number_or_symbol(){ return diag(2360, DiagnosticCategory::Error, "The_left_hand_side_of_an_in_expression_must_be_a_private_identifier_or_of_type_any_string_number_or__2360", "The left-hand side of an 'in' expression must be a private identifier or of type 'any', 'string', 'number', or 'symbol'."); }; - static shared The_right_hand_side_of_an_in_expression_must_not_be_a_primitive(){ return diag(2361, DiagnosticCategory::Error, "The_right_hand_side_of_an_in_expression_must_not_be_a_primitive_2361", "The right-hand side of an 'in' expression must not be a primitive."); }; - static shared The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type(){ return diag(2362, DiagnosticCategory::Error, "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362", "The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."); }; - static shared The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type(){ return diag(2363, DiagnosticCategory::Error, "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363", "The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."); }; - static shared The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access(){ return diag(2364, DiagnosticCategory::Error, "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364", "The left-hand side of an assignment expression must be a variable or a property access."); }; - static shared Operator_0_cannot_be_applied_to_types_1_and_2(){ return diag(2365, DiagnosticCategory::Error, "Operator_0_cannot_be_applied_to_types_1_and_2_2365", "Operator '{0}' cannot be applied to types '{1}' and '{2}'."); }; - static shared Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined(){ return diag(2366, DiagnosticCategory::Error, "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366", "Function lacks ending return statement and return type does not include 'undefined'."); }; - static shared This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap(){ return diag(2367, DiagnosticCategory::Error, "This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap_2367", "This condition will always return '{0}' since the types '{1}' and '{2}' have no overlap."); }; - static shared Type_parameter_name_cannot_be_0(){ return diag(2368, DiagnosticCategory::Error, "Type_parameter_name_cannot_be_0_2368", "Type parameter name cannot be '{0}'."); }; - static shared A_parameter_property_is_only_allowed_in_a_constructor_implementation(){ return diag(2369, DiagnosticCategory::Error, "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369", "A parameter property is only allowed in a constructor implementation."); }; - static shared A_rest_parameter_must_be_of_an_array_type(){ return diag(2370, DiagnosticCategory::Error, "A_rest_parameter_must_be_of_an_array_type_2370", "A rest parameter must be of an array type."); }; - static shared A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation(){ return diag(2371, DiagnosticCategory::Error, "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371", "A parameter initializer is only allowed in a function or constructor implementation."); }; - static shared Parameter_0_cannot_reference_itself(){ return diag(2372, DiagnosticCategory::Error, "Parameter_0_cannot_reference_itself_2372", "Parameter '{0}' cannot reference itself."); }; - static shared Parameter_0_cannot_reference_identifier_1_declared_after_it(){ return diag(2373, DiagnosticCategory::Error, "Parameter_0_cannot_reference_identifier_1_declared_after_it_2373", "Parameter '{0}' cannot reference identifier '{1}' declared after it."); }; - static shared Duplicate_index_signature_for_type_0(){ return diag(2374, DiagnosticCategory::Error, "Duplicate_index_signature_for_type_0_2374", "Duplicate index signature for type '{0}'."); }; - static shared Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties(){ return diag(2375, DiagnosticCategory::Error, "Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375", "Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."); }; - static shared A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_parameter_properties_or_private_identifiers(){ return diag(2376, DiagnosticCategory::Error, "A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376", "A 'super' call must be the first statement in the constructor when a class contains initialized properties, parameter properties, or private identifiers."); }; - static shared Constructors_for_derived_classes_must_contain_a_super_call(){ return diag(2377, DiagnosticCategory::Error, "Constructors_for_derived_classes_must_contain_a_super_call_2377", "Constructors for derived classes must contain a 'super' call."); }; - static shared A_get_accessor_must_return_a_value(){ return diag(2378, DiagnosticCategory::Error, "A_get_accessor_must_return_a_value_2378", "A 'get' accessor must return a value."); }; - static shared Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties(){ return diag(2379, DiagnosticCategory::Error, "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_tr_2379", + static shared_ptr Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1(){ return diag(2353, DiagnosticCategory::Error, "Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353", "Object literal may only specify known properties, and '{0}' does not exist in type '{1}'."); }; + static shared_ptr This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found(){ return diag(2354, DiagnosticCategory::Error, "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354", "This syntax requires an imported helper but module '{0}' cannot be found."); }; + static shared_ptr A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value(){ return diag(2355, DiagnosticCategory::Error, "A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_2355", "A function whose declared type is neither 'void' nor 'any' must return a value."); }; + static shared_ptr An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type(){ return diag(2356, DiagnosticCategory::Error, "An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356", "An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type."); }; + static shared_ptr The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access(){ return diag(2357, DiagnosticCategory::Error, "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357", "The operand of an increment or decrement operator must be a variable or a property access."); }; + static shared_ptr The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter(){ return diag(2358, DiagnosticCategory::Error, "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358", "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter."); }; + static shared_ptr The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type(){ return diag(2359, DiagnosticCategory::Error, "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359", "The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type."); }; + static shared_ptr The_left_hand_side_of_an_in_expression_must_be_a_private_identifier_or_of_type_any_string_number_or_symbol(){ return diag(2360, DiagnosticCategory::Error, "The_left_hand_side_of_an_in_expression_must_be_a_private_identifier_or_of_type_any_string_number_or__2360", "The left-hand side of an 'in' expression must be a private identifier or of type 'any', 'string', 'number', or 'symbol'."); }; + static shared_ptr The_right_hand_side_of_an_in_expression_must_not_be_a_primitive(){ return diag(2361, DiagnosticCategory::Error, "The_right_hand_side_of_an_in_expression_must_not_be_a_primitive_2361", "The right-hand side of an 'in' expression must not be a primitive."); }; + static shared_ptr The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type(){ return diag(2362, DiagnosticCategory::Error, "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362", "The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."); }; + static shared_ptr The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type(){ return diag(2363, DiagnosticCategory::Error, "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363", "The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."); }; + static shared_ptr The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access(){ return diag(2364, DiagnosticCategory::Error, "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364", "The left-hand side of an assignment expression must be a variable or a property access."); }; + static shared_ptr Operator_0_cannot_be_applied_to_types_1_and_2(){ return diag(2365, DiagnosticCategory::Error, "Operator_0_cannot_be_applied_to_types_1_and_2_2365", "Operator '{0}' cannot be applied to types '{1}' and '{2}'."); }; + static shared_ptr Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined(){ return diag(2366, DiagnosticCategory::Error, "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366", "Function lacks ending return statement and return type does not include 'undefined'."); }; + static shared_ptr This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap(){ return diag(2367, DiagnosticCategory::Error, "This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap_2367", "This condition will always return '{0}' since the types '{1}' and '{2}' have no overlap."); }; + static shared_ptr Type_parameter_name_cannot_be_0(){ return diag(2368, DiagnosticCategory::Error, "Type_parameter_name_cannot_be_0_2368", "Type parameter name cannot be '{0}'."); }; + static shared_ptr A_parameter_property_is_only_allowed_in_a_constructor_implementation(){ return diag(2369, DiagnosticCategory::Error, "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369", "A parameter property is only allowed in a constructor implementation."); }; + static shared_ptr A_rest_parameter_must_be_of_an_array_type(){ return diag(2370, DiagnosticCategory::Error, "A_rest_parameter_must_be_of_an_array_type_2370", "A rest parameter must be of an array type."); }; + static shared_ptr A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation(){ return diag(2371, DiagnosticCategory::Error, "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371", "A parameter initializer is only allowed in a function or constructor implementation."); }; + static shared_ptr Parameter_0_cannot_reference_itself(){ return diag(2372, DiagnosticCategory::Error, "Parameter_0_cannot_reference_itself_2372", "Parameter '{0}' cannot reference itself."); }; + static shared_ptr Parameter_0_cannot_reference_identifier_1_declared_after_it(){ return diag(2373, DiagnosticCategory::Error, "Parameter_0_cannot_reference_identifier_1_declared_after_it_2373", "Parameter '{0}' cannot reference identifier '{1}' declared after it."); }; + static shared_ptr Duplicate_index_signature_for_type_0(){ return diag(2374, DiagnosticCategory::Error, "Duplicate_index_signature_for_type_0_2374", "Duplicate index signature for type '{0}'."); }; + static shared_ptr Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties(){ return diag(2375, DiagnosticCategory::Error, "Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375", "Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."); }; + static shared_ptr A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_parameter_properties_or_private_identifiers(){ return diag(2376, DiagnosticCategory::Error, "A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376", "A 'super' call must be the first statement in the constructor when a class contains initialized properties, parameter properties, or private identifiers."); }; + static shared_ptr Constructors_for_derived_classes_must_contain_a_super_call(){ return diag(2377, DiagnosticCategory::Error, "Constructors_for_derived_classes_must_contain_a_super_call_2377", "Constructors for derived classes must contain a 'super' call."); }; + static shared_ptr A_get_accessor_must_return_a_value(){ return diag(2378, DiagnosticCategory::Error, "A_get_accessor_must_return_a_value_2378", "A 'get' accessor must return a value."); }; + static shared_ptr Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties(){ return diag(2379, DiagnosticCategory::Error, "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_tr_2379", "Argument of type '{0}' is not assignable to parameter of type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."); }; - static shared The_return_type_of_a_get_accessor_must_be_assignable_to_its_set_accessor_type(){ return diag(2380, DiagnosticCategory::Error, "The_return_type_of_a_get_accessor_must_be_assignable_to_its_set_accessor_type_2380", "The return type of a 'get' accessor must be assignable to its 'set' accessor type"); }; - static shared Overload_signatures_must_all_be_exported_or_non_exported(){ return diag(2383, DiagnosticCategory::Error, "Overload_signatures_must_all_be_exported_or_non_exported_2383", "Overload signatures must all be exported or non-exported."); }; - static shared Overload_signatures_must_all_be_ambient_or_non_ambient(){ return diag(2384, DiagnosticCategory::Error, "Overload_signatures_must_all_be_ambient_or_non_ambient_2384", "Overload signatures must all be ambient or non-ambient."); }; - static shared Overload_signatures_must_all_be_public_private_or_protected(){ return diag(2385, DiagnosticCategory::Error, "Overload_signatures_must_all_be_public_private_or_protected_2385", "Overload signatures must all be public, private or protected."); }; - static shared Overload_signatures_must_all_be_optional_or_required(){ return diag(2386, DiagnosticCategory::Error, "Overload_signatures_must_all_be_optional_or_required_2386", "Overload signatures must all be optional or required."); }; - static shared Function_overload_must_be_static(){ return diag(2387, DiagnosticCategory::Error, "Function_overload_must_be_static_2387", "Function overload must be static."); }; - static shared Function_overload_must_not_be_static(){ return diag(2388, DiagnosticCategory::Error, "Function_overload_must_not_be_static_2388", "Function overload must not be static."); }; - static shared Function_implementation_name_must_be_0(){ return diag(2389, DiagnosticCategory::Error, "Function_implementation_name_must_be_0_2389", "Function implementation name must be '{0}'."); }; - static shared Constructor_implementation_is_missing(){ return diag(2390, DiagnosticCategory::Error, "Constructor_implementation_is_missing_2390", "Constructor implementation is missing."); }; - static shared Function_implementation_is_missing_or_not_immediately_following_the_declaration(){ return diag(2391, DiagnosticCategory::Error, "Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391", "Function implementation is missing or not immediately following the declaration."); }; - static shared Multiple_constructor_implementations_are_not_allowed(){ return diag(2392, DiagnosticCategory::Error, "Multiple_constructor_implementations_are_not_allowed_2392", "Multiple constructor implementations are not allowed."); }; - static shared Duplicate_function_implementation(){ return diag(2393, DiagnosticCategory::Error, "Duplicate_function_implementation_2393", "Duplicate function implementation."); }; - static shared This_overload_signature_is_not_compatible_with_its_implementation_signature(){ return diag(2394, DiagnosticCategory::Error, "This_overload_signature_is_not_compatible_with_its_implementation_signature_2394", "This overload signature is not compatible with its implementation signature."); }; - static shared Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local(){ return diag(2395, DiagnosticCategory::Error, "Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395", "Individual declarations in merged declaration '{0}' must be all exported or all local."); }; - static shared Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters(){ return diag(2396, DiagnosticCategory::Error, "Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters_2396", "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters."); }; - static shared Declaration_name_conflicts_with_built_in_global_identifier_0(){ return diag(2397, DiagnosticCategory::Error, "Declaration_name_conflicts_with_built_in_global_identifier_0_2397", "Declaration name conflicts with built-in global identifier '{0}'."); }; - static shared constructor_cannot_be_used_as_a_parameter_property_name(){ return diag(2398, DiagnosticCategory::Error, "constructor_cannot_be_used_as_a_parameter_property_name_2398", "'constructor' cannot be used as a parameter property name."); }; - static shared Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference(){ return diag(2399, DiagnosticCategory::Error, "Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399", "Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference."); }; - static shared Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference(){ return diag(2400, DiagnosticCategory::Error, "Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference_2400", "Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference."); }; - static shared Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference(){ return diag(2402, DiagnosticCategory::Error, "Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402", "Expression resolves to '_super' that compiler uses to capture base class reference."); }; - static shared Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2(){ return diag(2403, DiagnosticCategory::Error, "Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403", "Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'."); }; - static shared The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation(){ return diag(2404, DiagnosticCategory::Error, "The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404", "The left-hand side of a 'for...in' statement cannot use a type annotation."); }; - static shared The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any(){ return diag(2405, DiagnosticCategory::Error, "The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405", "The left-hand side of a 'for...in' statement must be of type 'string' or 'any'."); }; - static shared The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access(){ return diag(2406, DiagnosticCategory::Error, "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406", "The left-hand side of a 'for...in' statement must be a variable or a property access."); }; - static shared The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0(){ return diag(2407, DiagnosticCategory::Error, "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407", "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '{0}'."); }; - static shared Setters_cannot_return_a_value(){ return diag(2408, DiagnosticCategory::Error, "Setters_cannot_return_a_value_2408", "Setters cannot return a value."); }; - static shared Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class(){ return diag(2409, DiagnosticCategory::Error, "Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409", "Return type of constructor signature must be assignable to the instance type of the class."); }; - static shared The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any(){ return diag(2410, DiagnosticCategory::Error, "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410", "The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'."); }; - static shared Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target(){ return diag(2412, DiagnosticCategory::Error, "Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412", "Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the type of the target."); }; - static shared Property_0_of_type_1_is_not_assignable_to_2_index_type_3(){ return diag(2411, DiagnosticCategory::Error, "Property_0_of_type_1_is_not_assignable_to_2_index_type_3_2411", "Property '{0}' of type '{1}' is not assignable to '{2}' index type '{3}'."); }; - static shared _0_index_type_1_is_not_assignable_to_2_index_type_3(){ return diag(2413, DiagnosticCategory::Error, "_0_index_type_1_is_not_assignable_to_2_index_type_3_2413", "'{0}' index type '{1}' is not assignable to '{2}' index type '{3}'."); }; - static shared Class_name_cannot_be_0(){ return diag(2414, DiagnosticCategory::Error, "Class_name_cannot_be_0_2414", "Class name cannot be '{0}'."); }; - static shared Class_0_incorrectly_extends_base_class_1(){ return diag(2415, DiagnosticCategory::Error, "Class_0_incorrectly_extends_base_class_1_2415", "Class '{0}' incorrectly extends base class '{1}'."); }; - static shared Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2(){ return diag(2416, DiagnosticCategory::Error, "Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416", "Property '{0}' in type '{1}' is not assignable to the same property in base type '{2}'."); }; - static shared Class_static_side_0_incorrectly_extends_base_class_static_side_1(){ return diag(2417, DiagnosticCategory::Error, "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417", "Class static side '{0}' incorrectly extends base class static side '{1}'."); }; - static shared Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1(){ return diag(2418, DiagnosticCategory::Error, "Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418", "Type of computed property's value is '{0}', which is not assignable to type '{1}'."); }; - static shared Types_of_construct_signatures_are_incompatible(){ return diag(2419, DiagnosticCategory::Error, "Types_of_construct_signatures_are_incompatible_2419", "Types of construct signatures are incompatible."); }; - static shared Class_0_incorrectly_implements_interface_1(){ return diag(2420, DiagnosticCategory::Error, "Class_0_incorrectly_implements_interface_1_2420", "Class '{0}' incorrectly implements interface '{1}'."); }; - static shared A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members(){ return diag(2422, DiagnosticCategory::Error, "A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422", "A class can only implement an object type or intersection of object types with statically known members."); }; - static shared Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor(){ return diag(2423, DiagnosticCategory::Error, "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423", "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor."); }; - static shared Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function(){ return diag(2425, DiagnosticCategory::Error, "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425", "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function."); }; - static shared Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function(){ return diag(2426, DiagnosticCategory::Error, "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426", "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function."); }; - static shared Interface_name_cannot_be_0(){ return diag(2427, DiagnosticCategory::Error, "Interface_name_cannot_be_0_2427", "Interface name cannot be '{0}'."); }; - static shared All_declarations_of_0_must_have_identical_type_parameters(){ return diag(2428, DiagnosticCategory::Error, "All_declarations_of_0_must_have_identical_type_parameters_2428", "All declarations of '{0}' must have identical type parameters."); }; - static shared Interface_0_incorrectly_extends_interface_1(){ return diag(2430, DiagnosticCategory::Error, "Interface_0_incorrectly_extends_interface_1_2430", "Interface '{0}' incorrectly extends interface '{1}'."); }; - static shared Enum_name_cannot_be_0(){ return diag(2431, DiagnosticCategory::Error, "Enum_name_cannot_be_0_2431", "Enum name cannot be '{0}'."); }; - static shared In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element(){ return diag(2432, DiagnosticCategory::Error, "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432", "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element."); }; - static shared A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged(){ return diag(2433, DiagnosticCategory::Error, "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433", "A namespace declaration cannot be in a different file from a class or function with which it is merged."); }; - static shared A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged(){ return diag(2434, DiagnosticCategory::Error, "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434", "A namespace declaration cannot be located prior to a class or function with which it is merged."); }; - static shared Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces(){ return diag(2435, DiagnosticCategory::Error, "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435", "Ambient modules cannot be nested in other modules or namespaces."); }; - static shared Ambient_module_declaration_cannot_specify_relative_module_name(){ return diag(2436, DiagnosticCategory::Error, "Ambient_module_declaration_cannot_specify_relative_module_name_2436", "Ambient module declaration cannot specify relative module name."); }; - static shared Module_0_is_hidden_by_a_local_declaration_with_the_same_name(){ return diag(2437, DiagnosticCategory::Error, "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437", "Module '{0}' is hidden by a local declaration with the same name."); }; - static shared Import_name_cannot_be_0(){ return diag(2438, DiagnosticCategory::Error, "Import_name_cannot_be_0_2438", "Import name cannot be '{0}'."); }; - static shared Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name(){ return diag(2439, DiagnosticCategory::Error, "Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439", "Import or export declaration in an ambient module declaration cannot reference module through relative module name."); }; - static shared Import_declaration_conflicts_with_local_declaration_of_0(){ return diag(2440, DiagnosticCategory::Error, "Import_declaration_conflicts_with_local_declaration_of_0_2440", "Import declaration conflicts with local declaration of '{0}'."); }; - static shared Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module(){ return diag(2441, DiagnosticCategory::Error, "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441", "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module."); }; - static shared Types_have_separate_declarations_of_a_private_property_0(){ return diag(2442, DiagnosticCategory::Error, "Types_have_separate_declarations_of_a_private_property_0_2442", "Types have separate declarations of a private property '{0}'."); }; - static shared Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2(){ return diag(2443, DiagnosticCategory::Error, "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443", "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'."); }; - static shared Property_0_is_protected_in_type_1_but_public_in_type_2(){ return diag(2444, DiagnosticCategory::Error, "Property_0_is_protected_in_type_1_but_public_in_type_2_2444", "Property '{0}' is protected in type '{1}' but public in type '{2}'."); }; - static shared Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses(){ return diag(2445, DiagnosticCategory::Error, "Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses_2445", "Property '{0}' is protected and only accessible within class '{1}' and its subclasses."); }; - static shared Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2(){ return diag(2446, DiagnosticCategory::Error, "Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_cl_2446", "Property '{0}' is protected and only accessible through an instance of class '{1}'. This is an instance of class '{2}'."); }; - static shared The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead(){ return diag(2447, DiagnosticCategory::Error, "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447", "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead."); }; - static shared Block_scoped_variable_0_used_before_its_declaration(){ return diag(2448, DiagnosticCategory::Error, "Block_scoped_variable_0_used_before_its_declaration_2448", "Block-scoped variable '{0}' used before its declaration."); }; - static shared Class_0_used_before_its_declaration(){ return diag(2449, DiagnosticCategory::Error, "Class_0_used_before_its_declaration_2449", "Class '{0}' used before its declaration."); }; - static shared Enum_0_used_before_its_declaration(){ return diag(2450, DiagnosticCategory::Error, "Enum_0_used_before_its_declaration_2450", "Enum '{0}' used before its declaration."); }; - static shared Cannot_redeclare_block_scoped_variable_0(){ return diag(2451, DiagnosticCategory::Error, "Cannot_redeclare_block_scoped_variable_0_2451", "Cannot redeclare block-scoped variable '{0}'."); }; - static shared An_enum_member_cannot_have_a_numeric_name(){ return diag(2452, DiagnosticCategory::Error, "An_enum_member_cannot_have_a_numeric_name_2452", "An enum member cannot have a numeric name."); }; - static shared Variable_0_is_used_before_being_assigned(){ return diag(2454, DiagnosticCategory::Error, "Variable_0_is_used_before_being_assigned_2454", "Variable '{0}' is used before being assigned."); }; - static shared Type_alias_0_circularly_references_itself(){ return diag(2456, DiagnosticCategory::Error, "Type_alias_0_circularly_references_itself_2456", "Type alias '{0}' circularly references itself."); }; - static shared Type_alias_name_cannot_be_0(){ return diag(2457, DiagnosticCategory::Error, "Type_alias_name_cannot_be_0_2457", "Type alias name cannot be '{0}'."); }; - static shared An_AMD_module_cannot_have_multiple_name_assignments(){ return diag(2458, DiagnosticCategory::Error, "An_AMD_module_cannot_have_multiple_name_assignments_2458", "An AMD module cannot have multiple name assignments."); }; - static shared Module_0_declares_1_locally_but_it_is_not_exported(){ return diag(2459, DiagnosticCategory::Error, "Module_0_declares_1_locally_but_it_is_not_exported_2459", "Module '{0}' declares '{1}' locally, but it is not exported."); }; - static shared Module_0_declares_1_locally_but_it_is_exported_as_2(){ return diag(2460, DiagnosticCategory::Error, "Module_0_declares_1_locally_but_it_is_exported_as_2_2460", "Module '{0}' declares '{1}' locally, but it is exported as '{2}'."); }; - static shared Type_0_is_not_an_array_type(){ return diag(2461, DiagnosticCategory::Error, "Type_0_is_not_an_array_type_2461", "Type '{0}' is not an array type."); }; - static shared A_rest_element_must_be_last_in_a_destructuring_pattern(){ return diag(2462, DiagnosticCategory::Error, "A_rest_element_must_be_last_in_a_destructuring_pattern_2462", "A rest element must be last in a destructuring pattern."); }; - static shared A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature(){ return diag(2463, DiagnosticCategory::Error, "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463", "A binding pattern parameter cannot be optional in an implementation signature."); }; - static shared A_computed_property_name_must_be_of_type_string_number_symbol_or_any(){ return diag(2464, DiagnosticCategory::Error, "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464", "A computed property name must be of type 'string', 'number', 'symbol', or 'any'."); }; - static shared this_cannot_be_referenced_in_a_computed_property_name(){ return diag(2465, DiagnosticCategory::Error, "this_cannot_be_referenced_in_a_computed_property_name_2465", "'this' cannot be referenced in a computed property name."); }; - static shared super_cannot_be_referenced_in_a_computed_property_name(){ return diag(2466, DiagnosticCategory::Error, "super_cannot_be_referenced_in_a_computed_property_name_2466", "'super' cannot be referenced in a computed property name."); }; - static shared A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type(){ return diag(2467, DiagnosticCategory::Error, "A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467", "A computed property name cannot reference a type parameter from its containing type."); }; - static shared Cannot_find_global_value_0(){ return diag(2468, DiagnosticCategory::Error, "Cannot_find_global_value_0_2468", "Cannot find global value '{0}'."); }; - static shared The_0_operator_cannot_be_applied_to_type_symbol(){ return diag(2469, DiagnosticCategory::Error, "The_0_operator_cannot_be_applied_to_type_symbol_2469", "The '{0}' operator cannot be applied to type 'symbol'."); }; - static shared Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher(){ return diag(2472, DiagnosticCategory::Error, "Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472", "Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher."); }; - static shared Enum_declarations_must_all_be_const_or_non_const(){ return diag(2473, DiagnosticCategory::Error, "Enum_declarations_must_all_be_const_or_non_const_2473", "Enum declarations must all be const or non-const."); }; - static shared const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values(){ return diag(2474, DiagnosticCategory::Error, "const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values_2474", "const enum member initializers can only contain literal values and other computed enum values."); }; - static shared const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query(){ return diag(2475, DiagnosticCategory::Error, "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475", "'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query."); }; - static shared A_const_enum_member_can_only_be_accessed_using_a_string_literal(){ return diag(2476, DiagnosticCategory::Error, "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476", "A const enum member can only be accessed using a string literal."); }; - static shared const_enum_member_initializer_was_evaluated_to_a_non_finite_value(){ return diag(2477, DiagnosticCategory::Error, "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477", "'const' enum member initializer was evaluated to a non-finite value."); }; - static shared const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN(){ return diag(2478, DiagnosticCategory::Error, "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478", "'const' enum member initializer was evaluated to disallowed value 'NaN'."); }; - static shared let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations(){ return diag(2480, DiagnosticCategory::Error, "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480", "'let' is not allowed to be used as a name in 'let' or 'const' declarations."); }; - static shared Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1(){ return diag(2481, DiagnosticCategory::Error, "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481", "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'."); }; - static shared The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation(){ return diag(2483, DiagnosticCategory::Error, "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483", "The left-hand side of a 'for...of' statement cannot use a type annotation."); }; - static shared Export_declaration_conflicts_with_exported_declaration_of_0(){ return diag(2484, DiagnosticCategory::Error, "Export_declaration_conflicts_with_exported_declaration_of_0_2484", "Export declaration conflicts with exported declaration of '{0}'."); }; - static shared The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access(){ return diag(2487, DiagnosticCategory::Error, "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487", "The left-hand side of a 'for...of' statement must be a variable or a property access."); }; - static shared Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator(){ return diag(2488, DiagnosticCategory::Error, "Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488", "Type '{0}' must have a '[Symbol.iterator]()' method that returns an iterator."); }; - static shared An_iterator_must_have_a_next_method(){ return diag(2489, DiagnosticCategory::Error, "An_iterator_must_have_a_next_method_2489", "An iterator must have a 'next()' method."); }; - static shared The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property(){ return diag(2490, DiagnosticCategory::Error, "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490", "The type returned by the '{0}()' method of an iterator must have a 'value' property."); }; - static shared The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern(){ return diag(2491, DiagnosticCategory::Error, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491", "The left-hand side of a 'for...in' statement cannot be a destructuring pattern."); }; - static shared Cannot_redeclare_identifier_0_in_catch_clause(){ return diag(2492, DiagnosticCategory::Error, "Cannot_redeclare_identifier_0_in_catch_clause_2492", "Cannot redeclare identifier '{0}' in catch clause."); }; - static shared Tuple_type_0_of_length_1_has_no_element_at_index_2(){ return diag(2493, DiagnosticCategory::Error, "Tuple_type_0_of_length_1_has_no_element_at_index_2_2493", "Tuple type '{0}' of length '{1}' has no element at index '{2}'."); }; - static shared Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher(){ return diag(2494, DiagnosticCategory::Error, "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494", "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher."); }; - static shared Type_0_is_not_an_array_type_or_a_string_type(){ return diag(2495, DiagnosticCategory::Error, "Type_0_is_not_an_array_type_or_a_string_type_2495", "Type '{0}' is not an array type or a string type."); }; - static shared The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression(){ return diag(2496, DiagnosticCategory::Error, "The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_stand_2496", "The 'arguments' object cannot be referenced in an arrow function in ES3 and ES5. Consider using a standard function expression."); }; - static shared This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export(){ return diag(2497, DiagnosticCategory::Error, "This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497", "This module can only be referenced with ECMAScript imports/exports by turning on the '{0}' flag and referencing its default export."); }; - static shared Module_0_uses_export_and_cannot_be_used_with_export_Asterisk(){ return diag(2498, DiagnosticCategory::Error, "Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498", "Module '{0}' uses 'export =' and cannot be used with 'export *'."); }; - static shared An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments(){ return diag(2499, DiagnosticCategory::Error, "An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499", "An interface can only extend an identifier/qualified-name with optional type arguments."); }; - static shared A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments(){ return diag(2500, DiagnosticCategory::Error, "A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500", "A class can only implement an identifier/qualified-name with optional type arguments."); }; - static shared A_rest_element_cannot_contain_a_binding_pattern(){ return diag(2501, DiagnosticCategory::Error, "A_rest_element_cannot_contain_a_binding_pattern_2501", "A rest element cannot contain a binding pattern."); }; - static shared _0_is_referenced_directly_or_indirectly_in_its_own_type_annotation(){ return diag(2502, DiagnosticCategory::Error, "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502", "'{0}' is referenced directly or indirectly in its own type annotation."); }; - static shared Cannot_find_namespace_0(){ return diag(2503, DiagnosticCategory::Error, "Cannot_find_namespace_0_2503", "Cannot find namespace '{0}'."); }; - static shared Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator(){ return diag(2504, DiagnosticCategory::Error, "Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504", "Type '{0}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator."); }; - static shared A_generator_cannot_have_a_void_type_annotation(){ return diag(2505, DiagnosticCategory::Error, "A_generator_cannot_have_a_void_type_annotation_2505", "A generator cannot have a 'void' type annotation."); }; - static shared _0_is_referenced_directly_or_indirectly_in_its_own_base_expression(){ return diag(2506, DiagnosticCategory::Error, "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506", "'{0}' is referenced directly or indirectly in its own base expression."); }; - static shared Type_0_is_not_a_constructor_function_type(){ return diag(2507, DiagnosticCategory::Error, "Type_0_is_not_a_constructor_function_type_2507", "Type '{0}' is not a constructor function type."); }; - static shared No_base_constructor_has_the_specified_number_of_type_arguments(){ return diag(2508, DiagnosticCategory::Error, "No_base_constructor_has_the_specified_number_of_type_arguments_2508", "No base constructor has the specified number of type arguments."); }; - static shared Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members(){ return diag(2509, DiagnosticCategory::Error, "Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509", "Base constructor return type '{0}' is not an object type or intersection of object types with statically known members."); }; - static shared Base_constructors_must_all_have_the_same_return_type(){ return diag(2510, DiagnosticCategory::Error, "Base_constructors_must_all_have_the_same_return_type_2510", "Base constructors must all have the same return type."); }; - static shared Cannot_create_an_instance_of_an_abstract_class(){ return diag(2511, DiagnosticCategory::Error, "Cannot_create_an_instance_of_an_abstract_class_2511", "Cannot create an instance of an abstract class."); }; - static shared Overload_signatures_must_all_be_abstract_or_non_abstract(){ return diag(2512, DiagnosticCategory::Error, "Overload_signatures_must_all_be_abstract_or_non_abstract_2512", "Overload signatures must all be abstract or non-abstract."); }; - static shared Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression(){ return diag(2513, DiagnosticCategory::Error, "Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513", "Abstract method '{0}' in class '{1}' cannot be accessed via super expression."); }; - static shared Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2(){ return diag(2515, DiagnosticCategory::Error, "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515", "Non-abstract class '{0}' does not implement inherited abstract member '{1}' from class '{2}'."); }; - static shared All_declarations_of_an_abstract_method_must_be_consecutive(){ return diag(2516, DiagnosticCategory::Error, "All_declarations_of_an_abstract_method_must_be_consecutive_2516", "All declarations of an abstract method must be consecutive."); }; - static shared Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type(){ return diag(2517, DiagnosticCategory::Error, "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517", "Cannot assign an abstract constructor type to a non-abstract constructor type."); }; - static shared A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard(){ return diag(2518, DiagnosticCategory::Error, "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518", "A 'this'-based type guard is not compatible with a parameter-based type guard."); }; - static shared An_async_iterator_must_have_a_next_method(){ return diag(2519, DiagnosticCategory::Error, "An_async_iterator_must_have_a_next_method_2519", "An async iterator must have a 'next()' method."); }; - static shared Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions(){ return diag(2520, DiagnosticCategory::Error, "Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520", "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions."); }; - static shared The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method(){ return diag(2522, DiagnosticCategory::Error, "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522", "The 'arguments' object cannot be referenced in an async function or method in ES3 and ES5. Consider using a standard function or method."); }; - static shared yield_expressions_cannot_be_used_in_a_parameter_initializer(){ return diag(2523, DiagnosticCategory::Error, "yield_expressions_cannot_be_used_in_a_parameter_initializer_2523", "'yield' expressions cannot be used in a parameter initializer."); }; - static shared await_expressions_cannot_be_used_in_a_parameter_initializer(){ return diag(2524, DiagnosticCategory::Error, "await_expressions_cannot_be_used_in_a_parameter_initializer_2524", "'await' expressions cannot be used in a parameter initializer."); }; - static shared Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value(){ return diag(2525, DiagnosticCategory::Error, "Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525", "Initializer provides no value for this binding element and the binding element has no default value."); }; - static shared A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface(){ return diag(2526, DiagnosticCategory::Error, "A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526", "A 'this' type is available only in a non-static member of a class or interface."); }; - static shared The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary(){ return diag(2527, DiagnosticCategory::Error, "The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527", "The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary."); }; - static shared A_module_cannot_have_multiple_default_exports(){ return diag(2528, DiagnosticCategory::Error, "A_module_cannot_have_multiple_default_exports_2528", "A module cannot have multiple default exports."); }; - static shared Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions(){ return diag(2529, DiagnosticCategory::Error, "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_func_2529", "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions."); }; - static shared Property_0_is_incompatible_with_index_signature(){ return diag(2530, DiagnosticCategory::Error, "Property_0_is_incompatible_with_index_signature_2530", "Property '{0}' is incompatible with index signature."); }; - static shared Object_is_possibly_null(){ return diag(2531, DiagnosticCategory::Error, "Object_is_possibly_null_2531", "Object is possibly 'null'."); }; - static shared Object_is_possibly_undefined(){ return diag(2532, DiagnosticCategory::Error, "Object_is_possibly_undefined_2532", "Object is possibly 'undefined'."); }; - static shared Object_is_possibly_null_or_undefined(){ return diag(2533, DiagnosticCategory::Error, "Object_is_possibly_null_or_undefined_2533", "Object is possibly 'null' or 'undefined'."); }; - static shared A_function_returning_never_cannot_have_a_reachable_end_point(){ return diag(2534, DiagnosticCategory::Error, "A_function_returning_never_cannot_have_a_reachable_end_point_2534", "A function returning 'never' cannot have a reachable end point."); }; - static shared Enum_type_0_has_members_with_initializers_that_are_not_literals(){ return diag(2535, DiagnosticCategory::Error, "Enum_type_0_has_members_with_initializers_that_are_not_literals_2535", "Enum type '{0}' has members with initializers that are not literals."); }; - static shared Type_0_cannot_be_used_to_index_type_1(){ return diag(2536, DiagnosticCategory::Error, "Type_0_cannot_be_used_to_index_type_1_2536", "Type '{0}' cannot be used to index type '{1}'."); }; - static shared Type_0_has_no_matching_index_signature_for_type_1(){ return diag(2537, DiagnosticCategory::Error, "Type_0_has_no_matching_index_signature_for_type_1_2537", "Type '{0}' has no matching index signature for type '{1}'."); }; - static shared Type_0_cannot_be_used_as_an_index_type(){ return diag(2538, DiagnosticCategory::Error, "Type_0_cannot_be_used_as_an_index_type_2538", "Type '{0}' cannot be used as an index type."); }; - static shared Cannot_assign_to_0_because_it_is_not_a_variable(){ return diag(2539, DiagnosticCategory::Error, "Cannot_assign_to_0_because_it_is_not_a_variable_2539", "Cannot assign to '{0}' because it is not a variable."); }; - static shared Cannot_assign_to_0_because_it_is_a_read_only_property(){ return diag(2540, DiagnosticCategory::Error, "Cannot_assign_to_0_because_it_is_a_read_only_property_2540", "Cannot assign to '{0}' because it is a read-only property."); }; - static shared Index_signature_in_type_0_only_permits_reading(){ return diag(2542, DiagnosticCategory::Error, "Index_signature_in_type_0_only_permits_reading_2542", "Index signature in type '{0}' only permits reading."); }; - static shared Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference(){ return diag(2543, DiagnosticCategory::Error, "Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543", "Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference."); }; - static shared Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference(){ return diag(2544, DiagnosticCategory::Error, "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544", "Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference."); }; - static shared A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any(){ return diag(2545, DiagnosticCategory::Error, "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545", "A mixin class must have a constructor with a single rest parameter of type 'any[]'."); }; - static shared The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property(){ return diag(2547, DiagnosticCategory::Error, "The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547", "The type returned by the '{0}()' method of an async iterator must be a promise for a type with a 'value' property."); }; - static shared Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator(){ return diag(2548, DiagnosticCategory::Error, "Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548", "Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator."); }; - static shared Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator(){ return diag(2549, DiagnosticCategory::Error, "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549", "Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator."); }; - static shared Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2_or_later(){ return diag(2550, DiagnosticCategory::Error, "Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_c_2550", "Property '{0}' does not exist on type '{1}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{2}' or later."); }; - static shared Property_0_does_not_exist_on_type_1_Did_you_mean_2(){ return diag(2551, DiagnosticCategory::Error, "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551", "Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?"); }; - static shared Cannot_find_name_0_Did_you_mean_1(){ return diag(2552, DiagnosticCategory::Error, "Cannot_find_name_0_Did_you_mean_1_2552", "Cannot find name '{0}'. Did you mean '{1}'?"); }; - static shared Computed_values_are_not_permitted_in_an_enum_with_string_valued_members(){ return diag(2553, DiagnosticCategory::Error, "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553", "Computed values are not permitted in an enum with string valued members."); }; - static shared Expected_0_arguments_but_got_1(){ return diag(2554, DiagnosticCategory::Error, "Expected_0_arguments_but_got_1_2554", "Expected {0} arguments, but got {1}."); }; - static shared Expected_at_least_0_arguments_but_got_1(){ return diag(2555, DiagnosticCategory::Error, "Expected_at_least_0_arguments_but_got_1_2555", "Expected at least {0} arguments, but got {1}."); }; - static shared A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter(){ return diag(2556, DiagnosticCategory::Error, "A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter_2556", "A spread argument must either have a tuple type or be passed to a rest parameter."); }; - static shared Expected_0_type_arguments_but_got_1(){ return diag(2558, DiagnosticCategory::Error, "Expected_0_type_arguments_but_got_1_2558", "Expected {0} type arguments, but got {1}."); }; - static shared Type_0_has_no_properties_in_common_with_type_1(){ return diag(2559, DiagnosticCategory::Error, "Type_0_has_no_properties_in_common_with_type_1_2559", "Type '{0}' has no properties in common with type '{1}'."); }; - static shared Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it(){ return diag(2560, DiagnosticCategory::Error, "Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560", "Value of type '{0}' has no properties in common with type '{1}'. Did you mean to call it?"); }; - static shared Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2(){ return diag(2561, DiagnosticCategory::Error, "Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_writ_2561", "Object literal may only specify known properties, but '{0}' does not exist in type '{1}'. Did you mean to write '{2}'?"); }; - static shared Base_class_expressions_cannot_reference_class_type_parameters(){ return diag(2562, DiagnosticCategory::Error, "Base_class_expressions_cannot_reference_class_type_parameters_2562", "Base class expressions cannot reference class type parameters."); }; - static shared The_containing_function_or_module_body_is_too_large_for_control_flow_analysis(){ return diag(2563, DiagnosticCategory::Error, "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563", "The containing function or module body is too large for control flow analysis."); }; - static shared Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor(){ return diag(2564, DiagnosticCategory::Error, "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564", "Property '{0}' has no initializer and is not definitely assigned in the constructor."); }; - static shared Property_0_is_used_before_being_assigned(){ return diag(2565, DiagnosticCategory::Error, "Property_0_is_used_before_being_assigned_2565", "Property '{0}' is used before being assigned."); }; - static shared A_rest_element_cannot_have_a_property_name(){ return diag(2566, DiagnosticCategory::Error, "A_rest_element_cannot_have_a_property_name_2566", "A rest element cannot have a property name."); }; - static shared Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations(){ return diag(2567, DiagnosticCategory::Error, "Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567", "Enum declarations can only merge with namespace or other enum declarations."); }; - static shared Property_0_may_not_exist_on_type_1_Did_you_mean_2(){ return diag(2568, DiagnosticCategory::Error, "Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568", "Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?"); }; - static shared Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators(){ return diag(2569, DiagnosticCategory::Error, "Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterati_2569", "Type '{0}' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators."); }; - static shared Could_not_find_name_0_Did_you_mean_1(){ return diag(2570, DiagnosticCategory::Error, "Could_not_find_name_0_Did_you_mean_1_2570", "Could not find name '{0}'. Did you mean '{1}'?"); }; - static shared Object_is_of_type_unknown(){ return diag(2571, DiagnosticCategory::Error, "Object_is_of_type_unknown_2571", "Object is of type 'unknown'."); }; - static shared A_rest_element_type_must_be_an_array_type(){ return diag(2574, DiagnosticCategory::Error, "A_rest_element_type_must_be_an_array_type_2574", "A rest element type must be an array type."); }; - static shared No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments(){ return diag(2575, DiagnosticCategory::Error, "No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575", "No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments."); }; - static shared Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead(){ return diag(2576, DiagnosticCategory::Error, "Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead_2576", "Property '{0}' does not exist on type '{1}'. Did you mean to access the static member '{2}' instead?"); }; - static shared Return_type_annotation_circularly_references_itself(){ return diag(2577, DiagnosticCategory::Error, "Return_type_annotation_circularly_references_itself_2577", "Return type annotation circularly references itself."); }; - static shared Unused_ts_expect_error_directive(){ return diag(2578, DiagnosticCategory::Error, "Unused_ts_expect_error_directive_2578", "Unused '@ts-expect-error' directive."); }; - static shared Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode(){ return diag(2580, DiagnosticCategory::Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2580", "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`."); }; - static shared Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery(){ return diag(2581, DiagnosticCategory::Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2581", "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`."); }; - static shared Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha(){ return diag(2582, DiagnosticCategory::Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2582", "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`."); }; - static shared Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later(){ return diag(2583, DiagnosticCategory::Error, "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583", "Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later."); }; - static shared Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom(){ return diag(2584, DiagnosticCategory::Error, "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584", "Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'."); }; - static shared _0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later(){ return diag(2585, DiagnosticCategory::Error, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585", + static shared_ptr The_return_type_of_a_get_accessor_must_be_assignable_to_its_set_accessor_type(){ return diag(2380, DiagnosticCategory::Error, "The_return_type_of_a_get_accessor_must_be_assignable_to_its_set_accessor_type_2380", "The return type of a 'get' accessor must be assignable to its 'set' accessor type"); }; + static shared_ptr Overload_signatures_must_all_be_exported_or_non_exported(){ return diag(2383, DiagnosticCategory::Error, "Overload_signatures_must_all_be_exported_or_non_exported_2383", "Overload signatures must all be exported or non-exported."); }; + static shared_ptr Overload_signatures_must_all_be_ambient_or_non_ambient(){ return diag(2384, DiagnosticCategory::Error, "Overload_signatures_must_all_be_ambient_or_non_ambient_2384", "Overload signatures must all be ambient or non-ambient."); }; + static shared_ptr Overload_signatures_must_all_be_public_private_or_protected(){ return diag(2385, DiagnosticCategory::Error, "Overload_signatures_must_all_be_public_private_or_protected_2385", "Overload signatures must all be public, private or protected."); }; + static shared_ptr Overload_signatures_must_all_be_optional_or_required(){ return diag(2386, DiagnosticCategory::Error, "Overload_signatures_must_all_be_optional_or_required_2386", "Overload signatures must all be optional or required."); }; + static shared_ptr Function_overload_must_be_static(){ return diag(2387, DiagnosticCategory::Error, "Function_overload_must_be_static_2387", "Function overload must be static."); }; + static shared_ptr Function_overload_must_not_be_static(){ return diag(2388, DiagnosticCategory::Error, "Function_overload_must_not_be_static_2388", "Function overload must not be static."); }; + static shared_ptr Function_implementation_name_must_be_0(){ return diag(2389, DiagnosticCategory::Error, "Function_implementation_name_must_be_0_2389", "Function implementation name must be '{0}'."); }; + static shared_ptr Constructor_implementation_is_missing(){ return diag(2390, DiagnosticCategory::Error, "Constructor_implementation_is_missing_2390", "Constructor implementation is missing."); }; + static shared_ptr Function_implementation_is_missing_or_not_immediately_following_the_declaration(){ return diag(2391, DiagnosticCategory::Error, "Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391", "Function implementation is missing or not immediately following the declaration."); }; + static shared_ptr Multiple_constructor_implementations_are_not_allowed(){ return diag(2392, DiagnosticCategory::Error, "Multiple_constructor_implementations_are_not_allowed_2392", "Multiple constructor implementations are not allowed."); }; + static shared_ptr Duplicate_function_implementation(){ return diag(2393, DiagnosticCategory::Error, "Duplicate_function_implementation_2393", "Duplicate function implementation."); }; + static shared_ptr This_overload_signature_is_not_compatible_with_its_implementation_signature(){ return diag(2394, DiagnosticCategory::Error, "This_overload_signature_is_not_compatible_with_its_implementation_signature_2394", "This overload signature is not compatible with its implementation signature."); }; + static shared_ptr Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local(){ return diag(2395, DiagnosticCategory::Error, "Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395", "Individual declarations in merged declaration '{0}' must be all exported or all local."); }; + static shared_ptr Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters(){ return diag(2396, DiagnosticCategory::Error, "Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters_2396", "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters."); }; + static shared_ptr Declaration_name_conflicts_with_built_in_global_identifier_0(){ return diag(2397, DiagnosticCategory::Error, "Declaration_name_conflicts_with_built_in_global_identifier_0_2397", "Declaration name conflicts with built-in global identifier '{0}'."); }; + static shared_ptr constructor_cannot_be_used_as_a_parameter_property_name(){ return diag(2398, DiagnosticCategory::Error, "constructor_cannot_be_used_as_a_parameter_property_name_2398", "'constructor' cannot be used as a parameter property name."); }; + static shared_ptr Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference(){ return diag(2399, DiagnosticCategory::Error, "Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399", "Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference."); }; + static shared_ptr Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference(){ return diag(2400, DiagnosticCategory::Error, "Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference_2400", "Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference."); }; + static shared_ptr Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference(){ return diag(2402, DiagnosticCategory::Error, "Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402", "Expression resolves to '_super' that compiler uses to capture base class reference."); }; + static shared_ptr Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2(){ return diag(2403, DiagnosticCategory::Error, "Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403", "Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'."); }; + static shared_ptr The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation(){ return diag(2404, DiagnosticCategory::Error, "The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404", "The left-hand side of a 'for...in' statement cannot use a type annotation."); }; + static shared_ptr The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any(){ return diag(2405, DiagnosticCategory::Error, "The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405", "The left-hand side of a 'for...in' statement must be of type 'string' or 'any'."); }; + static shared_ptr The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access(){ return diag(2406, DiagnosticCategory::Error, "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406", "The left-hand side of a 'for...in' statement must be a variable or a property access."); }; + static shared_ptr The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0(){ return diag(2407, DiagnosticCategory::Error, "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407", "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '{0}'."); }; + static shared_ptr Setters_cannot_return_a_value(){ return diag(2408, DiagnosticCategory::Error, "Setters_cannot_return_a_value_2408", "Setters cannot return a value."); }; + static shared_ptr Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class(){ return diag(2409, DiagnosticCategory::Error, "Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409", "Return type of constructor signature must be assignable to the instance type of the class."); }; + static shared_ptr The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any(){ return diag(2410, DiagnosticCategory::Error, "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410", "The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'."); }; + static shared_ptr Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target(){ return diag(2412, DiagnosticCategory::Error, "Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412", "Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the type of the target."); }; + static shared_ptr Property_0_of_type_1_is_not_assignable_to_2_index_type_3(){ return diag(2411, DiagnosticCategory::Error, "Property_0_of_type_1_is_not_assignable_to_2_index_type_3_2411", "Property '{0}' of type '{1}' is not assignable to '{2}' index type '{3}'."); }; + static shared_ptr _0_index_type_1_is_not_assignable_to_2_index_type_3(){ return diag(2413, DiagnosticCategory::Error, "_0_index_type_1_is_not_assignable_to_2_index_type_3_2413", "'{0}' index type '{1}' is not assignable to '{2}' index type '{3}'."); }; + static shared_ptr Class_name_cannot_be_0(){ return diag(2414, DiagnosticCategory::Error, "Class_name_cannot_be_0_2414", "Class name cannot be '{0}'."); }; + static shared_ptr Class_0_incorrectly_extends_base_class_1(){ return diag(2415, DiagnosticCategory::Error, "Class_0_incorrectly_extends_base_class_1_2415", "Class '{0}' incorrectly extends base class '{1}'."); }; + static shared_ptr Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2(){ return diag(2416, DiagnosticCategory::Error, "Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416", "Property '{0}' in type '{1}' is not assignable to the same property in base type '{2}'."); }; + static shared_ptr Class_static_side_0_incorrectly_extends_base_class_static_side_1(){ return diag(2417, DiagnosticCategory::Error, "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417", "Class static side '{0}' incorrectly extends base class static side '{1}'."); }; + static shared_ptr Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1(){ return diag(2418, DiagnosticCategory::Error, "Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418", "Type of computed property's value is '{0}', which is not assignable to type '{1}'."); }; + static shared_ptr Types_of_construct_signatures_are_incompatible(){ return diag(2419, DiagnosticCategory::Error, "Types_of_construct_signatures_are_incompatible_2419", "Types of construct signatures are incompatible."); }; + static shared_ptr Class_0_incorrectly_implements_interface_1(){ return diag(2420, DiagnosticCategory::Error, "Class_0_incorrectly_implements_interface_1_2420", "Class '{0}' incorrectly implements interface '{1}'."); }; + static shared_ptr A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members(){ return diag(2422, DiagnosticCategory::Error, "A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422", "A class can only implement an object type or intersection of object types with statically known members."); }; + static shared_ptr Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor(){ return diag(2423, DiagnosticCategory::Error, "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423", "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor."); }; + static shared_ptr Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function(){ return diag(2425, DiagnosticCategory::Error, "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425", "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function."); }; + static shared_ptr Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function(){ return diag(2426, DiagnosticCategory::Error, "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426", "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function."); }; + static shared_ptr Interface_name_cannot_be_0(){ return diag(2427, DiagnosticCategory::Error, "Interface_name_cannot_be_0_2427", "Interface name cannot be '{0}'."); }; + static shared_ptr All_declarations_of_0_must_have_identical_type_parameters(){ return diag(2428, DiagnosticCategory::Error, "All_declarations_of_0_must_have_identical_type_parameters_2428", "All declarations of '{0}' must have identical type parameters."); }; + static shared_ptr Interface_0_incorrectly_extends_interface_1(){ return diag(2430, DiagnosticCategory::Error, "Interface_0_incorrectly_extends_interface_1_2430", "Interface '{0}' incorrectly extends interface '{1}'."); }; + static shared_ptr Enum_name_cannot_be_0(){ return diag(2431, DiagnosticCategory::Error, "Enum_name_cannot_be_0_2431", "Enum name cannot be '{0}'."); }; + static shared_ptr In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element(){ return diag(2432, DiagnosticCategory::Error, "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432", "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element."); }; + static shared_ptr A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged(){ return diag(2433, DiagnosticCategory::Error, "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433", "A namespace declaration cannot be in a different file from a class or function with which it is merged."); }; + static shared_ptr A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged(){ return diag(2434, DiagnosticCategory::Error, "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434", "A namespace declaration cannot be located prior to a class or function with which it is merged."); }; + static shared_ptr Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces(){ return diag(2435, DiagnosticCategory::Error, "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435", "Ambient modules cannot be nested in other modules or namespaces."); }; + static shared_ptr Ambient_module_declaration_cannot_specify_relative_module_name(){ return diag(2436, DiagnosticCategory::Error, "Ambient_module_declaration_cannot_specify_relative_module_name_2436", "Ambient module declaration cannot specify relative module name."); }; + static shared_ptr Module_0_is_hidden_by_a_local_declaration_with_the_same_name(){ return diag(2437, DiagnosticCategory::Error, "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437", "Module '{0}' is hidden by a local declaration with the same name."); }; + static shared_ptr Import_name_cannot_be_0(){ return diag(2438, DiagnosticCategory::Error, "Import_name_cannot_be_0_2438", "Import name cannot be '{0}'."); }; + static shared_ptr Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name(){ return diag(2439, DiagnosticCategory::Error, "Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439", "Import or export declaration in an ambient module declaration cannot reference module through relative module name."); }; + static shared_ptr Import_declaration_conflicts_with_local_declaration_of_0(){ return diag(2440, DiagnosticCategory::Error, "Import_declaration_conflicts_with_local_declaration_of_0_2440", "Import declaration conflicts with local declaration of '{0}'."); }; + static shared_ptr Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module(){ return diag(2441, DiagnosticCategory::Error, "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441", "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module."); }; + static shared_ptr Types_have_separate_declarations_of_a_private_property_0(){ return diag(2442, DiagnosticCategory::Error, "Types_have_separate_declarations_of_a_private_property_0_2442", "Types have separate declarations of a private property '{0}'."); }; + static shared_ptr Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2(){ return diag(2443, DiagnosticCategory::Error, "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443", "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'."); }; + static shared_ptr Property_0_is_protected_in_type_1_but_public_in_type_2(){ return diag(2444, DiagnosticCategory::Error, "Property_0_is_protected_in_type_1_but_public_in_type_2_2444", "Property '{0}' is protected in type '{1}' but public in type '{2}'."); }; + static shared_ptr Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses(){ return diag(2445, DiagnosticCategory::Error, "Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses_2445", "Property '{0}' is protected and only accessible within class '{1}' and its subclasses."); }; + static shared_ptr Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2(){ return diag(2446, DiagnosticCategory::Error, "Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_cl_2446", "Property '{0}' is protected and only accessible through an instance of class '{1}'. This is an instance of class '{2}'."); }; + static shared_ptr The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead(){ return diag(2447, DiagnosticCategory::Error, "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447", "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead."); }; + static shared_ptr Block_scoped_variable_0_used_before_its_declaration(){ return diag(2448, DiagnosticCategory::Error, "Block_scoped_variable_0_used_before_its_declaration_2448", "Block-scoped variable '{0}' used before its declaration."); }; + static shared_ptr Class_0_used_before_its_declaration(){ return diag(2449, DiagnosticCategory::Error, "Class_0_used_before_its_declaration_2449", "Class '{0}' used before its declaration."); }; + static shared_ptr Enum_0_used_before_its_declaration(){ return diag(2450, DiagnosticCategory::Error, "Enum_0_used_before_its_declaration_2450", "Enum '{0}' used before its declaration."); }; + static shared_ptr Cannot_redeclare_block_scoped_variable_0(){ return diag(2451, DiagnosticCategory::Error, "Cannot_redeclare_block_scoped_variable_0_2451", "Cannot redeclare block-scoped variable '{0}'."); }; + static shared_ptr An_enum_member_cannot_have_a_numeric_name(){ return diag(2452, DiagnosticCategory::Error, "An_enum_member_cannot_have_a_numeric_name_2452", "An enum member cannot have a numeric name."); }; + static shared_ptr Variable_0_is_used_before_being_assigned(){ return diag(2454, DiagnosticCategory::Error, "Variable_0_is_used_before_being_assigned_2454", "Variable '{0}' is used before being assigned."); }; + static shared_ptr Type_alias_0_circularly_references_itself(){ return diag(2456, DiagnosticCategory::Error, "Type_alias_0_circularly_references_itself_2456", "Type alias '{0}' circularly references itself."); }; + static shared_ptr Type_alias_name_cannot_be_0(){ return diag(2457, DiagnosticCategory::Error, "Type_alias_name_cannot_be_0_2457", "Type alias name cannot be '{0}'."); }; + static shared_ptr An_AMD_module_cannot_have_multiple_name_assignments(){ return diag(2458, DiagnosticCategory::Error, "An_AMD_module_cannot_have_multiple_name_assignments_2458", "An AMD module cannot have multiple name assignments."); }; + static shared_ptr Module_0_declares_1_locally_but_it_is_not_exported(){ return diag(2459, DiagnosticCategory::Error, "Module_0_declares_1_locally_but_it_is_not_exported_2459", "Module '{0}' declares '{1}' locally, but it is not exported."); }; + static shared_ptr Module_0_declares_1_locally_but_it_is_exported_as_2(){ return diag(2460, DiagnosticCategory::Error, "Module_0_declares_1_locally_but_it_is_exported_as_2_2460", "Module '{0}' declares '{1}' locally, but it is exported as '{2}'."); }; + static shared_ptr Type_0_is_not_an_array_type(){ return diag(2461, DiagnosticCategory::Error, "Type_0_is_not_an_array_type_2461", "Type '{0}' is not an array type."); }; + static shared_ptr A_rest_element_must_be_last_in_a_destructuring_pattern(){ return diag(2462, DiagnosticCategory::Error, "A_rest_element_must_be_last_in_a_destructuring_pattern_2462", "A rest element must be last in a destructuring pattern."); }; + static shared_ptr A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature(){ return diag(2463, DiagnosticCategory::Error, "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463", "A binding pattern parameter cannot be optional in an implementation signature."); }; + static shared_ptr A_computed_property_name_must_be_of_type_string_number_symbol_or_any(){ return diag(2464, DiagnosticCategory::Error, "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464", "A computed property name must be of type 'string', 'number', 'symbol', or 'any'."); }; + static shared_ptr this_cannot_be_referenced_in_a_computed_property_name(){ return diag(2465, DiagnosticCategory::Error, "this_cannot_be_referenced_in_a_computed_property_name_2465", "'this' cannot be referenced in a computed property name."); }; + static shared_ptr super_cannot_be_referenced_in_a_computed_property_name(){ return diag(2466, DiagnosticCategory::Error, "super_cannot_be_referenced_in_a_computed_property_name_2466", "'super' cannot be referenced in a computed property name."); }; + static shared_ptr A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type(){ return diag(2467, DiagnosticCategory::Error, "A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467", "A computed property name cannot reference a type parameter from its containing type."); }; + static shared_ptr Cannot_find_global_value_0(){ return diag(2468, DiagnosticCategory::Error, "Cannot_find_global_value_0_2468", "Cannot find global value '{0}'."); }; + static shared_ptr The_0_operator_cannot_be_applied_to_type_symbol(){ return diag(2469, DiagnosticCategory::Error, "The_0_operator_cannot_be_applied_to_type_symbol_2469", "The '{0}' operator cannot be applied to type 'symbol'."); }; + static shared_ptr Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher(){ return diag(2472, DiagnosticCategory::Error, "Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472", "Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher."); }; + static shared_ptr Enum_declarations_must_all_be_const_or_non_const(){ return diag(2473, DiagnosticCategory::Error, "Enum_declarations_must_all_be_const_or_non_const_2473", "Enum declarations must all be const or non-const."); }; + static shared_ptr const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values(){ return diag(2474, DiagnosticCategory::Error, "const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values_2474", "const enum member initializers can only contain literal values and other computed enum values."); }; + static shared_ptr const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query(){ return diag(2475, DiagnosticCategory::Error, "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475", "'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query."); }; + static shared_ptr A_const_enum_member_can_only_be_accessed_using_a_string_literal(){ return diag(2476, DiagnosticCategory::Error, "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476", "A const enum member can only be accessed using a string literal."); }; + static shared_ptr const_enum_member_initializer_was_evaluated_to_a_non_finite_value(){ return diag(2477, DiagnosticCategory::Error, "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477", "'const' enum member initializer was evaluated to a non-finite value."); }; + static shared_ptr const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN(){ return diag(2478, DiagnosticCategory::Error, "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478", "'const' enum member initializer was evaluated to disallowed value 'NaN'."); }; + static shared_ptr let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations(){ return diag(2480, DiagnosticCategory::Error, "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480", "'let' is not allowed to be used as a name in 'let' or 'const' declarations."); }; + static shared_ptr Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1(){ return diag(2481, DiagnosticCategory::Error, "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481", "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'."); }; + static shared_ptr The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation(){ return diag(2483, DiagnosticCategory::Error, "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483", "The left-hand side of a 'for...of' statement cannot use a type annotation."); }; + static shared_ptr Export_declaration_conflicts_with_exported_declaration_of_0(){ return diag(2484, DiagnosticCategory::Error, "Export_declaration_conflicts_with_exported_declaration_of_0_2484", "Export declaration conflicts with exported declaration of '{0}'."); }; + static shared_ptr The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access(){ return diag(2487, DiagnosticCategory::Error, "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487", "The left-hand side of a 'for...of' statement must be a variable or a property access."); }; + static shared_ptr Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator(){ return diag(2488, DiagnosticCategory::Error, "Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488", "Type '{0}' must have a '[Symbol.iterator]()' method that returns an iterator."); }; + static shared_ptr An_iterator_must_have_a_next_method(){ return diag(2489, DiagnosticCategory::Error, "An_iterator_must_have_a_next_method_2489", "An iterator must have a 'next()' method."); }; + static shared_ptr The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property(){ return diag(2490, DiagnosticCategory::Error, "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490", "The type returned by the '{0}()' method of an iterator must have a 'value' property."); }; + static shared_ptr The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern(){ return diag(2491, DiagnosticCategory::Error, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491", "The left-hand side of a 'for...in' statement cannot be a destructuring pattern."); }; + static shared_ptr Cannot_redeclare_identifier_0_in_catch_clause(){ return diag(2492, DiagnosticCategory::Error, "Cannot_redeclare_identifier_0_in_catch_clause_2492", "Cannot redeclare identifier '{0}' in catch clause."); }; + static shared_ptr Tuple_type_0_of_length_1_has_no_element_at_index_2(){ return diag(2493, DiagnosticCategory::Error, "Tuple_type_0_of_length_1_has_no_element_at_index_2_2493", "Tuple type '{0}' of length '{1}' has no element at index '{2}'."); }; + static shared_ptr Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher(){ return diag(2494, DiagnosticCategory::Error, "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494", "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher."); }; + static shared_ptr Type_0_is_not_an_array_type_or_a_string_type(){ return diag(2495, DiagnosticCategory::Error, "Type_0_is_not_an_array_type_or_a_string_type_2495", "Type '{0}' is not an array type or a string type."); }; + static shared_ptr The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression(){ return diag(2496, DiagnosticCategory::Error, "The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_stand_2496", "The 'arguments' object cannot be referenced in an arrow function in ES3 and ES5. Consider using a standard function expression."); }; + static shared_ptr This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export(){ return diag(2497, DiagnosticCategory::Error, "This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497", "This module can only be referenced with ECMAScript imports/exports by turning on the '{0}' flag and referencing its default export."); }; + static shared_ptr Module_0_uses_export_and_cannot_be_used_with_export_Asterisk(){ return diag(2498, DiagnosticCategory::Error, "Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498", "Module '{0}' uses 'export =' and cannot be used with 'export *'."); }; + static shared_ptr An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments(){ return diag(2499, DiagnosticCategory::Error, "An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499", "An interface can only extend an identifier/qualified-name with optional type arguments."); }; + static shared_ptr A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments(){ return diag(2500, DiagnosticCategory::Error, "A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500", "A class can only implement an identifier/qualified-name with optional type arguments."); }; + static shared_ptr A_rest_element_cannot_contain_a_binding_pattern(){ return diag(2501, DiagnosticCategory::Error, "A_rest_element_cannot_contain_a_binding_pattern_2501", "A rest element cannot contain a binding pattern."); }; + static shared_ptr _0_is_referenced_directly_or_indirectly_in_its_own_type_annotation(){ return diag(2502, DiagnosticCategory::Error, "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502", "'{0}' is referenced directly or indirectly in its own type annotation."); }; + static shared_ptr Cannot_find_namespace_0(){ return diag(2503, DiagnosticCategory::Error, "Cannot_find_namespace_0_2503", "Cannot find namespace '{0}'."); }; + static shared_ptr Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator(){ return diag(2504, DiagnosticCategory::Error, "Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504", "Type '{0}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator."); }; + static shared_ptr A_generator_cannot_have_a_void_type_annotation(){ return diag(2505, DiagnosticCategory::Error, "A_generator_cannot_have_a_void_type_annotation_2505", "A generator cannot have a 'void' type annotation."); }; + static shared_ptr _0_is_referenced_directly_or_indirectly_in_its_own_base_expression(){ return diag(2506, DiagnosticCategory::Error, "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506", "'{0}' is referenced directly or indirectly in its own base expression."); }; + static shared_ptr Type_0_is_not_a_constructor_function_type(){ return diag(2507, DiagnosticCategory::Error, "Type_0_is_not_a_constructor_function_type_2507", "Type '{0}' is not a constructor function type."); }; + static shared_ptr No_base_constructor_has_the_specified_number_of_type_arguments(){ return diag(2508, DiagnosticCategory::Error, "No_base_constructor_has_the_specified_number_of_type_arguments_2508", "No base constructor has the specified number of type arguments."); }; + static shared_ptr Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members(){ return diag(2509, DiagnosticCategory::Error, "Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509", "Base constructor return type '{0}' is not an object type or intersection of object types with statically known members."); }; + static shared_ptr Base_constructors_must_all_have_the_same_return_type(){ return diag(2510, DiagnosticCategory::Error, "Base_constructors_must_all_have_the_same_return_type_2510", "Base constructors must all have the same return type."); }; + static shared_ptr Cannot_create_an_instance_of_an_abstract_class(){ return diag(2511, DiagnosticCategory::Error, "Cannot_create_an_instance_of_an_abstract_class_2511", "Cannot create an instance of an abstract class."); }; + static shared_ptr Overload_signatures_must_all_be_abstract_or_non_abstract(){ return diag(2512, DiagnosticCategory::Error, "Overload_signatures_must_all_be_abstract_or_non_abstract_2512", "Overload signatures must all be abstract or non-abstract."); }; + static shared_ptr Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression(){ return diag(2513, DiagnosticCategory::Error, "Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513", "Abstract method '{0}' in class '{1}' cannot be accessed via super expression."); }; + static shared_ptr Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2(){ return diag(2515, DiagnosticCategory::Error, "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515", "Non-abstract class '{0}' does not implement inherited abstract member '{1}' from class '{2}'."); }; + static shared_ptr All_declarations_of_an_abstract_method_must_be_consecutive(){ return diag(2516, DiagnosticCategory::Error, "All_declarations_of_an_abstract_method_must_be_consecutive_2516", "All declarations of an abstract method must be consecutive."); }; + static shared_ptr Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type(){ return diag(2517, DiagnosticCategory::Error, "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517", "Cannot assign an abstract constructor type to a non-abstract constructor type."); }; + static shared_ptr A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard(){ return diag(2518, DiagnosticCategory::Error, "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518", "A 'this'-based type guard is not compatible with a parameter-based type guard."); }; + static shared_ptr An_async_iterator_must_have_a_next_method(){ return diag(2519, DiagnosticCategory::Error, "An_async_iterator_must_have_a_next_method_2519", "An async iterator must have a 'next()' method."); }; + static shared_ptr Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions(){ return diag(2520, DiagnosticCategory::Error, "Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520", "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions."); }; + static shared_ptr The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method(){ return diag(2522, DiagnosticCategory::Error, "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522", "The 'arguments' object cannot be referenced in an async function or method in ES3 and ES5. Consider using a standard function or method."); }; + static shared_ptr yield_expressions_cannot_be_used_in_a_parameter_initializer(){ return diag(2523, DiagnosticCategory::Error, "yield_expressions_cannot_be_used_in_a_parameter_initializer_2523", "'yield' expressions cannot be used in a parameter initializer."); }; + static shared_ptr await_expressions_cannot_be_used_in_a_parameter_initializer(){ return diag(2524, DiagnosticCategory::Error, "await_expressions_cannot_be_used_in_a_parameter_initializer_2524", "'await' expressions cannot be used in a parameter initializer."); }; + static shared_ptr Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value(){ return diag(2525, DiagnosticCategory::Error, "Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525", "Initializer provides no value for this binding element and the binding element has no default value."); }; + static shared_ptr A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface(){ return diag(2526, DiagnosticCategory::Error, "A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526", "A 'this' type is available only in a non-static member of a class or interface."); }; + static shared_ptr The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary(){ return diag(2527, DiagnosticCategory::Error, "The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527", "The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary."); }; + static shared_ptr A_module_cannot_have_multiple_default_exports(){ return diag(2528, DiagnosticCategory::Error, "A_module_cannot_have_multiple_default_exports_2528", "A module cannot have multiple default exports."); }; + static shared_ptr Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions(){ return diag(2529, DiagnosticCategory::Error, "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_func_2529", "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions."); }; + static shared_ptr Property_0_is_incompatible_with_index_signature(){ return diag(2530, DiagnosticCategory::Error, "Property_0_is_incompatible_with_index_signature_2530", "Property '{0}' is incompatible with index signature."); }; + static shared_ptr Object_is_possibly_null(){ return diag(2531, DiagnosticCategory::Error, "Object_is_possibly_null_2531", "Object is possibly 'null'."); }; + static shared_ptr Object_is_possibly_undefined(){ return diag(2532, DiagnosticCategory::Error, "Object_is_possibly_undefined_2532", "Object is possibly 'undefined'."); }; + static shared_ptr Object_is_possibly_null_or_undefined(){ return diag(2533, DiagnosticCategory::Error, "Object_is_possibly_null_or_undefined_2533", "Object is possibly 'null' or 'undefined'."); }; + static shared_ptr A_function_returning_never_cannot_have_a_reachable_end_point(){ return diag(2534, DiagnosticCategory::Error, "A_function_returning_never_cannot_have_a_reachable_end_point_2534", "A function returning 'never' cannot have a reachable end point."); }; + static shared_ptr Enum_type_0_has_members_with_initializers_that_are_not_literals(){ return diag(2535, DiagnosticCategory::Error, "Enum_type_0_has_members_with_initializers_that_are_not_literals_2535", "Enum type '{0}' has members with initializers that are not literals."); }; + static shared_ptr Type_0_cannot_be_used_to_index_type_1(){ return diag(2536, DiagnosticCategory::Error, "Type_0_cannot_be_used_to_index_type_1_2536", "Type '{0}' cannot be used to index type '{1}'."); }; + static shared_ptr Type_0_has_no_matching_index_signature_for_type_1(){ return diag(2537, DiagnosticCategory::Error, "Type_0_has_no_matching_index_signature_for_type_1_2537", "Type '{0}' has no matching index signature for type '{1}'."); }; + static shared_ptr Type_0_cannot_be_used_as_an_index_type(){ return diag(2538, DiagnosticCategory::Error, "Type_0_cannot_be_used_as_an_index_type_2538", "Type '{0}' cannot be used as an index type."); }; + static shared_ptr Cannot_assign_to_0_because_it_is_not_a_variable(){ return diag(2539, DiagnosticCategory::Error, "Cannot_assign_to_0_because_it_is_not_a_variable_2539", "Cannot assign to '{0}' because it is not a variable."); }; + static shared_ptr Cannot_assign_to_0_because_it_is_a_read_only_property(){ return diag(2540, DiagnosticCategory::Error, "Cannot_assign_to_0_because_it_is_a_read_only_property_2540", "Cannot assign to '{0}' because it is a read-only property."); }; + static shared_ptr Index_signature_in_type_0_only_permits_reading(){ return diag(2542, DiagnosticCategory::Error, "Index_signature_in_type_0_only_permits_reading_2542", "Index signature in type '{0}' only permits reading."); }; + static shared_ptr Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference(){ return diag(2543, DiagnosticCategory::Error, "Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543", "Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference."); }; + static shared_ptr Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference(){ return diag(2544, DiagnosticCategory::Error, "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544", "Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference."); }; + static shared_ptr A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any(){ return diag(2545, DiagnosticCategory::Error, "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545", "A mixin class must have a constructor with a single rest parameter of type 'any[]'."); }; + static shared_ptr The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property(){ return diag(2547, DiagnosticCategory::Error, "The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547", "The type returned by the '{0}()' method of an async iterator must be a promise for a type with a 'value' property."); }; + static shared_ptr Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator(){ return diag(2548, DiagnosticCategory::Error, "Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548", "Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator."); }; + static shared_ptr Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator(){ return diag(2549, DiagnosticCategory::Error, "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549", "Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator."); }; + static shared_ptr Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2_or_later(){ return diag(2550, DiagnosticCategory::Error, "Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_c_2550", "Property '{0}' does not exist on type '{1}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{2}' or later."); }; + static shared_ptr Property_0_does_not_exist_on_type_1_Did_you_mean_2(){ return diag(2551, DiagnosticCategory::Error, "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551", "Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?"); }; + static shared_ptr Cannot_find_name_0_Did_you_mean_1(){ return diag(2552, DiagnosticCategory::Error, "Cannot_find_name_0_Did_you_mean_1_2552", "Cannot find name '{0}'. Did you mean '{1}'?"); }; + static shared_ptr Computed_values_are_not_permitted_in_an_enum_with_string_valued_members(){ return diag(2553, DiagnosticCategory::Error, "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553", "Computed values are not permitted in an enum with string valued members."); }; + static shared_ptr Expected_0_arguments_but_got_1(){ return diag(2554, DiagnosticCategory::Error, "Expected_0_arguments_but_got_1_2554", "Expected {0} arguments, but got {1}."); }; + static shared_ptr Expected_at_least_0_arguments_but_got_1(){ return diag(2555, DiagnosticCategory::Error, "Expected_at_least_0_arguments_but_got_1_2555", "Expected at least {0} arguments, but got {1}."); }; + static shared_ptr A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter(){ return diag(2556, DiagnosticCategory::Error, "A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter_2556", "A spread argument must either have a tuple type or be passed to a rest parameter."); }; + static shared_ptr Expected_0_type_arguments_but_got_1(){ return diag(2558, DiagnosticCategory::Error, "Expected_0_type_arguments_but_got_1_2558", "Expected {0} type arguments, but got {1}."); }; + static shared_ptr Type_0_has_no_properties_in_common_with_type_1(){ return diag(2559, DiagnosticCategory::Error, "Type_0_has_no_properties_in_common_with_type_1_2559", "Type '{0}' has no properties in common with type '{1}'."); }; + static shared_ptr Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it(){ return diag(2560, DiagnosticCategory::Error, "Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560", "Value of type '{0}' has no properties in common with type '{1}'. Did you mean to call it?"); }; + static shared_ptr Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2(){ return diag(2561, DiagnosticCategory::Error, "Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_writ_2561", "Object literal may only specify known properties, but '{0}' does not exist in type '{1}'. Did you mean to write '{2}'?"); }; + static shared_ptr Base_class_expressions_cannot_reference_class_type_parameters(){ return diag(2562, DiagnosticCategory::Error, "Base_class_expressions_cannot_reference_class_type_parameters_2562", "Base class expressions cannot reference class type parameters."); }; + static shared_ptr The_containing_function_or_module_body_is_too_large_for_control_flow_analysis(){ return diag(2563, DiagnosticCategory::Error, "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563", "The containing function or module body is too large for control flow analysis."); }; + static shared_ptr Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor(){ return diag(2564, DiagnosticCategory::Error, "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564", "Property '{0}' has no initializer and is not definitely assigned in the constructor."); }; + static shared_ptr Property_0_is_used_before_being_assigned(){ return diag(2565, DiagnosticCategory::Error, "Property_0_is_used_before_being_assigned_2565", "Property '{0}' is used before being assigned."); }; + static shared_ptr A_rest_element_cannot_have_a_property_name(){ return diag(2566, DiagnosticCategory::Error, "A_rest_element_cannot_have_a_property_name_2566", "A rest element cannot have a property name."); }; + static shared_ptr Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations(){ return diag(2567, DiagnosticCategory::Error, "Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567", "Enum declarations can only merge with namespace or other enum declarations."); }; + static shared_ptr Property_0_may_not_exist_on_type_1_Did_you_mean_2(){ return diag(2568, DiagnosticCategory::Error, "Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568", "Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?"); }; + static shared_ptr Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators(){ return diag(2569, DiagnosticCategory::Error, "Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterati_2569", "Type '{0}' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators."); }; + static shared_ptr Could_not_find_name_0_Did_you_mean_1(){ return diag(2570, DiagnosticCategory::Error, "Could_not_find_name_0_Did_you_mean_1_2570", "Could not find name '{0}'. Did you mean '{1}'?"); }; + static shared_ptr Object_is_of_type_unknown(){ return diag(2571, DiagnosticCategory::Error, "Object_is_of_type_unknown_2571", "Object is of type 'unknown'."); }; + static shared_ptr A_rest_element_type_must_be_an_array_type(){ return diag(2574, DiagnosticCategory::Error, "A_rest_element_type_must_be_an_array_type_2574", "A rest element type must be an array type."); }; + static shared_ptr No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments(){ return diag(2575, DiagnosticCategory::Error, "No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575", "No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments."); }; + static shared_ptr Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead(){ return diag(2576, DiagnosticCategory::Error, "Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead_2576", "Property '{0}' does not exist on type '{1}'. Did you mean to access the static member '{2}' instead?"); }; + static shared_ptr Return_type_annotation_circularly_references_itself(){ return diag(2577, DiagnosticCategory::Error, "Return_type_annotation_circularly_references_itself_2577", "Return type annotation circularly references itself."); }; + static shared_ptr Unused_ts_expect_error_directive(){ return diag(2578, DiagnosticCategory::Error, "Unused_ts_expect_error_directive_2578", "Unused '@ts-expect-error' directive."); }; + static shared_ptr Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode(){ return diag(2580, DiagnosticCategory::Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2580", "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`."); }; + static shared_ptr Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery(){ return diag(2581, DiagnosticCategory::Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2581", "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`."); }; + static shared_ptr Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha(){ return diag(2582, DiagnosticCategory::Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2582", "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`."); }; + static shared_ptr Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later(){ return diag(2583, DiagnosticCategory::Error, "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583", "Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later."); }; + static shared_ptr Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom(){ return diag(2584, DiagnosticCategory::Error, "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584", "Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'."); }; + static shared_ptr _0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later(){ return diag(2585, DiagnosticCategory::Error, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585", "'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later."); }; - static shared Cannot_assign_to_0_because_it_is_a_constant(){ return diag(2588, DiagnosticCategory::Error, "Cannot_assign_to_0_because_it_is_a_constant_2588", "Cannot assign to '{0}' because it is a constant."); }; - static shared Type_instantiation_is_excessively_deep_and_possibly_infinite(){ return diag(2589, DiagnosticCategory::Error, "Type_instantiation_is_excessively_deep_and_possibly_infinite_2589", "Type instantiation is excessively deep and possibly infinite."); }; - static shared Expression_produces_a_union_type_that_is_too_complex_to_represent(){ return diag(2590, DiagnosticCategory::Error, "Expression_produces_a_union_type_that_is_too_complex_to_represent_2590", "Expression produces a union type that is too complex to represent."); }; - static shared Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig(){ return diag(2591, DiagnosticCategory::Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2591", + static shared_ptr Cannot_assign_to_0_because_it_is_a_constant(){ return diag(2588, DiagnosticCategory::Error, "Cannot_assign_to_0_because_it_is_a_constant_2588", "Cannot assign to '{0}' because it is a constant."); }; + static shared_ptr Type_instantiation_is_excessively_deep_and_possibly_infinite(){ return diag(2589, DiagnosticCategory::Error, "Type_instantiation_is_excessively_deep_and_possibly_infinite_2589", "Type instantiation is excessively deep and possibly infinite."); }; + static shared_ptr Expression_produces_a_union_type_that_is_too_complex_to_represent(){ return diag(2590, DiagnosticCategory::Error, "Expression_produces_a_union_type_that_is_too_complex_to_represent_2590", "Expression produces a union type that is too complex to represent."); }; + static shared_ptr Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig(){ return diag(2591, DiagnosticCategory::Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2591", "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig."); }; - static shared Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig(){ return diag(2592, DiagnosticCategory::Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2592", + static shared_ptr Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig(){ return diag(2592, DiagnosticCategory::Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2592", "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig."); }; - static shared Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig(){ return diag(2593, DiagnosticCategory::Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2593", + static shared_ptr Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig(){ return diag(2593, DiagnosticCategory::Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2593", "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig."); }; - static shared This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag(){ return diag(2594, DiagnosticCategory::Error, "This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the__2594", "This module is declared with using 'export =', and can only be used with a default import when using the '{0}' flag."); }; - static shared _0_can_only_be_imported_by_using_a_default_import(){ return diag(2595, DiagnosticCategory::Error, "_0_can_only_be_imported_by_using_a_default_import_2595", "'{0}' can only be imported by using a default import."); }; - static shared _0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import(){ return diag(2596, DiagnosticCategory::Error, "_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import_2596", "'{0}' can only be imported by turning on the 'esModuleInterop' flag and using a default import."); }; - static shared _0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import(){ return diag(2597, DiagnosticCategory::Error, "_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import_2597", "'{0}' can only be imported by using a 'require' call or by using a default import."); }; - static shared _0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import(){ return diag(2598, DiagnosticCategory::Error, "_0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using__2598", "'{0}' can only be imported by using a 'require' call or by turning on the 'esModuleInterop' flag and using a default import."); }; - static shared JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist(){ return diag(2602, DiagnosticCategory::Error, "JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602", "JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist."); }; - static shared Property_0_in_type_1_is_not_assignable_to_type_2(){ return diag(2603, DiagnosticCategory::Error, "Property_0_in_type_1_is_not_assignable_to_type_2_2603", "Property '{0}' in type '{1}' is not assignable to type '{2}'."); }; - static shared JSX_element_type_0_does_not_have_any_construct_or_call_signatures(){ return diag(2604, DiagnosticCategory::Error, "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604", "JSX element type '{0}' does not have any construct or call signatures."); }; - static shared Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property(){ return diag(2606, DiagnosticCategory::Error, "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606", "Property '{0}' of JSX spread attribute is not assignable to target property."); }; - static shared JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property(){ return diag(2607, DiagnosticCategory::Error, "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", "JSX element class does not support attributes because it does not have a '{0}' property."); }; - static shared The_global_type_JSX_0_may_not_have_more_than_one_property(){ return diag(2608, DiagnosticCategory::Error, "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", "The global type 'JSX.{0}' may not have more than one property."); }; - static shared JSX_spread_child_must_be_an_array_type(){ return diag(2609, DiagnosticCategory::Error, "JSX_spread_child_must_be_an_array_type_2609", "JSX spread child must be an array type."); }; - static shared _0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property(){ return diag(2610, DiagnosticCategory::Error, "_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610", "'{0}' is defined as an accessor in class '{1}', but is overridden here in '{2}' as an instance property."); }; - static shared _0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor(){ return diag(2611, DiagnosticCategory::Error, "_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611", "'{0}' is defined as a property in class '{1}', but is overridden here in '{2}' as an accessor."); }; - static shared Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration(){ return diag(2612, DiagnosticCategory::Error, "Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612", + static shared_ptr This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag(){ return diag(2594, DiagnosticCategory::Error, "This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the__2594", "This module is declared with using 'export =', and can only be used with a default import when using the '{0}' flag."); }; + static shared_ptr _0_can_only_be_imported_by_using_a_default_import(){ return diag(2595, DiagnosticCategory::Error, "_0_can_only_be_imported_by_using_a_default_import_2595", "'{0}' can only be imported by using a default import."); }; + static shared_ptr _0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import(){ return diag(2596, DiagnosticCategory::Error, "_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import_2596", "'{0}' can only be imported by turning on the 'esModuleInterop' flag and using a default import."); }; + static shared_ptr _0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import(){ return diag(2597, DiagnosticCategory::Error, "_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import_2597", "'{0}' can only be imported by using a 'require' call or by using a default import."); }; + static shared_ptr _0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import(){ return diag(2598, DiagnosticCategory::Error, "_0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using__2598", "'{0}' can only be imported by using a 'require' call or by turning on the 'esModuleInterop' flag and using a default import."); }; + static shared_ptr JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist(){ return diag(2602, DiagnosticCategory::Error, "JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602", "JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist."); }; + static shared_ptr Property_0_in_type_1_is_not_assignable_to_type_2(){ return diag(2603, DiagnosticCategory::Error, "Property_0_in_type_1_is_not_assignable_to_type_2_2603", "Property '{0}' in type '{1}' is not assignable to type '{2}'."); }; + static shared_ptr JSX_element_type_0_does_not_have_any_construct_or_call_signatures(){ return diag(2604, DiagnosticCategory::Error, "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604", "JSX element type '{0}' does not have any construct or call signatures."); }; + static shared_ptr Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property(){ return diag(2606, DiagnosticCategory::Error, "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606", "Property '{0}' of JSX spread attribute is not assignable to target property."); }; + static shared_ptr JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property(){ return diag(2607, DiagnosticCategory::Error, "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", "JSX element class does not support attributes because it does not have a '{0}' property."); }; + static shared_ptr The_global_type_JSX_0_may_not_have_more_than_one_property(){ return diag(2608, DiagnosticCategory::Error, "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", "The global type 'JSX.{0}' may not have more than one property."); }; + static shared_ptr JSX_spread_child_must_be_an_array_type(){ return diag(2609, DiagnosticCategory::Error, "JSX_spread_child_must_be_an_array_type_2609", "JSX spread child must be an array type."); }; + static shared_ptr _0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property(){ return diag(2610, DiagnosticCategory::Error, "_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610", "'{0}' is defined as an accessor in class '{1}', but is overridden here in '{2}' as an instance property."); }; + static shared_ptr _0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor(){ return diag(2611, DiagnosticCategory::Error, "_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611", "'{0}' is defined as a property in class '{1}', but is overridden here in '{2}' as an accessor."); }; + static shared_ptr Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration(){ return diag(2612, DiagnosticCategory::Error, "Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612", "Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration."); }; - static shared Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead(){ return diag(2613, DiagnosticCategory::Error, "Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613", "Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?"); }; - static shared Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead(){ return diag(2614, DiagnosticCategory::Error, "Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614", "Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?"); }; - static shared Type_of_property_0_circularly_references_itself_in_mapped_type_1(){ return diag(2615, DiagnosticCategory::Error, "Type_of_property_0_circularly_references_itself_in_mapped_type_1_2615", "Type of property '{0}' circularly references itself in mapped type '{1}'."); }; - static shared _0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import(){ return diag(2616, DiagnosticCategory::Error, "_0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import_2616", "'{0}' can only be imported by using 'import {1} = require({2})' or a default import."); }; - static shared _0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import(){ return diag(2617, DiagnosticCategory::Error, "_0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_us_2617", "'{0}' can only be imported by using 'import {1} = require({2})' or by turning on the 'esModuleInterop' flag and using a default import."); }; - static shared Source_has_0_element_s_but_target_requires_1(){ return diag(2618, DiagnosticCategory::Error, "Source_has_0_element_s_but_target_requires_1_2618", "Source has {0} element(s) but target requires {1}."); }; - static shared Source_has_0_element_s_but_target_allows_only_1(){ return diag(2619, DiagnosticCategory::Error, "Source_has_0_element_s_but_target_allows_only_1_2619", "Source has {0} element(s) but target allows only {1}."); }; - static shared Target_requires_0_element_s_but_source_may_have_fewer(){ return diag(2620, DiagnosticCategory::Error, "Target_requires_0_element_s_but_source_may_have_fewer_2620", "Target requires {0} element(s) but source may have fewer."); }; - static shared Target_allows_only_0_element_s_but_source_may_have_more(){ return diag(2621, DiagnosticCategory::Error, "Target_allows_only_0_element_s_but_source_may_have_more_2621", "Target allows only {0} element(s) but source may have more."); }; - static shared Source_provides_no_match_for_required_element_at_position_0_in_target(){ return diag(2623, DiagnosticCategory::Error, "Source_provides_no_match_for_required_element_at_position_0_in_target_2623", "Source provides no match for required element at position {0} in target."); }; - static shared Source_provides_no_match_for_variadic_element_at_position_0_in_target(){ return diag(2624, DiagnosticCategory::Error, "Source_provides_no_match_for_variadic_element_at_position_0_in_target_2624", "Source provides no match for variadic element at position {0} in target."); }; - static shared Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target(){ return diag(2625, DiagnosticCategory::Error, "Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target_2625", "Variadic element at position {0} in source does not match element at position {1} in target."); }; - static shared Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target(){ return diag(2626, DiagnosticCategory::Error, "Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target_2626", "Type at position {0} in source is not compatible with type at position {1} in target."); }; - static shared Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target(){ return diag(2627, DiagnosticCategory::Error, "Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target_2627", "Type at positions {0} through {1} in source is not compatible with type at position {2} in target."); }; - static shared Cannot_assign_to_0_because_it_is_an_enum(){ return diag(2628, DiagnosticCategory::Error, "Cannot_assign_to_0_because_it_is_an_enum_2628", "Cannot assign to '{0}' because it is an enum."); }; - static shared Cannot_assign_to_0_because_it_is_a_class(){ return diag(2629, DiagnosticCategory::Error, "Cannot_assign_to_0_because_it_is_a_class_2629", "Cannot assign to '{0}' because it is a class."); }; - static shared Cannot_assign_to_0_because_it_is_a_function(){ return diag(2630, DiagnosticCategory::Error, "Cannot_assign_to_0_because_it_is_a_function_2630", "Cannot assign to '{0}' because it is a function."); }; - static shared Cannot_assign_to_0_because_it_is_a_namespace(){ return diag(2631, DiagnosticCategory::Error, "Cannot_assign_to_0_because_it_is_a_namespace_2631", "Cannot assign to '{0}' because it is a namespace."); }; - static shared Cannot_assign_to_0_because_it_is_an_import(){ return diag(2632, DiagnosticCategory::Error, "Cannot_assign_to_0_because_it_is_an_import_2632", "Cannot assign to '{0}' because it is an import."); }; - static shared JSX_property_access_expressions_cannot_include_JSX_namespace_names(){ return diag(2633, DiagnosticCategory::Error, "JSX_property_access_expressions_cannot_include_JSX_namespace_names_2633", "JSX property access expressions cannot include JSX namespace names"); }; - static shared _0_index_signatures_are_incompatible(){ return diag(2634, DiagnosticCategory::Error, "_0_index_signatures_are_incompatible_2634", "'{0}' index signatures are incompatible."); }; - static shared Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity(){ return diag(2649, DiagnosticCategory::Error, "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649", "Cannot augment module '{0}' with value exports because it resolves to a non-module entity."); }; - static shared A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums(){ return diag(2651, DiagnosticCategory::Error, "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651", "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."); }; - static shared Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead(){ return diag(2652, DiagnosticCategory::Error, "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652", "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."); }; - static shared Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1(){ return diag(2653, DiagnosticCategory::Error, "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653", "Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'."); }; - static shared JSX_expressions_must_have_one_parent_element(){ return diag(2657, DiagnosticCategory::Error, "JSX_expressions_must_have_one_parent_element_2657", "JSX expressions must have one parent element."); }; - static shared Type_0_provides_no_match_for_the_signature_1(){ return diag(2658, DiagnosticCategory::Error, "Type_0_provides_no_match_for_the_signature_1_2658", "Type '{0}' provides no match for the signature '{1}'."); }; - static shared super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher(){ return diag(2659, DiagnosticCategory::Error, "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659", "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher."); }; - static shared super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions(){ return diag(2660, DiagnosticCategory::Error, "super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660", "'super' can only be referenced in members of derived classes or object literal expressions."); }; - static shared Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module(){ return diag(2661, DiagnosticCategory::Error, "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661", "Cannot export '{0}'. Only local declarations can be exported from a module."); }; - static shared Cannot_find_name_0_Did_you_mean_the_static_member_1_0(){ return diag(2662, DiagnosticCategory::Error, "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662", "Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?"); }; - static shared Cannot_find_name_0_Did_you_mean_the_instance_member_this_0(){ return diag(2663, DiagnosticCategory::Error, "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663", "Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?"); }; - static shared Invalid_module_name_in_augmentation_module_0_cannot_be_found(){ return diag(2664, DiagnosticCategory::Error, "Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664", "Invalid module name in augmentation, module '{0}' cannot be found."); }; - static shared Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented(){ return diag(2665, DiagnosticCategory::Error, "Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augm_2665", "Invalid module name in augmentation. Module '{0}' resolves to an untyped module at '{1}', which cannot be augmented."); }; - static shared Exports_and_export_assignments_are_not_permitted_in_module_augmentations(){ return diag(2666, DiagnosticCategory::Error, "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666", "Exports and export assignments are not permitted in module augmentations."); }; - static shared Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module(){ return diag(2667, DiagnosticCategory::Error, "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667", "Imports are not permitted in module augmentations. Consider moving them to the enclosing external module."); }; - static shared export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible(){ return diag(2668, DiagnosticCategory::Error, "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668", "'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible."); }; - static shared Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations(){ return diag(2669, DiagnosticCategory::Error, "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669", "Augmentations for the global scope can only be directly nested in external modules or ambient module declarations."); }; - static shared Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context(){ return diag(2670, DiagnosticCategory::Error, "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670", "Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context."); }; - static shared Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity(){ return diag(2671, DiagnosticCategory::Error, "Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671", "Cannot augment module '{0}' because it resolves to a non-module entity."); }; - static shared Cannot_assign_a_0_constructor_type_to_a_1_constructor_type(){ return diag(2672, DiagnosticCategory::Error, "Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672", "Cannot assign a '{0}' constructor type to a '{1}' constructor type."); }; - static shared Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration(){ return diag(2673, DiagnosticCategory::Error, "Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673", "Constructor of class '{0}' is private and only accessible within the class declaration."); }; - static shared Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration(){ return diag(2674, DiagnosticCategory::Error, "Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674", "Constructor of class '{0}' is protected and only accessible within the class declaration."); }; - static shared Cannot_extend_a_class_0_Class_constructor_is_marked_as_private(){ return diag(2675, DiagnosticCategory::Error, "Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675", "Cannot extend a class '{0}'. Class constructor is marked as private."); }; - static shared Accessors_must_both_be_abstract_or_non_abstract(){ return diag(2676, DiagnosticCategory::Error, "Accessors_must_both_be_abstract_or_non_abstract_2676", "Accessors must both be abstract or non-abstract."); }; - static shared A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type(){ return diag(2677, DiagnosticCategory::Error, "A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type_2677", "A type predicate's type must be assignable to its parameter's type."); }; - static shared Type_0_is_not_comparable_to_type_1(){ return diag(2678, DiagnosticCategory::Error, "Type_0_is_not_comparable_to_type_1_2678", "Type '{0}' is not comparable to type '{1}'."); }; - static shared A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void(){ return diag(2679, DiagnosticCategory::Error, "A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void_2679", "A function that is called with the 'new' keyword cannot have a 'this' type that is 'void'."); }; - static shared A_0_parameter_must_be_the_first_parameter(){ return diag(2680, DiagnosticCategory::Error, "A_0_parameter_must_be_the_first_parameter_2680", "A '{0}' parameter must be the first parameter."); }; - static shared A_constructor_cannot_have_a_this_parameter(){ return diag(2681, DiagnosticCategory::Error, "A_constructor_cannot_have_a_this_parameter_2681", "A constructor cannot have a 'this' parameter."); }; - static shared this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation(){ return diag(2683, DiagnosticCategory::Error, "this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683", "'this' implicitly has type 'any' because it does not have a type annotation."); }; - static shared The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1(){ return diag(2684, DiagnosticCategory::Error, "The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684", "The 'this' context of type '{0}' is not assignable to method's 'this' of type '{1}'."); }; - static shared The_this_types_of_each_signature_are_incompatible(){ return diag(2685, DiagnosticCategory::Error, "The_this_types_of_each_signature_are_incompatible_2685", "The 'this' types of each signature are incompatible."); }; - static shared _0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead(){ return diag(2686, DiagnosticCategory::Error, "_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686", "'{0}' refers to a UMD global, but the current file is a module. Consider adding an import instead."); }; - static shared All_declarations_of_0_must_have_identical_modifiers(){ return diag(2687, DiagnosticCategory::Error, "All_declarations_of_0_must_have_identical_modifiers_2687", "All declarations of '{0}' must have identical modifiers."); }; - static shared Cannot_find_type_definition_file_for_0(){ return diag(2688, DiagnosticCategory::Error, "Cannot_find_type_definition_file_for_0_2688", "Cannot find type definition file for '{0}'."); }; - static shared Cannot_extend_an_interface_0_Did_you_mean_implements(){ return diag(2689, DiagnosticCategory::Error, "Cannot_extend_an_interface_0_Did_you_mean_implements_2689", "Cannot extend an interface '{0}'. Did you mean 'implements'?"); }; - static shared _0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0(){ return diag(2690, DiagnosticCategory::Error, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0_2690", "'{0}' only refers to a type, but is being used as a value here. Did you mean to use '{1} in {0}'?"); }; - static shared An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead(){ return diag(2691, DiagnosticCategory::Error, "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691", "An import path cannot end with a '{0}' extension. Consider importing '{1}' instead."); }; - static shared _0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible(){ return diag(2692, DiagnosticCategory::Error, "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692", "'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible."); }; - static shared _0_only_refers_to_a_type_but_is_being_used_as_a_value_here(){ return diag(2693, DiagnosticCategory::Error, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693", "'{0}' only refers to a type, but is being used as a value here."); }; - static shared Namespace_0_has_no_exported_member_1(){ return diag(2694, DiagnosticCategory::Error, "Namespace_0_has_no_exported_member_1_2694", "Namespace '{0}' has no exported member '{1}'."); }; - static shared Left_side_of_comma_operator_is_unused_and_has_no_side_effects(){ return diag(2695, DiagnosticCategory::Error, "Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695", "Left side of comma operator is unused and has no side effects.", /*reportsUnnecessary*/ true); }; - static shared The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead(){ return diag(2696, DiagnosticCategory::Error, "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696", "The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?"); }; - static shared An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option(){ return diag(2697, DiagnosticCategory::Error, "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697", "An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."); }; - static shared Spread_types_may_only_be_created_from_object_types(){ return diag(2698, DiagnosticCategory::Error, "Spread_types_may_only_be_created_from_object_types_2698", "Spread types may only be created from object types."); }; - static shared Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1(){ return diag(2699, DiagnosticCategory::Error, "Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699", "Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'."); }; - static shared Rest_types_may_only_be_created_from_object_types(){ return diag(2700, DiagnosticCategory::Error, "Rest_types_may_only_be_created_from_object_types_2700", "Rest types may only be created from object types."); }; - static shared The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access(){ return diag(2701, DiagnosticCategory::Error, "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701", "The target of an object rest assignment must be a variable or a property access."); }; - static shared _0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here(){ return diag(2702, DiagnosticCategory::Error, "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702", "'{0}' only refers to a type, but is being used as a namespace here."); }; - static shared The_operand_of_a_delete_operator_must_be_a_property_reference(){ return diag(2703, DiagnosticCategory::Error, "The_operand_of_a_delete_operator_must_be_a_property_reference_2703", "The operand of a 'delete' operator must be a property reference."); }; - static shared The_operand_of_a_delete_operator_cannot_be_a_read_only_property(){ return diag(2704, DiagnosticCategory::Error, "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704", "The operand of a 'delete' operator cannot be a read-only property."); }; - static shared 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(){ return diag(2705, DiagnosticCategory::Error, "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705", + static shared_ptr Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead(){ return diag(2613, DiagnosticCategory::Error, "Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613", "Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?"); }; + static shared_ptr Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead(){ return diag(2614, DiagnosticCategory::Error, "Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614", "Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?"); }; + static shared_ptr Type_of_property_0_circularly_references_itself_in_mapped_type_1(){ return diag(2615, DiagnosticCategory::Error, "Type_of_property_0_circularly_references_itself_in_mapped_type_1_2615", "Type of property '{0}' circularly references itself in mapped type '{1}'."); }; + static shared_ptr _0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import(){ return diag(2616, DiagnosticCategory::Error, "_0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import_2616", "'{0}' can only be imported by using 'import {1} = require({2})' or a default import."); }; + static shared_ptr _0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import(){ return diag(2617, DiagnosticCategory::Error, "_0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_us_2617", "'{0}' can only be imported by using 'import {1} = require({2})' or by turning on the 'esModuleInterop' flag and using a default import."); }; + static shared_ptr Source_has_0_element_s_but_target_requires_1(){ return diag(2618, DiagnosticCategory::Error, "Source_has_0_element_s_but_target_requires_1_2618", "Source has {0} element(s) but target requires {1}."); }; + static shared_ptr Source_has_0_element_s_but_target_allows_only_1(){ return diag(2619, DiagnosticCategory::Error, "Source_has_0_element_s_but_target_allows_only_1_2619", "Source has {0} element(s) but target allows only {1}."); }; + static shared_ptr Target_requires_0_element_s_but_source_may_have_fewer(){ return diag(2620, DiagnosticCategory::Error, "Target_requires_0_element_s_but_source_may_have_fewer_2620", "Target requires {0} element(s) but source may have fewer."); }; + static shared_ptr Target_allows_only_0_element_s_but_source_may_have_more(){ return diag(2621, DiagnosticCategory::Error, "Target_allows_only_0_element_s_but_source_may_have_more_2621", "Target allows only {0} element(s) but source may have more."); }; + static shared_ptr Source_provides_no_match_for_required_element_at_position_0_in_target(){ return diag(2623, DiagnosticCategory::Error, "Source_provides_no_match_for_required_element_at_position_0_in_target_2623", "Source provides no match for required element at position {0} in target."); }; + static shared_ptr Source_provides_no_match_for_variadic_element_at_position_0_in_target(){ return diag(2624, DiagnosticCategory::Error, "Source_provides_no_match_for_variadic_element_at_position_0_in_target_2624", "Source provides no match for variadic element at position {0} in target."); }; + static shared_ptr Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target(){ return diag(2625, DiagnosticCategory::Error, "Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target_2625", "Variadic element at position {0} in source does not match element at position {1} in target."); }; + static shared_ptr Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target(){ return diag(2626, DiagnosticCategory::Error, "Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target_2626", "Type at position {0} in source is not compatible with type at position {1} in target."); }; + static shared_ptr Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target(){ return diag(2627, DiagnosticCategory::Error, "Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target_2627", "Type at positions {0} through {1} in source is not compatible with type at position {2} in target."); }; + static shared_ptr Cannot_assign_to_0_because_it_is_an_enum(){ return diag(2628, DiagnosticCategory::Error, "Cannot_assign_to_0_because_it_is_an_enum_2628", "Cannot assign to '{0}' because it is an enum."); }; + static shared_ptr Cannot_assign_to_0_because_it_is_a_class(){ return diag(2629, DiagnosticCategory::Error, "Cannot_assign_to_0_because_it_is_a_class_2629", "Cannot assign to '{0}' because it is a class."); }; + static shared_ptr Cannot_assign_to_0_because_it_is_a_function(){ return diag(2630, DiagnosticCategory::Error, "Cannot_assign_to_0_because_it_is_a_function_2630", "Cannot assign to '{0}' because it is a function."); }; + static shared_ptr Cannot_assign_to_0_because_it_is_a_namespace(){ return diag(2631, DiagnosticCategory::Error, "Cannot_assign_to_0_because_it_is_a_namespace_2631", "Cannot assign to '{0}' because it is a namespace."); }; + static shared_ptr Cannot_assign_to_0_because_it_is_an_import(){ return diag(2632, DiagnosticCategory::Error, "Cannot_assign_to_0_because_it_is_an_import_2632", "Cannot assign to '{0}' because it is an import."); }; + static shared_ptr JSX_property_access_expressions_cannot_include_JSX_namespace_names(){ return diag(2633, DiagnosticCategory::Error, "JSX_property_access_expressions_cannot_include_JSX_namespace_names_2633", "JSX property access expressions cannot include JSX namespace names"); }; + static shared_ptr _0_index_signatures_are_incompatible(){ return diag(2634, DiagnosticCategory::Error, "_0_index_signatures_are_incompatible_2634", "'{0}' index signatures are incompatible."); }; + static shared_ptr Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity(){ return diag(2649, DiagnosticCategory::Error, "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649", "Cannot augment module '{0}' with value exports because it resolves to a non-module entity."); }; + static shared_ptr A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums(){ return diag(2651, DiagnosticCategory::Error, "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651", "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."); }; + static shared_ptr Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead(){ return diag(2652, DiagnosticCategory::Error, "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652", "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."); }; + static shared_ptr Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1(){ return diag(2653, DiagnosticCategory::Error, "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653", "Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'."); }; + static shared_ptr JSX_expressions_must_have_one_parent_element(){ return diag(2657, DiagnosticCategory::Error, "JSX_expressions_must_have_one_parent_element_2657", "JSX expressions must have one parent element."); }; + static shared_ptr Type_0_provides_no_match_for_the_signature_1(){ return diag(2658, DiagnosticCategory::Error, "Type_0_provides_no_match_for_the_signature_1_2658", "Type '{0}' provides no match for the signature '{1}'."); }; + static shared_ptr super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher(){ return diag(2659, DiagnosticCategory::Error, "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659", "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher."); }; + static shared_ptr super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions(){ return diag(2660, DiagnosticCategory::Error, "super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660", "'super' can only be referenced in members of derived classes or object literal expressions."); }; + static shared_ptr Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module(){ return diag(2661, DiagnosticCategory::Error, "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661", "Cannot export '{0}'. Only local declarations can be exported from a module."); }; + static shared_ptr Cannot_find_name_0_Did_you_mean_the_static_member_1_0(){ return diag(2662, DiagnosticCategory::Error, "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662", "Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?"); }; + static shared_ptr Cannot_find_name_0_Did_you_mean_the_instance_member_this_0(){ return diag(2663, DiagnosticCategory::Error, "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663", "Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?"); }; + static shared_ptr Invalid_module_name_in_augmentation_module_0_cannot_be_found(){ return diag(2664, DiagnosticCategory::Error, "Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664", "Invalid module name in augmentation, module '{0}' cannot be found."); }; + static shared_ptr Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented(){ return diag(2665, DiagnosticCategory::Error, "Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augm_2665", "Invalid module name in augmentation. Module '{0}' resolves to an untyped module at '{1}', which cannot be augmented."); }; + static shared_ptr Exports_and_export_assignments_are_not_permitted_in_module_augmentations(){ return diag(2666, DiagnosticCategory::Error, "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666", "Exports and export assignments are not permitted in module augmentations."); }; + static shared_ptr Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module(){ return diag(2667, DiagnosticCategory::Error, "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667", "Imports are not permitted in module augmentations. Consider moving them to the enclosing external module."); }; + static shared_ptr export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible(){ return diag(2668, DiagnosticCategory::Error, "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668", "'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible."); }; + static shared_ptr Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations(){ return diag(2669, DiagnosticCategory::Error, "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669", "Augmentations for the global scope can only be directly nested in external modules or ambient module declarations."); }; + static shared_ptr Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context(){ return diag(2670, DiagnosticCategory::Error, "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670", "Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context."); }; + static shared_ptr Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity(){ return diag(2671, DiagnosticCategory::Error, "Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671", "Cannot augment module '{0}' because it resolves to a non-module entity."); }; + static shared_ptr Cannot_assign_a_0_constructor_type_to_a_1_constructor_type(){ return diag(2672, DiagnosticCategory::Error, "Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672", "Cannot assign a '{0}' constructor type to a '{1}' constructor type."); }; + static shared_ptr Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration(){ return diag(2673, DiagnosticCategory::Error, "Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673", "Constructor of class '{0}' is private and only accessible within the class declaration."); }; + static shared_ptr Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration(){ return diag(2674, DiagnosticCategory::Error, "Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674", "Constructor of class '{0}' is protected and only accessible within the class declaration."); }; + static shared_ptr Cannot_extend_a_class_0_Class_constructor_is_marked_as_private(){ return diag(2675, DiagnosticCategory::Error, "Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675", "Cannot extend a class '{0}'. Class constructor is marked as private."); }; + static shared_ptr Accessors_must_both_be_abstract_or_non_abstract(){ return diag(2676, DiagnosticCategory::Error, "Accessors_must_both_be_abstract_or_non_abstract_2676", "Accessors must both be abstract or non-abstract."); }; + static shared_ptr A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type(){ return diag(2677, DiagnosticCategory::Error, "A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type_2677", "A type predicate's type must be assignable to its parameter's type."); }; + static shared_ptr Type_0_is_not_comparable_to_type_1(){ return diag(2678, DiagnosticCategory::Error, "Type_0_is_not_comparable_to_type_1_2678", "Type '{0}' is not comparable to type '{1}'."); }; + static shared_ptr A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void(){ return diag(2679, DiagnosticCategory::Error, "A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void_2679", "A function that is called with the 'new' keyword cannot have a 'this' type that is 'void'."); }; + static shared_ptr A_0_parameter_must_be_the_first_parameter(){ return diag(2680, DiagnosticCategory::Error, "A_0_parameter_must_be_the_first_parameter_2680", "A '{0}' parameter must be the first parameter."); }; + static shared_ptr A_constructor_cannot_have_a_this_parameter(){ return diag(2681, DiagnosticCategory::Error, "A_constructor_cannot_have_a_this_parameter_2681", "A constructor cannot have a 'this' parameter."); }; + static shared_ptr this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation(){ return diag(2683, DiagnosticCategory::Error, "this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683", "'this' implicitly has type 'any' because it does not have a type annotation."); }; + static shared_ptr The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1(){ return diag(2684, DiagnosticCategory::Error, "The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684", "The 'this' context of type '{0}' is not assignable to method's 'this' of type '{1}'."); }; + static shared_ptr The_this_types_of_each_signature_are_incompatible(){ return diag(2685, DiagnosticCategory::Error, "The_this_types_of_each_signature_are_incompatible_2685", "The 'this' types of each signature are incompatible."); }; + static shared_ptr _0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead(){ return diag(2686, DiagnosticCategory::Error, "_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686", "'{0}' refers to a UMD global, but the current file is a module. Consider adding an import instead."); }; + static shared_ptr All_declarations_of_0_must_have_identical_modifiers(){ return diag(2687, DiagnosticCategory::Error, "All_declarations_of_0_must_have_identical_modifiers_2687", "All declarations of '{0}' must have identical modifiers."); }; + static shared_ptr Cannot_find_type_definition_file_for_0(){ return diag(2688, DiagnosticCategory::Error, "Cannot_find_type_definition_file_for_0_2688", "Cannot find type definition file for '{0}'."); }; + static shared_ptr Cannot_extend_an_interface_0_Did_you_mean_implements(){ return diag(2689, DiagnosticCategory::Error, "Cannot_extend_an_interface_0_Did_you_mean_implements_2689", "Cannot extend an interface '{0}'. Did you mean 'implements'?"); }; + static shared_ptr _0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0(){ return diag(2690, DiagnosticCategory::Error, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0_2690", "'{0}' only refers to a type, but is being used as a value here. Did you mean to use '{1} in {0}'?"); }; + static shared_ptr An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead(){ return diag(2691, DiagnosticCategory::Error, "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691", "An import path cannot end with a '{0}' extension. Consider importing '{1}' instead."); }; + static shared_ptr _0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible(){ return diag(2692, DiagnosticCategory::Error, "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692", "'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible."); }; + static shared_ptr _0_only_refers_to_a_type_but_is_being_used_as_a_value_here(){ return diag(2693, DiagnosticCategory::Error, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693", "'{0}' only refers to a type, but is being used as a value here."); }; + static shared_ptr Namespace_0_has_no_exported_member_1(){ return diag(2694, DiagnosticCategory::Error, "Namespace_0_has_no_exported_member_1_2694", "Namespace '{0}' has no exported member '{1}'."); }; + static shared_ptr Left_side_of_comma_operator_is_unused_and_has_no_side_effects(){ return diag(2695, DiagnosticCategory::Error, "Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695", "Left side of comma operator is unused and has no side effects.", /*reportsUnnecessary*/ true); }; + static shared_ptr The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead(){ return diag(2696, DiagnosticCategory::Error, "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696", "The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?"); }; + static shared_ptr An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option(){ return diag(2697, DiagnosticCategory::Error, "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697", "An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."); }; + static shared_ptr Spread_types_may_only_be_created_from_object_types(){ return diag(2698, DiagnosticCategory::Error, "Spread_types_may_only_be_created_from_object_types_2698", "Spread types may only be created from object types."); }; + static shared_ptr Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1(){ return diag(2699, DiagnosticCategory::Error, "Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699", "Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'."); }; + static shared_ptr Rest_types_may_only_be_created_from_object_types(){ return diag(2700, DiagnosticCategory::Error, "Rest_types_may_only_be_created_from_object_types_2700", "Rest types may only be created from object types."); }; + static shared_ptr The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access(){ return diag(2701, DiagnosticCategory::Error, "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701", "The target of an object rest assignment must be a variable or a property access."); }; + static shared_ptr _0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here(){ return diag(2702, DiagnosticCategory::Error, "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702", "'{0}' only refers to a type, but is being used as a namespace here."); }; + static shared_ptr The_operand_of_a_delete_operator_must_be_a_property_reference(){ return diag(2703, DiagnosticCategory::Error, "The_operand_of_a_delete_operator_must_be_a_property_reference_2703", "The operand of a 'delete' operator must be a property reference."); }; + static shared_ptr The_operand_of_a_delete_operator_cannot_be_a_read_only_property(){ return diag(2704, DiagnosticCategory::Error, "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704", "The operand of a 'delete' operator cannot be a read-only property."); }; + static shared_ptr 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(){ return diag(2705, DiagnosticCategory::Error, "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705", "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."); }; - static shared Required_type_parameters_may_not_follow_optional_type_parameters(){ return diag(2706, DiagnosticCategory::Error, "Required_type_parameters_may_not_follow_optional_type_parameters_2706", "Required type parameters may not follow optional type parameters."); }; - static shared Generic_type_0_requires_between_1_and_2_type_arguments(){ return diag(2707, DiagnosticCategory::Error, "Generic_type_0_requires_between_1_and_2_type_arguments_2707", "Generic type '{0}' requires between {1} and {2} type arguments."); }; - static shared Cannot_use_namespace_0_as_a_value(){ return diag(2708, DiagnosticCategory::Error, "Cannot_use_namespace_0_as_a_value_2708", "Cannot use namespace '{0}' as a value."); }; - static shared Cannot_use_namespace_0_as_a_type(){ return diag(2709, DiagnosticCategory::Error, "Cannot_use_namespace_0_as_a_type_2709", "Cannot use namespace '{0}' as a type."); }; - static shared _0_are_specified_twice_The_attribute_named_0_will_be_overwritten(){ return diag(2710, DiagnosticCategory::Error, "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710", "'{0}' are specified twice. The attribute named '{0}' will be overwritten."); }; - static shared A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option(){ return diag(2711, DiagnosticCategory::Error, "A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711", "A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."); }; - static shared A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option(){ return diag(2712, DiagnosticCategory::Error, "A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declarat_2712", + static shared_ptr Required_type_parameters_may_not_follow_optional_type_parameters(){ return diag(2706, DiagnosticCategory::Error, "Required_type_parameters_may_not_follow_optional_type_parameters_2706", "Required type parameters may not follow optional type parameters."); }; + static shared_ptr Generic_type_0_requires_between_1_and_2_type_arguments(){ return diag(2707, DiagnosticCategory::Error, "Generic_type_0_requires_between_1_and_2_type_arguments_2707", "Generic type '{0}' requires between {1} and {2} type arguments."); }; + static shared_ptr Cannot_use_namespace_0_as_a_value(){ return diag(2708, DiagnosticCategory::Error, "Cannot_use_namespace_0_as_a_value_2708", "Cannot use namespace '{0}' as a value."); }; + static shared_ptr Cannot_use_namespace_0_as_a_type(){ return diag(2709, DiagnosticCategory::Error, "Cannot_use_namespace_0_as_a_type_2709", "Cannot use namespace '{0}' as a type."); }; + static shared_ptr _0_are_specified_twice_The_attribute_named_0_will_be_overwritten(){ return diag(2710, DiagnosticCategory::Error, "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710", "'{0}' are specified twice. The attribute named '{0}' will be overwritten."); }; + static shared_ptr A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option(){ return diag(2711, DiagnosticCategory::Error, "A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711", "A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."); }; + static shared_ptr A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option(){ return diag(2712, DiagnosticCategory::Error, "A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declarat_2712", "A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."); }; - static shared Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1(){ return diag(2713, DiagnosticCategory::Error, "Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713", "Cannot access '{0}.{1}' because '{0}' is a type, but not a namespace. Did you mean to retrieve the type of the property '{1}' in '{0}' with '{0}[\"{1}\"]'?"); }; - static shared The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context(){ return diag(2714, DiagnosticCategory::Error, "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714", "The expression of an export assignment must be an identifier or qualified name in an ambient context."); }; - static shared Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor(){ return diag(2715, DiagnosticCategory::Error, "Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor_2715", "Abstract property '{0}' in class '{1}' cannot be accessed in the constructor."); }; - static shared Type_parameter_0_has_a_circular_default(){ return diag(2716, DiagnosticCategory::Error, "Type_parameter_0_has_a_circular_default_2716", "Type parameter '{0}' has a circular default."); }; - static shared Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2(){ return diag(2717, DiagnosticCategory::Error, "Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717", "Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'."); }; - static shared Duplicate_property_0(){ return diag(2718, DiagnosticCategory::Error, "Duplicate_property_0_2718", "Duplicate property '{0}'."); }; - static shared Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated(){ return diag(2719, DiagnosticCategory::Error, "Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719", "Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated."); }; - static shared Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass(){ return diag(2720, DiagnosticCategory::Error, "Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720", "Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?"); }; - static shared Cannot_invoke_an_object_which_is_possibly_null(){ return diag(2721, DiagnosticCategory::Error, "Cannot_invoke_an_object_which_is_possibly_null_2721", "Cannot invoke an object which is possibly 'null'."); }; - static shared Cannot_invoke_an_object_which_is_possibly_undefined(){ return diag(2722, DiagnosticCategory::Error, "Cannot_invoke_an_object_which_is_possibly_undefined_2722", "Cannot invoke an object which is possibly 'undefined'."); }; - static shared Cannot_invoke_an_object_which_is_possibly_null_or_undefined(){ return diag(2723, DiagnosticCategory::Error, "Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723", "Cannot invoke an object which is possibly 'null' or 'undefined'."); }; - static shared _0_has_no_exported_member_named_1_Did_you_mean_2(){ return diag(2724, DiagnosticCategory::Error, "_0_has_no_exported_member_named_1_Did_you_mean_2_2724", "'{0}' has no exported member named '{1}'. Did you mean '{2}'?"); }; - static shared Class_name_cannot_be_Object_when_targeting_ES5_with_module_0(){ return diag(2725, DiagnosticCategory::Error, "Class_name_cannot_be_Object_when_targeting_ES5_with_module_0_2725", "Class name cannot be 'Object' when targeting ES5 with module {0}."); }; - static shared Cannot_find_lib_definition_for_0(){ return diag(2726, DiagnosticCategory::Error, "Cannot_find_lib_definition_for_0_2726", "Cannot find lib definition for '{0}'."); }; - static shared Cannot_find_lib_definition_for_0_Did_you_mean_1(){ return diag(2727, DiagnosticCategory::Error, "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727", "Cannot find lib definition for '{0}'. Did you mean '{1}'?"); }; - static shared _0_is_declared_here(){ return diag(2728, DiagnosticCategory::Message, "_0_is_declared_here_2728", "'{0}' is declared here."); }; - static shared Property_0_is_used_before_its_initialization(){ return diag(2729, DiagnosticCategory::Error, "Property_0_is_used_before_its_initialization_2729", "Property '{0}' is used before its initialization."); }; - static shared An_arrow_function_cannot_have_a_this_parameter(){ return diag(2730, DiagnosticCategory::Error, "An_arrow_function_cannot_have_a_this_parameter_2730", "An arrow function cannot have a 'this' parameter."); }; - static shared Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String(){ return diag(2731, DiagnosticCategory::Error, "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731", "Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'."); }; - static shared Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension(){ return diag(2732, DiagnosticCategory::Error, "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732", "Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension."); }; - static shared Property_0_was_also_declared_here(){ return diag(2733, DiagnosticCategory::Error, "Property_0_was_also_declared_here_2733", "Property '{0}' was also declared here."); }; - static shared Are_you_missing_a_semicolon(){ return diag(2734, DiagnosticCategory::Error, "Are_you_missing_a_semicolon_2734", "Are you missing a semicolon?"); }; - static shared Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1(){ return diag(2735, DiagnosticCategory::Error, "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735", "Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?"); }; - static shared Operator_0_cannot_be_applied_to_type_1(){ return diag(2736, DiagnosticCategory::Error, "Operator_0_cannot_be_applied_to_type_1_2736", "Operator '{0}' cannot be applied to type '{1}'."); }; - static shared BigInt_literals_are_not_available_when_targeting_lower_than_ES2020(){ return diag(2737, DiagnosticCategory::Error, "BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737", "BigInt literals are not available when targeting lower than ES2020."); }; - static shared An_outer_value_of_this_is_shadowed_by_this_container(){ return diag(2738, DiagnosticCategory::Message, "An_outer_value_of_this_is_shadowed_by_this_container_2738", "An outer value of 'this' is shadowed by this container."); }; - static shared Type_0_is_missing_the_following_properties_from_type_1_Colon_2(){ return diag(2739, DiagnosticCategory::Error, "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739", "Type '{0}' is missing the following properties from type '{1}': {2}"); }; - static shared Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more(){ return diag(2740, DiagnosticCategory::Error, "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740", "Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more."); }; - static shared Property_0_is_missing_in_type_1_but_required_in_type_2(){ return diag(2741, DiagnosticCategory::Error, "Property_0_is_missing_in_type_1_but_required_in_type_2_2741", "Property '{0}' is missing in type '{1}' but required in type '{2}'."); }; - static shared The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary(){ return diag(2742, DiagnosticCategory::Error, "The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742", "The inferred type of '{0}' cannot be named without a reference to '{1}'. This is likely not portable. A type annotation is necessary."); }; - static shared No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments(){ return diag(2743, DiagnosticCategory::Error, "No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743", "No overload expects {0} type arguments, but overloads do exist that expect either {1} or {2} type arguments."); }; - static shared Type_parameter_defaults_can_only_reference_previously_declared_type_parameters(){ return diag(2744, DiagnosticCategory::Error, "Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744", "Type parameter defaults can only reference previously declared type parameters."); }; - static shared This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided(){ return diag(2745, DiagnosticCategory::Error, "This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745", "This JSX tag's '{0}' prop expects type '{1}' which requires multiple children, but only a single child was provided."); }; - static shared This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided(){ return diag(2746, DiagnosticCategory::Error, "This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746", "This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided."); }; - static shared _0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2(){ return diag(2747, DiagnosticCategory::Error, "_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747", "'{0}' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of '{1}' is '{2}'."); }; - static shared Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided(){ return diag(2748, DiagnosticCategory::Error, "Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided_2748", "Cannot access ambient const enums when the '--isolatedModules' flag is provided."); }; - static shared _0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0(){ return diag(2749, DiagnosticCategory::Error, "_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0_2749", "'{0}' refers to a value, but is being used as a type here. Did you mean 'typeof {0}'?"); }; - static shared The_implementation_signature_is_declared_here(){ return diag(2750, DiagnosticCategory::Error, "The_implementation_signature_is_declared_here_2750", "The implementation signature is declared here."); }; - static shared Circularity_originates_in_type_at_this_location(){ return diag(2751, DiagnosticCategory::Error, "Circularity_originates_in_type_at_this_location_2751", "Circularity originates in type at this location."); }; - static shared The_first_export_default_is_here(){ return diag(2752, DiagnosticCategory::Error, "The_first_export_default_is_here_2752", "The first export default is here."); }; - static shared Another_export_default_is_here(){ return diag(2753, DiagnosticCategory::Error, "Another_export_default_is_here_2753", "Another export default is here."); }; - static shared super_may_not_use_type_arguments(){ return diag(2754, DiagnosticCategory::Error, "super_may_not_use_type_arguments_2754", "'super' may not use type arguments."); }; - static shared No_constituent_of_type_0_is_callable(){ return diag(2755, DiagnosticCategory::Error, "No_constituent_of_type_0_is_callable_2755", "No constituent of type '{0}' is callable."); }; - static shared Not_all_constituents_of_type_0_are_callable(){ return diag(2756, DiagnosticCategory::Error, "Not_all_constituents_of_type_0_are_callable_2756", "Not all constituents of type '{0}' are callable."); }; - static shared Type_0_has_no_call_signatures(){ return diag(2757, DiagnosticCategory::Error, "Type_0_has_no_call_signatures_2757", "Type '{0}' has no call signatures."); }; - static shared Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other(){ return diag(2758, DiagnosticCategory::Error, "Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758", "Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other."); }; - static shared No_constituent_of_type_0_is_constructable(){ return diag(2759, DiagnosticCategory::Error, "No_constituent_of_type_0_is_constructable_2759", "No constituent of type '{0}' is constructable."); }; - static shared Not_all_constituents_of_type_0_are_constructable(){ return diag(2760, DiagnosticCategory::Error, "Not_all_constituents_of_type_0_are_constructable_2760", "Not all constituents of type '{0}' are constructable."); }; - static shared Type_0_has_no_construct_signatures(){ return diag(2761, DiagnosticCategory::Error, "Type_0_has_no_construct_signatures_2761", "Type '{0}' has no construct signatures."); }; - static shared Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other(){ return diag(2762, DiagnosticCategory::Error, "Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762", "Each member of the union type '{0}' has construct signatures, but none of those signatures are compatible with each other."); }; - static shared Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0(){ return diag(2763, DiagnosticCategory::Error, "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763", "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but for-of will always send '{0}'."); }; - static shared Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0(){ return diag(2764, DiagnosticCategory::Error, "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764", "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array spread will always send '{0}'."); }; - static shared Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0(){ return diag(2765, DiagnosticCategory::Error, "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765", "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array destructuring will always send '{0}'."); }; - static shared Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0(){ return diag(2766, DiagnosticCategory::Error, "Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766", "Cannot delegate iteration to value because the 'next' method of its iterator expects type '{1}', but the containing generator will always send '{0}'."); }; - static shared The_0_property_of_an_iterator_must_be_a_method(){ return diag(2767, DiagnosticCategory::Error, "The_0_property_of_an_iterator_must_be_a_method_2767", "The '{0}' property of an iterator must be a method."); }; - static shared The_0_property_of_an_async_iterator_must_be_a_method(){ return diag(2768, DiagnosticCategory::Error, "The_0_property_of_an_async_iterator_must_be_a_method_2768", "The '{0}' property of an async iterator must be a method."); }; - static shared No_overload_matches_this_call(){ return diag(2769, DiagnosticCategory::Error, "No_overload_matches_this_call_2769", "No overload matches this call."); }; - static shared The_last_overload_gave_the_following_error(){ return diag(2770, DiagnosticCategory::Error, "The_last_overload_gave_the_following_error_2770", "The last overload gave the following error."); }; - static shared The_last_overload_is_declared_here(){ return diag(2771, DiagnosticCategory::Error, "The_last_overload_is_declared_here_2771", "The last overload is declared here."); }; - static shared Overload_0_of_1_2_gave_the_following_error(){ return diag(2772, DiagnosticCategory::Error, "Overload_0_of_1_2_gave_the_following_error_2772", "Overload {0} of {1}, '{2}', gave the following error."); }; - static shared Did_you_forget_to_use_await(){ return diag(2773, DiagnosticCategory::Error, "Did_you_forget_to_use_await_2773", "Did you forget to use 'await'?"); }; - static shared This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead(){ return diag(2774, DiagnosticCategory::Error, "This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774", "This condition will always return true since this function is always defined. Did you mean to call it instead?"); }; - static shared Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation(){ return diag(2775, DiagnosticCategory::Error, "Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775", "Assertions require every name in the call target to be declared with an explicit type annotation."); }; - static shared Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name(){ return diag(2776, DiagnosticCategory::Error, "Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776", "Assertions require the call target to be an identifier or qualified name."); }; - static shared The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access(){ return diag(2777, DiagnosticCategory::Error, "The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777", "The operand of an increment or decrement operator may not be an optional property access."); }; - static shared The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access(){ return diag(2778, DiagnosticCategory::Error, "The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778", "The target of an object rest assignment may not be an optional property access."); }; - static shared The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access(){ return diag(2779, DiagnosticCategory::Error, "The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779", "The left-hand side of an assignment expression may not be an optional property access."); }; - static shared The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access(){ return diag(2780, DiagnosticCategory::Error, "The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780", "The left-hand side of a 'for...in' statement may not be an optional property access."); }; - static shared The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access(){ return diag(2781, DiagnosticCategory::Error, "The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781", "The left-hand side of a 'for...of' statement may not be an optional property access."); }; - static shared _0_needs_an_explicit_type_annotation(){ return diag(2782, DiagnosticCategory::Message, "_0_needs_an_explicit_type_annotation_2782", "'{0}' needs an explicit type annotation."); }; - static shared _0_is_specified_more_than_once_so_this_usage_will_be_overwritten(){ return diag(2783, DiagnosticCategory::Error, "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783", "'{0}' is specified more than once, so this usage will be overwritten."); }; - static shared get_and_set_accessors_cannot_declare_this_parameters(){ return diag(2784, DiagnosticCategory::Error, "get_and_set_accessors_cannot_declare_this_parameters_2784", "'get' and 'set' accessors cannot declare 'this' parameters."); }; - static shared This_spread_always_overwrites_this_property(){ return diag(2785, DiagnosticCategory::Error, "This_spread_always_overwrites_this_property_2785", "This spread always overwrites this property."); }; - static shared _0_cannot_be_used_as_a_JSX_component(){ return diag(2786, DiagnosticCategory::Error, "_0_cannot_be_used_as_a_JSX_component_2786", "'{0}' cannot be used as a JSX component."); }; - static shared Its_return_type_0_is_not_a_valid_JSX_element(){ return diag(2787, DiagnosticCategory::Error, "Its_return_type_0_is_not_a_valid_JSX_element_2787", "Its return type '{0}' is not a valid JSX element."); }; - static shared Its_instance_type_0_is_not_a_valid_JSX_element(){ return diag(2788, DiagnosticCategory::Error, "Its_instance_type_0_is_not_a_valid_JSX_element_2788", "Its instance type '{0}' is not a valid JSX element."); }; - static shared Its_element_type_0_is_not_a_valid_JSX_element(){ return diag(2789, DiagnosticCategory::Error, "Its_element_type_0_is_not_a_valid_JSX_element_2789", "Its element type '{0}' is not a valid JSX element."); }; - static shared The_operand_of_a_delete_operator_must_be_optional(){ return diag(2790, DiagnosticCategory::Error, "The_operand_of_a_delete_operator_must_be_optional_2790", "The operand of a 'delete' operator must be optional."); }; - static shared Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later(){ return diag(2791, DiagnosticCategory::Error, "Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_lat_2791", "Exponentiation cannot be performed on 'bigint' values unless the 'target' option is set to 'es2016' or later."); }; - static shared Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_node_or_to_add_aliases_to_the_paths_option(){ return diag(2792, DiagnosticCategory::Error, "Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_node_or_to_add_aliases_to_th_2792", "Cannot find module '{0}'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?"); }; - static shared The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible(){ return diag(2793, DiagnosticCategory::Error, "The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_2793", "The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible."); }; - static shared Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise(){ return diag(2794, DiagnosticCategory::Error, "Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise_2794", "Expected {0} arguments, but got {1}. Did you forget to include 'void' in your type argument to 'Promise'?"); }; - static shared The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types(){ return diag(2795, DiagnosticCategory::Error, "The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types_2795", "The 'intrinsic' keyword can only be used to declare compiler provided intrinsic types."); }; - static shared It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked(){ return diag(2796, DiagnosticCategory::Error, "It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tag_2796", "It is likely that you are missing a comma to separate these two template expressions. They form a tagged template expression which cannot be invoked."); }; - static shared A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract(){ return diag(2797, DiagnosticCategory::Error, "A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797", "A mixin class that extends from a type variable containing an abstract construct signature must also be declared 'abstract'."); }; - static shared The_declaration_was_marked_as_deprecated_here(){ return diag(2798, DiagnosticCategory::Error, "The_declaration_was_marked_as_deprecated_here_2798", "The declaration was marked as deprecated here."); }; - static shared Type_produces_a_tuple_type_that_is_too_large_to_represent(){ return diag(2799, DiagnosticCategory::Error, "Type_produces_a_tuple_type_that_is_too_large_to_represent_2799", "Type produces a tuple type that is too large to represent."); }; - static shared Expression_produces_a_tuple_type_that_is_too_large_to_represent(){ return diag(2800, DiagnosticCategory::Error, "Expression_produces_a_tuple_type_that_is_too_large_to_represent_2800", "Expression produces a tuple type that is too large to represent."); }; - static shared This_condition_will_always_return_true_since_this_0_is_always_defined(){ return diag(2801, DiagnosticCategory::Error, "This_condition_will_always_return_true_since_this_0_is_always_defined_2801", "This condition will always return true since this '{0}' is always defined."); }; - static shared Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher(){ return diag(2802, DiagnosticCategory::Error, "Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es201_2802", "Type '{0}' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher."); }; - static shared Cannot_assign_to_private_method_0_Private_methods_are_not_writable(){ return diag(2803, DiagnosticCategory::Error, "Cannot_assign_to_private_method_0_Private_methods_are_not_writable_2803", "Cannot assign to private method '{0}'. Private methods are not writable."); }; - static shared Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name(){ return diag(2804, DiagnosticCategory::Error, "Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name_2804", "Duplicate identifier '{0}'. Static and instance elements cannot share the same private name."); }; - static shared Static_fields_with_private_names_can_t_have_initializers_when_the_useDefineForClassFields_flag_is_not_specified_with_a_target_of_esnext_Consider_adding_the_useDefineForClassFields_flag(){ return diag(2805, DiagnosticCategory::Error, "Static_fields_with_private_names_can_t_have_initializers_when_the_useDefineForClassFields_flag_is_no_2805", + static shared_ptr Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1(){ return diag(2713, DiagnosticCategory::Error, "Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713", "Cannot access '{0}.{1}' because '{0}' is a type, but not a namespace. Did you mean to retrieve the type of the property '{1}' in '{0}' with '{0}[\"{1}\"]'?"); }; + static shared_ptr The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context(){ return diag(2714, DiagnosticCategory::Error, "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714", "The expression of an export assignment must be an identifier or qualified name in an ambient context."); }; + static shared_ptr Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor(){ return diag(2715, DiagnosticCategory::Error, "Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor_2715", "Abstract property '{0}' in class '{1}' cannot be accessed in the constructor."); }; + static shared_ptr Type_parameter_0_has_a_circular_default(){ return diag(2716, DiagnosticCategory::Error, "Type_parameter_0_has_a_circular_default_2716", "Type parameter '{0}' has a circular default."); }; + static shared_ptr Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2(){ return diag(2717, DiagnosticCategory::Error, "Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717", "Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'."); }; + static shared_ptr Duplicate_property_0(){ return diag(2718, DiagnosticCategory::Error, "Duplicate_property_0_2718", "Duplicate property '{0}'."); }; + static shared_ptr Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated(){ return diag(2719, DiagnosticCategory::Error, "Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719", "Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated."); }; + static shared_ptr Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass(){ return diag(2720, DiagnosticCategory::Error, "Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720", "Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?"); }; + static shared_ptr Cannot_invoke_an_object_which_is_possibly_null(){ return diag(2721, DiagnosticCategory::Error, "Cannot_invoke_an_object_which_is_possibly_null_2721", "Cannot invoke an object which is possibly 'null'."); }; + static shared_ptr Cannot_invoke_an_object_which_is_possibly_undefined(){ return diag(2722, DiagnosticCategory::Error, "Cannot_invoke_an_object_which_is_possibly_undefined_2722", "Cannot invoke an object which is possibly 'undefined'."); }; + static shared_ptr Cannot_invoke_an_object_which_is_possibly_null_or_undefined(){ return diag(2723, DiagnosticCategory::Error, "Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723", "Cannot invoke an object which is possibly 'null' or 'undefined'."); }; + static shared_ptr _0_has_no_exported_member_named_1_Did_you_mean_2(){ return diag(2724, DiagnosticCategory::Error, "_0_has_no_exported_member_named_1_Did_you_mean_2_2724", "'{0}' has no exported member named '{1}'. Did you mean '{2}'?"); }; + static shared_ptr Class_name_cannot_be_Object_when_targeting_ES5_with_module_0(){ return diag(2725, DiagnosticCategory::Error, "Class_name_cannot_be_Object_when_targeting_ES5_with_module_0_2725", "Class name cannot be 'Object' when targeting ES5 with module {0}."); }; + static shared_ptr Cannot_find_lib_definition_for_0(){ return diag(2726, DiagnosticCategory::Error, "Cannot_find_lib_definition_for_0_2726", "Cannot find lib definition for '{0}'."); }; + static shared_ptr Cannot_find_lib_definition_for_0_Did_you_mean_1(){ return diag(2727, DiagnosticCategory::Error, "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727", "Cannot find lib definition for '{0}'. Did you mean '{1}'?"); }; + static shared_ptr _0_is_declared_here(){ return diag(2728, DiagnosticCategory::Message, "_0_is_declared_here_2728", "'{0}' is declared here."); }; + static shared_ptr Property_0_is_used_before_its_initialization(){ return diag(2729, DiagnosticCategory::Error, "Property_0_is_used_before_its_initialization_2729", "Property '{0}' is used before its initialization."); }; + static shared_ptr An_arrow_function_cannot_have_a_this_parameter(){ return diag(2730, DiagnosticCategory::Error, "An_arrow_function_cannot_have_a_this_parameter_2730", "An arrow function cannot have a 'this' parameter."); }; + static shared_ptr Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String(){ return diag(2731, DiagnosticCategory::Error, "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731", "Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'."); }; + static shared_ptr Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension(){ return diag(2732, DiagnosticCategory::Error, "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732", "Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension."); }; + static shared_ptr Property_0_was_also_declared_here(){ return diag(2733, DiagnosticCategory::Error, "Property_0_was_also_declared_here_2733", "Property '{0}' was also declared here."); }; + static shared_ptr Are_you_missing_a_semicolon(){ return diag(2734, DiagnosticCategory::Error, "Are_you_missing_a_semicolon_2734", "Are you missing a semicolon?"); }; + static shared_ptr Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1(){ return diag(2735, DiagnosticCategory::Error, "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735", "Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?"); }; + static shared_ptr Operator_0_cannot_be_applied_to_type_1(){ return diag(2736, DiagnosticCategory::Error, "Operator_0_cannot_be_applied_to_type_1_2736", "Operator '{0}' cannot be applied to type '{1}'."); }; + static shared_ptr BigInt_literals_are_not_available_when_targeting_lower_than_ES2020(){ return diag(2737, DiagnosticCategory::Error, "BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737", "BigInt literals are not available when targeting lower than ES2020."); }; + static shared_ptr An_outer_value_of_this_is_shadowed_by_this_container(){ return diag(2738, DiagnosticCategory::Message, "An_outer_value_of_this_is_shadowed_by_this_container_2738", "An outer value of 'this' is shadowed by this container."); }; + static shared_ptr Type_0_is_missing_the_following_properties_from_type_1_Colon_2(){ return diag(2739, DiagnosticCategory::Error, "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739", "Type '{0}' is missing the following properties from type '{1}': {2}"); }; + static shared_ptr Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more(){ return diag(2740, DiagnosticCategory::Error, "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740", "Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more."); }; + static shared_ptr Property_0_is_missing_in_type_1_but_required_in_type_2(){ return diag(2741, DiagnosticCategory::Error, "Property_0_is_missing_in_type_1_but_required_in_type_2_2741", "Property '{0}' is missing in type '{1}' but required in type '{2}'."); }; + static shared_ptr The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary(){ return diag(2742, DiagnosticCategory::Error, "The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742", "The inferred type of '{0}' cannot be named without a reference to '{1}'. This is likely not portable. A type annotation is necessary."); }; + static shared_ptr No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments(){ return diag(2743, DiagnosticCategory::Error, "No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743", "No overload expects {0} type arguments, but overloads do exist that expect either {1} or {2} type arguments."); }; + static shared_ptr Type_parameter_defaults_can_only_reference_previously_declared_type_parameters(){ return diag(2744, DiagnosticCategory::Error, "Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744", "Type parameter defaults can only reference previously declared type parameters."); }; + static shared_ptr This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided(){ return diag(2745, DiagnosticCategory::Error, "This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745", "This JSX tag's '{0}' prop expects type '{1}' which requires multiple children, but only a single child was provided."); }; + static shared_ptr This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided(){ return diag(2746, DiagnosticCategory::Error, "This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746", "This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided."); }; + static shared_ptr _0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2(){ return diag(2747, DiagnosticCategory::Error, "_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747", "'{0}' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of '{1}' is '{2}'."); }; + static shared_ptr Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided(){ return diag(2748, DiagnosticCategory::Error, "Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided_2748", "Cannot access ambient const enums when the '--isolatedModules' flag is provided."); }; + static shared_ptr _0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0(){ return diag(2749, DiagnosticCategory::Error, "_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0_2749", "'{0}' refers to a value, but is being used as a type here. Did you mean 'typeof {0}'?"); }; + static shared_ptr The_implementation_signature_is_declared_here(){ return diag(2750, DiagnosticCategory::Error, "The_implementation_signature_is_declared_here_2750", "The implementation signature is declared here."); }; + static shared_ptr Circularity_originates_in_type_at_this_location(){ return diag(2751, DiagnosticCategory::Error, "Circularity_originates_in_type_at_this_location_2751", "Circularity originates in type at this location."); }; + static shared_ptr The_first_export_default_is_here(){ return diag(2752, DiagnosticCategory::Error, "The_first_export_default_is_here_2752", "The first export default is here."); }; + static shared_ptr Another_export_default_is_here(){ return diag(2753, DiagnosticCategory::Error, "Another_export_default_is_here_2753", "Another export default is here."); }; + static shared_ptr super_may_not_use_type_arguments(){ return diag(2754, DiagnosticCategory::Error, "super_may_not_use_type_arguments_2754", "'super' may not use type arguments."); }; + static shared_ptr No_constituent_of_type_0_is_callable(){ return diag(2755, DiagnosticCategory::Error, "No_constituent_of_type_0_is_callable_2755", "No constituent of type '{0}' is callable."); }; + static shared_ptr Not_all_constituents_of_type_0_are_callable(){ return diag(2756, DiagnosticCategory::Error, "Not_all_constituents_of_type_0_are_callable_2756", "Not all constituents of type '{0}' are callable."); }; + static shared_ptr Type_0_has_no_call_signatures(){ return diag(2757, DiagnosticCategory::Error, "Type_0_has_no_call_signatures_2757", "Type '{0}' has no call signatures."); }; + static shared_ptr Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other(){ return diag(2758, DiagnosticCategory::Error, "Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758", "Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other."); }; + static shared_ptr No_constituent_of_type_0_is_constructable(){ return diag(2759, DiagnosticCategory::Error, "No_constituent_of_type_0_is_constructable_2759", "No constituent of type '{0}' is constructable."); }; + static shared_ptr Not_all_constituents_of_type_0_are_constructable(){ return diag(2760, DiagnosticCategory::Error, "Not_all_constituents_of_type_0_are_constructable_2760", "Not all constituents of type '{0}' are constructable."); }; + static shared_ptr Type_0_has_no_construct_signatures(){ return diag(2761, DiagnosticCategory::Error, "Type_0_has_no_construct_signatures_2761", "Type '{0}' has no construct signatures."); }; + static shared_ptr Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other(){ return diag(2762, DiagnosticCategory::Error, "Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762", "Each member of the union type '{0}' has construct signatures, but none of those signatures are compatible with each other."); }; + static shared_ptr Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0(){ return diag(2763, DiagnosticCategory::Error, "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763", "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but for-of will always send '{0}'."); }; + static shared_ptr Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0(){ return diag(2764, DiagnosticCategory::Error, "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764", "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array spread will always send '{0}'."); }; + static shared_ptr Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0(){ return diag(2765, DiagnosticCategory::Error, "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765", "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array destructuring will always send '{0}'."); }; + static shared_ptr Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0(){ return diag(2766, DiagnosticCategory::Error, "Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766", "Cannot delegate iteration to value because the 'next' method of its iterator expects type '{1}', but the containing generator will always send '{0}'."); }; + static shared_ptr The_0_property_of_an_iterator_must_be_a_method(){ return diag(2767, DiagnosticCategory::Error, "The_0_property_of_an_iterator_must_be_a_method_2767", "The '{0}' property of an iterator must be a method."); }; + static shared_ptr The_0_property_of_an_async_iterator_must_be_a_method(){ return diag(2768, DiagnosticCategory::Error, "The_0_property_of_an_async_iterator_must_be_a_method_2768", "The '{0}' property of an async iterator must be a method."); }; + static shared_ptr No_overload_matches_this_call(){ return diag(2769, DiagnosticCategory::Error, "No_overload_matches_this_call_2769", "No overload matches this call."); }; + static shared_ptr The_last_overload_gave_the_following_error(){ return diag(2770, DiagnosticCategory::Error, "The_last_overload_gave_the_following_error_2770", "The last overload gave the following error."); }; + static shared_ptr The_last_overload_is_declared_here(){ return diag(2771, DiagnosticCategory::Error, "The_last_overload_is_declared_here_2771", "The last overload is declared here."); }; + static shared_ptr Overload_0_of_1_2_gave_the_following_error(){ return diag(2772, DiagnosticCategory::Error, "Overload_0_of_1_2_gave_the_following_error_2772", "Overload {0} of {1}, '{2}', gave the following error."); }; + static shared_ptr Did_you_forget_to_use_await(){ return diag(2773, DiagnosticCategory::Error, "Did_you_forget_to_use_await_2773", "Did you forget to use 'await'?"); }; + static shared_ptr This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead(){ return diag(2774, DiagnosticCategory::Error, "This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774", "This condition will always return true since this function is always defined. Did you mean to call it instead?"); }; + static shared_ptr Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation(){ return diag(2775, DiagnosticCategory::Error, "Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775", "Assertions require every name in the call target to be declared with an explicit type annotation."); }; + static shared_ptr Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name(){ return diag(2776, DiagnosticCategory::Error, "Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776", "Assertions require the call target to be an identifier or qualified name."); }; + static shared_ptr The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access(){ return diag(2777, DiagnosticCategory::Error, "The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777", "The operand of an increment or decrement operator may not be an optional property access."); }; + static shared_ptr The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access(){ return diag(2778, DiagnosticCategory::Error, "The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778", "The target of an object rest assignment may not be an optional property access."); }; + static shared_ptr The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access(){ return diag(2779, DiagnosticCategory::Error, "The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779", "The left-hand side of an assignment expression may not be an optional property access."); }; + static shared_ptr The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access(){ return diag(2780, DiagnosticCategory::Error, "The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780", "The left-hand side of a 'for...in' statement may not be an optional property access."); }; + static shared_ptr The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access(){ return diag(2781, DiagnosticCategory::Error, "The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781", "The left-hand side of a 'for...of' statement may not be an optional property access."); }; + static shared_ptr _0_needs_an_explicit_type_annotation(){ return diag(2782, DiagnosticCategory::Message, "_0_needs_an_explicit_type_annotation_2782", "'{0}' needs an explicit type annotation."); }; + static shared_ptr _0_is_specified_more_than_once_so_this_usage_will_be_overwritten(){ return diag(2783, DiagnosticCategory::Error, "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783", "'{0}' is specified more than once, so this usage will be overwritten."); }; + static shared_ptr get_and_set_accessors_cannot_declare_this_parameters(){ return diag(2784, DiagnosticCategory::Error, "get_and_set_accessors_cannot_declare_this_parameters_2784", "'get' and 'set' accessors cannot declare 'this' parameters."); }; + static shared_ptr This_spread_always_overwrites_this_property(){ return diag(2785, DiagnosticCategory::Error, "This_spread_always_overwrites_this_property_2785", "This spread always overwrites this property."); }; + static shared_ptr _0_cannot_be_used_as_a_JSX_component(){ return diag(2786, DiagnosticCategory::Error, "_0_cannot_be_used_as_a_JSX_component_2786", "'{0}' cannot be used as a JSX component."); }; + static shared_ptr Its_return_type_0_is_not_a_valid_JSX_element(){ return diag(2787, DiagnosticCategory::Error, "Its_return_type_0_is_not_a_valid_JSX_element_2787", "Its return type '{0}' is not a valid JSX element."); }; + static shared_ptr Its_instance_type_0_is_not_a_valid_JSX_element(){ return diag(2788, DiagnosticCategory::Error, "Its_instance_type_0_is_not_a_valid_JSX_element_2788", "Its instance type '{0}' is not a valid JSX element."); }; + static shared_ptr Its_element_type_0_is_not_a_valid_JSX_element(){ return diag(2789, DiagnosticCategory::Error, "Its_element_type_0_is_not_a_valid_JSX_element_2789", "Its element type '{0}' is not a valid JSX element."); }; + static shared_ptr The_operand_of_a_delete_operator_must_be_optional(){ return diag(2790, DiagnosticCategory::Error, "The_operand_of_a_delete_operator_must_be_optional_2790", "The operand of a 'delete' operator must be optional."); }; + static shared_ptr Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later(){ return diag(2791, DiagnosticCategory::Error, "Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_lat_2791", "Exponentiation cannot be performed on 'bigint' values unless the 'target' option is set to 'es2016' or later."); }; + static shared_ptr Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_node_or_to_add_aliases_to_the_paths_option(){ return diag(2792, DiagnosticCategory::Error, "Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_node_or_to_add_aliases_to_th_2792", "Cannot find module '{0}'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?"); }; + static shared_ptr The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible(){ return diag(2793, DiagnosticCategory::Error, "The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_2793", "The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible."); }; + static shared_ptr Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise(){ return diag(2794, DiagnosticCategory::Error, "Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise_2794", "Expected {0} arguments, but got {1}. Did you forget to include 'void' in your type argument to 'Promise'?"); }; + static shared_ptr The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types(){ return diag(2795, DiagnosticCategory::Error, "The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types_2795", "The 'intrinsic' keyword can only be used to declare compiler provided intrinsic types."); }; + static shared_ptr It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked(){ return diag(2796, DiagnosticCategory::Error, "It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tag_2796", "It is likely that you are missing a comma to separate these two template expressions. They form a tagged template expression which cannot be invoked."); }; + static shared_ptr A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract(){ return diag(2797, DiagnosticCategory::Error, "A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797", "A mixin class that extends from a type variable containing an abstract construct signature must also be declared 'abstract'."); }; + static shared_ptr The_declaration_was_marked_as_deprecated_here(){ return diag(2798, DiagnosticCategory::Error, "The_declaration_was_marked_as_deprecated_here_2798", "The declaration was marked as deprecated here."); }; + static shared_ptr Type_produces_a_tuple_type_that_is_too_large_to_represent(){ return diag(2799, DiagnosticCategory::Error, "Type_produces_a_tuple_type_that_is_too_large_to_represent_2799", "Type produces a tuple type that is too large to represent."); }; + static shared_ptr Expression_produces_a_tuple_type_that_is_too_large_to_represent(){ return diag(2800, DiagnosticCategory::Error, "Expression_produces_a_tuple_type_that_is_too_large_to_represent_2800", "Expression produces a tuple type that is too large to represent."); }; + static shared_ptr This_condition_will_always_return_true_since_this_0_is_always_defined(){ return diag(2801, DiagnosticCategory::Error, "This_condition_will_always_return_true_since_this_0_is_always_defined_2801", "This condition will always return true since this '{0}' is always defined."); }; + static shared_ptr Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher(){ return diag(2802, DiagnosticCategory::Error, "Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es201_2802", "Type '{0}' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher."); }; + static shared_ptr Cannot_assign_to_private_method_0_Private_methods_are_not_writable(){ return diag(2803, DiagnosticCategory::Error, "Cannot_assign_to_private_method_0_Private_methods_are_not_writable_2803", "Cannot assign to private method '{0}'. Private methods are not writable."); }; + static shared_ptr Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name(){ return diag(2804, DiagnosticCategory::Error, "Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name_2804", "Duplicate identifier '{0}'. Static and instance elements cannot share the same private name."); }; + static shared_ptr Static_fields_with_private_names_can_t_have_initializers_when_the_useDefineForClassFields_flag_is_not_specified_with_a_target_of_esnext_Consider_adding_the_useDefineForClassFields_flag(){ return diag(2805, DiagnosticCategory::Error, "Static_fields_with_private_names_can_t_have_initializers_when_the_useDefineForClassFields_flag_is_no_2805", "Static fields with private names can't have initializers when the '--useDefineForClassFields' flag is not specified with a '--target' of 'esnext'. Consider adding the '--useDefineForClassFields' flag."); }; - static shared Private_accessor_was_defined_without_a_getter(){ return diag(2806, DiagnosticCategory::Error, "Private_accessor_was_defined_without_a_getter_2806", "Private accessor was defined without a getter."); }; - static shared This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0(){ return diag(2807, DiagnosticCategory::Error, "This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807", "This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'."); }; - static shared A_get_accessor_must_be_at_least_as_accessible_as_the_setter(){ return diag(2808, DiagnosticCategory::Error, "A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808", "A get accessor must be at least as accessible as the setter"); }; - static shared Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_the_whole_assignment_in_parentheses(){ return diag(2809, DiagnosticCategory::Error, "Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809", + static shared_ptr Private_accessor_was_defined_without_a_getter(){ return diag(2806, DiagnosticCategory::Error, "Private_accessor_was_defined_without_a_getter_2806", "Private accessor was defined without a getter."); }; + static shared_ptr This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0(){ return diag(2807, DiagnosticCategory::Error, "This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807", "This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'."); }; + static shared_ptr A_get_accessor_must_be_at_least_as_accessible_as_the_setter(){ return diag(2808, DiagnosticCategory::Error, "A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808", "A get accessor must be at least as accessible as the setter"); }; + static shared_ptr Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_the_whole_assignment_in_parentheses(){ return diag(2809, DiagnosticCategory::Error, "Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809", "Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the the whole assignment in parentheses."); }; - static shared Property_0_may_not_be_used_in_a_static_property_s_initializer_in_the_same_class_when_target_is_esnext_and_useDefineForClassFields_is_false(){ return diag(2810, DiagnosticCategory::Error, "Property_0_may_not_be_used_in_a_static_property_s_initializer_in_the_same_class_when_target_is_esnex_2810", "Property '{0}' may not be used in a static property's initializer in the same class when 'target' is 'esnext' and 'useDefineForClassFields' is 'false'."); }; - static shared Initializer_for_property_0(){ return diag(2811, DiagnosticCategory::Error, "Initializer_for_property_0_2811", "Initializer for property '{0}'"); }; - static shared Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom(){ return diag(2812, DiagnosticCategory::Error, "Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812", "Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."); }; - static shared Class_declaration_cannot_implement_overload_list_for_0(){ return diag(2813, DiagnosticCategory::Error, "Class_declaration_cannot_implement_overload_list_for_0_2813", "Class declaration cannot implement overload list for '{0}'."); }; - static shared Function_with_bodies_can_only_merge_with_classes_that_are_ambient(){ return diag(2814, DiagnosticCategory::Error, "Function_with_bodies_can_only_merge_with_classes_that_are_ambient_2814", "Function with bodies can only merge with classes that are ambient."); }; - static shared arguments_cannot_be_referenced_in_property_initializers(){ return diag(2815, DiagnosticCategory::Error, "arguments_cannot_be_referenced_in_property_initializers_2815", "'arguments' cannot be referenced in property initializers."); }; - static shared Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class(){ return diag(2816, DiagnosticCategory::Error, "Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class_2816", "Cannot use 'this' in a static property initializer of a decorated class."); }; - static shared Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block(){ return diag(2817, DiagnosticCategory::Error, "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block_2817", "Property '{0}' has no initializer and is not definitely assigned in a class static block."); }; - static shared Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers(){ return diag(2818, DiagnosticCategory::Error, "Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818", "Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers."); }; - static shared Namespace_name_cannot_be_0(){ return diag(2819, DiagnosticCategory::Error, "Namespace_name_cannot_be_0_2819", "Namespace name cannot be '{0}'."); }; - static shared Type_0_is_not_assignable_to_type_1_Did_you_mean_2(){ return diag(2820, DiagnosticCategory::Error, "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820", "Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"); }; - static shared Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext(){ return diag(2821, DiagnosticCategory::Error, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821", "Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'."); }; - static shared Import_assertions_cannot_be_used_with_type_only_imports_or_exports(){ return diag(2822, DiagnosticCategory::Error, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."); }; - static shared Cannot_find_namespace_0_Did_you_mean_1(){ return diag(2833, DiagnosticCategory::Error, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"); }; - static shared Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node12_or_nodenext_Consider_adding_an_extension_to_the_import_path(){ return diag(2834, DiagnosticCategory::Error, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834", + static shared_ptr Property_0_may_not_be_used_in_a_static_property_s_initializer_in_the_same_class_when_target_is_esnext_and_useDefineForClassFields_is_false(){ return diag(2810, DiagnosticCategory::Error, "Property_0_may_not_be_used_in_a_static_property_s_initializer_in_the_same_class_when_target_is_esnex_2810", "Property '{0}' may not be used in a static property's initializer in the same class when 'target' is 'esnext' and 'useDefineForClassFields' is 'false'."); }; + static shared_ptr Initializer_for_property_0(){ return diag(2811, DiagnosticCategory::Error, "Initializer_for_property_0_2811", "Initializer for property '{0}'"); }; + static shared_ptr Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom(){ return diag(2812, DiagnosticCategory::Error, "Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812", "Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."); }; + static shared_ptr Class_declaration_cannot_implement_overload_list_for_0(){ return diag(2813, DiagnosticCategory::Error, "Class_declaration_cannot_implement_overload_list_for_0_2813", "Class declaration cannot implement overload list for '{0}'."); }; + static shared_ptr Function_with_bodies_can_only_merge_with_classes_that_are_ambient(){ return diag(2814, DiagnosticCategory::Error, "Function_with_bodies_can_only_merge_with_classes_that_are_ambient_2814", "Function with bodies can only merge with classes that are ambient."); }; + static shared_ptr arguments_cannot_be_referenced_in_property_initializers(){ return diag(2815, DiagnosticCategory::Error, "arguments_cannot_be_referenced_in_property_initializers_2815", "'arguments' cannot be referenced in property initializers."); }; + static shared_ptr Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class(){ return diag(2816, DiagnosticCategory::Error, "Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class_2816", "Cannot use 'this' in a static property initializer of a decorated class."); }; + static shared_ptr Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block(){ return diag(2817, DiagnosticCategory::Error, "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block_2817", "Property '{0}' has no initializer and is not definitely assigned in a class static block."); }; + static shared_ptr Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers(){ return diag(2818, DiagnosticCategory::Error, "Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818", "Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers."); }; + static shared_ptr Namespace_name_cannot_be_0(){ return diag(2819, DiagnosticCategory::Error, "Namespace_name_cannot_be_0_2819", "Namespace name cannot be '{0}'."); }; + static shared_ptr Type_0_is_not_assignable_to_type_1_Did_you_mean_2(){ return diag(2820, DiagnosticCategory::Error, "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820", "Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"); }; + static shared_ptr Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext(){ return diag(2821, DiagnosticCategory::Error, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821", "Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'."); }; + static shared_ptr Import_assertions_cannot_be_used_with_type_only_imports_or_exports(){ return diag(2822, DiagnosticCategory::Error, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."); }; + static shared_ptr Cannot_find_namespace_0_Did_you_mean_1(){ return diag(2833, DiagnosticCategory::Error, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"); }; + static shared_ptr Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node12_or_nodenext_Consider_adding_an_extension_to_the_import_path(){ return diag(2834, DiagnosticCategory::Error, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path."); }; - static shared Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node12_or_nodenext_Did_you_mean_0(){ return diag(2835, DiagnosticCategory::Error, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?"); }; - static shared Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls(){ return diag(2836, DiagnosticCategory::Error, "Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836", "Import assertions are not allowed on statements that transpile to commonjs 'require' calls."); }; - static shared Import_declaration_0_is_using_private_name_1(){ return diag(4000, DiagnosticCategory::Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."); }; - static shared Type_parameter_0_of_exported_class_has_or_is_using_private_name_1(){ return diag(4002, DiagnosticCategory::Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."); }; - static shared Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1(){ return diag(4004, DiagnosticCategory::Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."); }; - static shared Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1(){ return diag(4006, DiagnosticCategory::Error, "Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4006", "Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."); }; - static shared Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1(){ return diag(4008, DiagnosticCategory::Error, "Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008", "Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'."); }; - static shared Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1(){ return diag(4010, DiagnosticCategory::Error, "Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010", "Type parameter '{0}' of public static method from exported class has or is using private name '{1}'."); }; - static shared Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1(){ return diag(4012, DiagnosticCategory::Error, "Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012", "Type parameter '{0}' of public method from exported class has or is using private name '{1}'."); }; - static shared Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1(){ return diag(4014, DiagnosticCategory::Error, "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014", "Type parameter '{0}' of method from exported interface has or is using private name '{1}'."); }; - static shared Type_parameter_0_of_exported_function_has_or_is_using_private_name_1(){ return diag(4016, DiagnosticCategory::Error, "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016", "Type parameter '{0}' of exported function has or is using private name '{1}'."); }; - static shared Implements_clause_of_exported_class_0_has_or_is_using_private_name_1(){ return diag(4019, DiagnosticCategory::Error, "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019", "Implements clause of exported class '{0}' has or is using private name '{1}'."); }; - static shared extends_clause_of_exported_class_0_has_or_is_using_private_name_1(){ return diag(4020, DiagnosticCategory::Error, "extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020", "'extends' clause of exported class '{0}' has or is using private name '{1}'."); }; - static shared extends_clause_of_exported_class_has_or_is_using_private_name_0(){ return diag(4021, DiagnosticCategory::Error, "extends_clause_of_exported_class_has_or_is_using_private_name_0_4021", "'extends' clause of exported class has or is using private name '{0}'."); }; - static shared extends_clause_of_exported_interface_0_has_or_is_using_private_name_1(){ return diag(4022, DiagnosticCategory::Error, "extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022", "'extends' clause of exported interface '{0}' has or is using private name '{1}'."); }; - static shared Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named(){ return diag(4023, DiagnosticCategory::Error, "Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023", "Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named."); }; - static shared Exported_variable_0_has_or_is_using_name_1_from_private_module_2(){ return diag(4024, DiagnosticCategory::Error, "Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024", "Exported variable '{0}' has or is using name '{1}' from private module '{2}'."); }; - static shared Exported_variable_0_has_or_is_using_private_name_1(){ return diag(4025, DiagnosticCategory::Error, "Exported_variable_0_has_or_is_using_private_name_1_4025", "Exported variable '{0}' has or is using private name '{1}'."); }; - static shared Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named(){ return diag(4026, DiagnosticCategory::Error, "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026", "Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."); }; - static shared Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2(){ return diag(4027, DiagnosticCategory::Error, "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027", "Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'."); }; - static shared Public_static_property_0_of_exported_class_has_or_is_using_private_name_1(){ return diag(4028, DiagnosticCategory::Error, "Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028", "Public static property '{0}' of exported class has or is using private name '{1}'."); }; - static shared Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named(){ return diag(4029, DiagnosticCategory::Error, "Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_name_4029", "Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."); }; - static shared Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2(){ return diag(4030, DiagnosticCategory::Error, "Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4030", "Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'."); }; - static shared Public_property_0_of_exported_class_has_or_is_using_private_name_1(){ return diag(4031, DiagnosticCategory::Error, "Public_property_0_of_exported_class_has_or_is_using_private_name_1_4031", "Public property '{0}' of exported class has or is using private name '{1}'."); }; - static shared Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2(){ return diag(4032, DiagnosticCategory::Error, "Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032", "Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'."); }; - static shared Property_0_of_exported_interface_has_or_is_using_private_name_1(){ return diag(4033, DiagnosticCategory::Error, "Property_0_of_exported_interface_has_or_is_using_private_name_1_4033", "Property '{0}' of exported interface has or is using private name '{1}'."); }; - static shared Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2(){ return diag(4034, DiagnosticCategory::Error, "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034", "Parameter type of public static setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."); }; - static shared Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1(){ return diag(4035, DiagnosticCategory::Error, "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1_4035", "Parameter type of public static setter '{0}' from exported class has or is using private name '{1}'."); }; - static shared Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2(){ return diag(4036, DiagnosticCategory::Error, "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036", "Parameter type of public setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."); }; - static shared Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1(){ return diag(4037, DiagnosticCategory::Error, "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037", "Parameter type of public setter '{0}' from exported class has or is using private name '{1}'."); }; - static shared Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named(){ return diag(4038, DiagnosticCategory::Error, "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_modul_4038", "Return type of public static getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."); }; - static shared Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2(){ return diag(4039, DiagnosticCategory::Error, "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_4039", "Return type of public static getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."); }; - static shared Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1(){ return diag(4040, DiagnosticCategory::Error, "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1_4040", "Return type of public static getter '{0}' from exported class has or is using private name '{1}'."); }; - static shared Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named(){ return diag(4041, DiagnosticCategory::Error, "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_4041", "Return type of public getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."); }; - static shared Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2(){ return diag(4042, DiagnosticCategory::Error, "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4042", "Return type of public getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."); }; - static shared Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1(){ return diag(4043, DiagnosticCategory::Error, "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1_4043", "Return type of public getter '{0}' from exported class has or is using private name '{1}'."); }; - static shared Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1(){ return diag(4044, DiagnosticCategory::Error, "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044", "Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'."); }; - static shared Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0(){ return diag(4045, DiagnosticCategory::Error, "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0_4045", "Return type of constructor signature from exported interface has or is using private name '{0}'."); }; - static shared Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1(){ return diag(4046, DiagnosticCategory::Error, "Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046", "Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'."); }; - static shared Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0(){ return diag(4047, DiagnosticCategory::Error, "Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047", "Return type of call signature from exported interface has or is using private name '{0}'."); }; - static shared Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1(){ return diag(4048, DiagnosticCategory::Error, "Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4048", "Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'."); }; - static shared Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0(){ return diag(4049, DiagnosticCategory::Error, "Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0_4049", "Return type of index signature from exported interface has or is using private name '{0}'."); }; - static shared Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named(){ return diag(4050, DiagnosticCategory::Error, "Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module__4050", "Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named."); }; - static shared Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1(){ return diag(4051, DiagnosticCategory::Error, "Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4051", "Return type of public static method from exported class has or is using name '{0}' from private module '{1}'."); }; - static shared Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0(){ return diag(4052, DiagnosticCategory::Error, "Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0_4052", "Return type of public static method from exported class has or is using private name '{0}'."); }; - static shared Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named(){ return diag(4053, DiagnosticCategory::Error, "Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_c_4053", "Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named."); }; - static shared Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1(){ return diag(4054, DiagnosticCategory::Error, "Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4054", "Return type of public method from exported class has or is using name '{0}' from private module '{1}'."); }; - static shared Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0(){ return diag(4055, DiagnosticCategory::Error, "Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0_4055", "Return type of public method from exported class has or is using private name '{0}'."); }; - static shared Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1(){ return diag(4056, DiagnosticCategory::Error, "Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4056", "Return type of method from exported interface has or is using name '{0}' from private module '{1}'."); }; - static shared Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0(){ return diag(4057, DiagnosticCategory::Error, "Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0_4057", "Return type of method from exported interface has or is using private name '{0}'."); }; - static shared Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named(){ return diag(4058, DiagnosticCategory::Error, "Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named_4058", "Return type of exported function has or is using name '{0}' from external module {1} but cannot be named."); }; - static shared Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1(){ return diag(4059, DiagnosticCategory::Error, "Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1_4059", "Return type of exported function has or is using name '{0}' from private module '{1}'."); }; - static shared Return_type_of_exported_function_has_or_is_using_private_name_0(){ return diag(4060, DiagnosticCategory::Error, "Return_type_of_exported_function_has_or_is_using_private_name_0_4060", "Return type of exported function has or is using private name '{0}'."); }; - static shared Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named(){ return diag(4061, DiagnosticCategory::Error, "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061", "Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named."); }; - static shared Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2(){ return diag(4062, DiagnosticCategory::Error, "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2_4062", "Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'."); }; - static shared Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1(){ return diag(4063, DiagnosticCategory::Error, "Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1_4063", "Parameter '{0}' of constructor from exported class has or is using private name '{1}'."); }; - static shared Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2(){ return diag(4064, DiagnosticCategory::Error, "Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_mod_4064", "Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'."); }; - static shared Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1(){ return diag(4065, DiagnosticCategory::Error, "Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4065", "Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."); }; - static shared Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2(){ return diag(4066, DiagnosticCategory::Error, "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066", "Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'."); }; - static shared Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1(){ return diag(4067, DiagnosticCategory::Error, "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067", "Parameter '{0}' of call signature from exported interface has or is using private name '{1}'."); }; - static shared Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named(){ return diag(4068, DiagnosticCategory::Error, "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module__4068", "Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named."); }; - static shared Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2(){ return diag(4069, DiagnosticCategory::Error, "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4069", "Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'."); }; - static shared Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1(){ return diag(4070, DiagnosticCategory::Error, "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070", "Parameter '{0}' of public static method from exported class has or is using private name '{1}'."); }; - static shared Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named(){ return diag(4071, DiagnosticCategory::Error, "Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_c_4071", "Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named."); }; - static shared Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2(){ return diag(4072, DiagnosticCategory::Error, "Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4072", "Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'."); }; - static shared Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1(){ return diag(4073, DiagnosticCategory::Error, "Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4073", "Parameter '{0}' of public method from exported class has or is using private name '{1}'."); }; - static shared Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2(){ return diag(4074, DiagnosticCategory::Error, "Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4074", "Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'."); }; - static shared Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1(){ return diag(4075, DiagnosticCategory::Error, "Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4075", "Parameter '{0}' of method from exported interface has or is using private name '{1}'."); }; - static shared Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named(){ return diag(4076, DiagnosticCategory::Error, "Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4076", "Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named."); }; - static shared Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2(){ return diag(4077, DiagnosticCategory::Error, "Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2_4077", "Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'."); }; - static shared Parameter_0_of_exported_function_has_or_is_using_private_name_1(){ return diag(4078, DiagnosticCategory::Error, "Parameter_0_of_exported_function_has_or_is_using_private_name_1_4078", "Parameter '{0}' of exported function has or is using private name '{1}'."); }; - static shared Exported_type_alias_0_has_or_is_using_private_name_1(){ return diag(4081, DiagnosticCategory::Error, "Exported_type_alias_0_has_or_is_using_private_name_1_4081", "Exported type alias '{0}' has or is using private name '{1}'."); }; - static shared Default_export_of_the_module_has_or_is_using_private_name_0(){ return diag(4082, DiagnosticCategory::Error, "Default_export_of_the_module_has_or_is_using_private_name_0_4082", "Default export of the module has or is using private name '{0}'."); }; - static shared Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1(){ return diag(4083, DiagnosticCategory::Error, "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083", "Type parameter '{0}' of exported type alias has or is using private name '{1}'."); }; - static shared Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2(){ return diag(4084, DiagnosticCategory::Error, "Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2_4084", "Exported type alias '{0}' has or is using private name '{1}' from module {2}."); }; - static shared Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_library_to_resolve_the_conflict(){ return diag(4090, DiagnosticCategory::Error, "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090", "Conflicting definitions for '{0}' found at '{1}' and '{2}'. Consider installing a specific version of this library to resolve the conflict."); }; - static shared Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2(){ return diag(4091, DiagnosticCategory::Error, "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091", "Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'."); }; - static shared Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1(){ return diag(4092, DiagnosticCategory::Error, "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092", "Parameter '{0}' of index signature from exported interface has or is using private name '{1}'."); }; - static shared Property_0_of_exported_class_expression_may_not_be_private_or_protected(){ return diag(4094, DiagnosticCategory::Error, "Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094", "Property '{0}' of exported class expression may not be private or protected."); }; - static shared Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named(){ return diag(4095, DiagnosticCategory::Error, "Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_4095", "Public static method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."); }; - static shared Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2(){ return diag(4096, DiagnosticCategory::Error, "Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4096", "Public static method '{0}' of exported class has or is using name '{1}' from private module '{2}'."); }; - static shared Public_static_method_0_of_exported_class_has_or_is_using_private_name_1(){ return diag(4097, DiagnosticCategory::Error, "Public_static_method_0_of_exported_class_has_or_is_using_private_name_1_4097", "Public static method '{0}' of exported class has or is using private name '{1}'."); }; - static shared Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named(){ return diag(4098, DiagnosticCategory::Error, "Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4098", "Public method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."); }; - static shared Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2(){ return diag(4099, DiagnosticCategory::Error, "Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4099", "Public method '{0}' of exported class has or is using name '{1}' from private module '{2}'."); }; - static shared Public_method_0_of_exported_class_has_or_is_using_private_name_1(){ return diag(4100, DiagnosticCategory::Error, "Public_method_0_of_exported_class_has_or_is_using_private_name_1_4100", "Public method '{0}' of exported class has or is using private name '{1}'."); }; - static shared Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2(){ return diag(4101, DiagnosticCategory::Error, "Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101", "Method '{0}' of exported interface has or is using name '{1}' from private module '{2}'."); }; - static shared Method_0_of_exported_interface_has_or_is_using_private_name_1(){ return diag(4102, DiagnosticCategory::Error, "Method_0_of_exported_interface_has_or_is_using_private_name_1_4102", "Method '{0}' of exported interface has or is using private name '{1}'."); }; - static shared Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1(){ return diag(4103, DiagnosticCategory::Error, "Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103", "Type parameter '{0}' of exported mapped object type is using private name '{1}'."); }; - static shared The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1(){ return diag(4104, DiagnosticCategory::Error, "The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104", "The type '{0}' is 'readonly' and cannot be assigned to the mutable type '{1}'."); }; - static shared Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter(){ return diag(4105, DiagnosticCategory::Error, "Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105", "Private or protected member '{0}' cannot be accessed on a type parameter."); }; - static shared Parameter_0_of_accessor_has_or_is_using_private_name_1(){ return diag(4106, DiagnosticCategory::Error, "Parameter_0_of_accessor_has_or_is_using_private_name_1_4106", "Parameter '{0}' of accessor has or is using private name '{1}'."); }; - static shared Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2(){ return diag(4107, DiagnosticCategory::Error, "Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107", "Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'."); }; - static shared Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named(){ return diag(4108, DiagnosticCategory::Error, "Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108", "Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named."); }; - static shared Type_arguments_for_0_circularly_reference_themselves(){ return diag(4109, DiagnosticCategory::Error, "Type_arguments_for_0_circularly_reference_themselves_4109", "Type arguments for '{0}' circularly reference themselves."); }; - static shared Tuple_type_arguments_circularly_reference_themselves(){ return diag(4110, DiagnosticCategory::Error, "Tuple_type_arguments_circularly_reference_themselves_4110", "Tuple type arguments circularly reference themselves."); }; - static shared Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0(){ return diag(4111, DiagnosticCategory::Error, "Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0_4111", "Property '{0}' comes from an index signature, so it must be accessed with ['{0}']."); }; - static shared This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class(){ return diag(4112, DiagnosticCategory::Error, "This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another__4112", "This member cannot have an 'override' modifier because its containing class '{0}' does not extend another class."); }; - static shared This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0(){ return diag(4113, DiagnosticCategory::Error, "This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_4113", "This member cannot have an 'override' modifier because it is not declared in the base class '{0}'."); }; - static shared This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0(){ return diag(4114, DiagnosticCategory::Error, "This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0_4114", "This member must have an 'override' modifier because it overrides a member in the base class '{0}'."); }; - static shared This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0(){ return diag(4115, DiagnosticCategory::Error, "This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0_4115", "This parameter property must have an 'override' modifier because it overrides a member in base class '{0}'."); }; - static shared This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0(){ return diag(4116, DiagnosticCategory::Error, "This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116", "This member must have an 'override' modifier because it overrides an abstract method that is declared in the base class '{0}'."); }; - static shared This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1(){ return diag(4117, DiagnosticCategory::Error, "This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117", "This member cannot have an 'override' modifier because it is not declared in the base class '{0}'. Did you mean '{1}'?"); }; - static shared The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized(){ return diag(4118, DiagnosticCategory::Error, "The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized_4118", "The type of this node cannot be serialized because its property '{0}' cannot be serialized."); }; - static shared This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0(){ return diag(4119, DiagnosticCategory::Error, "This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119", "This member must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."); }; - static shared This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0(){ return diag(4120, DiagnosticCategory::Error, "This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120", "This parameter property must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."); }; - static shared This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class(){ return diag(4121, DiagnosticCategory::Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121", "This member cannot have a JSDoc comment with an '@override' tag because its containing class '{0}' does not extend another class."); }; - static shared This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0(){ return diag(4122, DiagnosticCategory::Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122", "This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."); }; - static shared This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1(){ return diag(4123, DiagnosticCategory::Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123", "This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"); }; - static shared Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next(){ return diag(4124, DiagnosticCategory::Error, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."); }; - static shared The_current_host_does_not_support_the_0_option(){ return diag(5001, DiagnosticCategory::Error, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."); }; - static shared Cannot_find_the_common_subdirectory_path_for_the_input_files(){ return diag(5009, DiagnosticCategory::Error, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."); }; - static shared File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0(){ return diag(5010, DiagnosticCategory::Error, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."); }; - static shared Cannot_read_file_0_Colon_1(){ return diag(5012, DiagnosticCategory::Error, "Cannot_read_file_0_Colon_1_5012", "Cannot read file '{0}': {1}."); }; - static shared Failed_to_parse_file_0_Colon_1(){ return diag(5014, DiagnosticCategory::Error, "Failed_to_parse_file_0_Colon_1_5014", "Failed to parse file '{0}': {1}."); }; - static shared Unknown_compiler_option_0(){ return diag(5023, DiagnosticCategory::Error, "Unknown_compiler_option_0_5023", "Unknown compiler option '{0}'."); }; - static shared Compiler_option_0_requires_a_value_of_type_1(){ return diag(5024, DiagnosticCategory::Error, "Compiler_option_0_requires_a_value_of_type_1_5024", "Compiler option '{0}' requires a value of type {1}."); }; - static shared Unknown_compiler_option_0_Did_you_mean_1(){ return diag(5025, DiagnosticCategory::Error, "Unknown_compiler_option_0_Did_you_mean_1_5025", "Unknown compiler option '{0}'. Did you mean '{1}'?"); }; - static shared Could_not_write_file_0_Colon_1(){ return diag(5033, DiagnosticCategory::Error, "Could_not_write_file_0_Colon_1_5033", "Could not write file '{0}': {1}."); }; - static shared Option_project_cannot_be_mixed_with_source_files_on_a_command_line(){ return diag(5042, DiagnosticCategory::Error, "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042", "Option 'project' cannot be mixed with source files on a command line."); }; - static shared Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher(){ return diag(5047, DiagnosticCategory::Error, "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047", "Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher."); }; - static shared Option_0_cannot_be_specified_when_option_target_is_ES3(){ return diag(5048, DiagnosticCategory::Error, "Option_0_cannot_be_specified_when_option_target_is_ES3_5048", "Option '{0}' cannot be specified when option 'target' is 'ES3'."); }; - static shared Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided(){ return diag(5051, DiagnosticCategory::Error, "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051", "Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided."); }; - static shared Option_0_cannot_be_specified_without_specifying_option_1(){ return diag(5052, DiagnosticCategory::Error, "Option_0_cannot_be_specified_without_specifying_option_1_5052", "Option '{0}' cannot be specified without specifying option '{1}'."); }; - static shared Option_0_cannot_be_specified_with_option_1(){ return diag(5053, DiagnosticCategory::Error, "Option_0_cannot_be_specified_with_option_1_5053", "Option '{0}' cannot be specified with option '{1}'."); }; - static shared A_tsconfig_json_file_is_already_defined_at_Colon_0(){ return diag(5054, DiagnosticCategory::Error, "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054", "A 'tsconfig.json' file is already defined at: '{0}'."); }; - static shared Cannot_write_file_0_because_it_would_overwrite_input_file(){ return diag(5055, DiagnosticCategory::Error, "Cannot_write_file_0_because_it_would_overwrite_input_file_5055", "Cannot write file '{0}' because it would overwrite input file."); }; - static shared Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files(){ return diag(5056, DiagnosticCategory::Error, "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056", "Cannot write file '{0}' because it would be overwritten by multiple input files."); }; - static shared Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0(){ return diag(5057, DiagnosticCategory::Error, "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057", "Cannot find a tsconfig.json file at the specified directory: '{0}'."); }; - static shared The_specified_path_does_not_exist_Colon_0(){ return diag(5058, DiagnosticCategory::Error, "The_specified_path_does_not_exist_Colon_0_5058", "The specified path does not exist: '{0}'."); }; - static shared Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier(){ return diag(5059, DiagnosticCategory::Error, "Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059", "Invalid value for '--reactNamespace'. '{0}' is not a valid identifier."); }; - static shared Pattern_0_can_have_at_most_one_Asterisk_character(){ return diag(5061, DiagnosticCategory::Error, "Pattern_0_can_have_at_most_one_Asterisk_character_5061", "Pattern '{0}' can have at most one '*' character."); }; - static shared Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character(){ return diag(5062, DiagnosticCategory::Error, "Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062", "Substitution '{0}' in pattern '{1}' can have at most one '*' character."); }; - static shared Substitutions_for_pattern_0_should_be_an_array(){ return diag(5063, DiagnosticCategory::Error, "Substitutions_for_pattern_0_should_be_an_array_5063", "Substitutions for pattern '{0}' should be an array."); }; - static shared Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2(){ return diag(5064, DiagnosticCategory::Error, "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064", "Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'."); }; - static shared File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0(){ return diag(5065, DiagnosticCategory::Error, "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065", "File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'."); }; - static shared Substitutions_for_pattern_0_shouldn_t_be_an_empty_array(){ return diag(5066, DiagnosticCategory::Error, "Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066", "Substitutions for pattern '{0}' shouldn't be an empty array."); }; - static shared Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name(){ return diag(5067, DiagnosticCategory::Error, "Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name_5067", "Invalid value for 'jsxFactory'. '{0}' is not a valid identifier or qualified-name."); }; - static shared 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(){ return diag(5068, DiagnosticCategory::Error, "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068", "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig."); }; - static shared Option_0_cannot_be_specified_without_specifying_option_1_or_option_2(){ return diag(5069, DiagnosticCategory::Error, "Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069", "Option '{0}' cannot be specified without specifying option '{1}' or option '{2}'."); }; - static shared Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy(){ return diag(5070, DiagnosticCategory::Error, "Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy_5070", "Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy."); }; - static shared Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_esNext(){ return diag(5071, DiagnosticCategory::Error, "Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_5071", "Option '--resolveJsonModule' can only be specified when module code generation is 'commonjs', 'amd', 'es2015' or 'esNext'."); }; - static shared Unknown_build_option_0(){ return diag(5072, DiagnosticCategory::Error, "Unknown_build_option_0_5072", "Unknown build option '{0}'."); }; - static shared Build_option_0_requires_a_value_of_type_1(){ return diag(5073, DiagnosticCategory::Error, "Build_option_0_requires_a_value_of_type_1_5073", "Build option '{0}' requires a value of type {1}."); }; - static shared Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified(){ return diag(5074, DiagnosticCategory::Error, "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074", "Option '--incremental' can only be specified using tsconfig, emitting to single file or when option '--tsBuildInfoFile' is specified."); }; - static shared _0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2(){ return diag(5075, DiagnosticCategory::Error, "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075", "'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'."); }; - static shared _0_and_1_operations_cannot_be_mixed_without_parentheses(){ return diag(5076, DiagnosticCategory::Error, "_0_and_1_operations_cannot_be_mixed_without_parentheses_5076", "'{0}' and '{1}' operations cannot be mixed without parentheses."); }; - static shared Unknown_build_option_0_Did_you_mean_1(){ return diag(5077, DiagnosticCategory::Error, "Unknown_build_option_0_Did_you_mean_1_5077", "Unknown build option '{0}'. Did you mean '{1}'?"); }; - static shared Unknown_watch_option_0(){ return diag(5078, DiagnosticCategory::Error, "Unknown_watch_option_0_5078", "Unknown watch option '{0}'."); }; - static shared Unknown_watch_option_0_Did_you_mean_1(){ return diag(5079, DiagnosticCategory::Error, "Unknown_watch_option_0_Did_you_mean_1_5079", "Unknown watch option '{0}'. Did you mean '{1}'?"); }; - static shared Watch_option_0_requires_a_value_of_type_1(){ return diag(5080, DiagnosticCategory::Error, "Watch_option_0_requires_a_value_of_type_1_5080", "Watch option '{0}' requires a value of type {1}."); }; - static shared Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0(){ return diag(5081, DiagnosticCategory::Error, "Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081", "Cannot find a tsconfig.json file at the current directory: {0}."); }; - static shared _0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1(){ return diag(5082, DiagnosticCategory::Error, "_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1_5082", "'{0}' could be instantiated with an arbitrary type which could be unrelated to '{1}'."); }; - static shared Cannot_read_file_0(){ return diag(5083, DiagnosticCategory::Error, "Cannot_read_file_0_5083", "Cannot read file '{0}'."); }; - static shared Tuple_members_must_all_have_names_or_all_not_have_names(){ return diag(5084, DiagnosticCategory::Error, "Tuple_members_must_all_have_names_or_all_not_have_names_5084", "Tuple members must all have names or all not have names."); }; - static shared A_tuple_member_cannot_be_both_optional_and_rest(){ return diag(5085, DiagnosticCategory::Error, "A_tuple_member_cannot_be_both_optional_and_rest_5085", "A tuple member cannot be both optional and rest."); }; - static shared A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type(){ return diag(5086, DiagnosticCategory::Error, "A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086", "A labeled tuple element is declared as optional with a question mark after the name and before the colon, rather than after the type."); }; - static shared A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type(){ return diag(5087, DiagnosticCategory::Error, "A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087", "A labeled tuple element is declared as rest with a '...' before the name, rather than before the type."); }; - static shared The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary(){ return diag(5088, DiagnosticCategory::Error, "The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialize_5088", "The inferred type of '{0}' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary."); }; - static shared Option_0_cannot_be_specified_when_option_jsx_is_1(){ return diag(5089, DiagnosticCategory::Error, "Option_0_cannot_be_specified_when_option_jsx_is_1_5089", "Option '{0}' cannot be specified when option 'jsx' is '{1}'."); }; - static shared Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash(){ return diag(5090, DiagnosticCategory::Error, "Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash_5090", "Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?"); }; - static shared Option_preserveConstEnums_cannot_be_disabled_when_isolatedModules_is_enabled(){ return diag(5091, DiagnosticCategory::Error, "Option_preserveConstEnums_cannot_be_disabled_when_isolatedModules_is_enabled_5091", "Option 'preserveConstEnums' cannot be disabled when 'isolatedModules' is enabled."); }; - static shared The_root_value_of_a_0_file_must_be_an_object(){ return diag(5092, DiagnosticCategory::Error, "The_root_value_of_a_0_file_must_be_an_object_5092", "The root value of a '{0}' file must be an object."); }; - static shared Compiler_option_0_may_only_be_used_with_build(){ return diag(5093, DiagnosticCategory::Error, "Compiler_option_0_may_only_be_used_with_build_5093", "Compiler option '--{0}' may only be used with '--build'."); }; - static shared Compiler_option_0_may_not_be_used_with_build(){ return diag(5094, DiagnosticCategory::Error, "Compiler_option_0_may_not_be_used_with_build_5094", "Compiler option '--{0}' may not be used with '--build'."); }; - static shared Option_preserveValueImports_can_only_be_used_when_module_is_set_to_es2015_or_later(){ return diag(5095, DiagnosticCategory::Error, "Option_preserveValueImports_can_only_be_used_when_module_is_set_to_es2015_or_later_5095", "Option 'preserveValueImports' can only be used when 'module' is set to 'es2015' or later."); }; - static shared Generates_a_sourcemap_for_each_corresponding_d_ts_file(){ return diag(6000, DiagnosticCategory::Message, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."); }; - static shared Concatenate_and_emit_output_to_single_file(){ return diag(6001, DiagnosticCategory::Message, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."); }; - static shared Generates_corresponding_d_ts_file(){ return diag(6002, DiagnosticCategory::Message, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."); }; - static shared Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations(){ return diag(6004, DiagnosticCategory::Message, "Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004", "Specify the location where debugger should locate TypeScript files instead of source locations."); }; - static shared Watch_input_files(){ return diag(6005, DiagnosticCategory::Message, "Watch_input_files_6005", "Watch input files."); }; - static shared Redirect_output_structure_to_the_directory(){ return diag(6006, DiagnosticCategory::Message, "Redirect_output_structure_to_the_directory_6006", "Redirect output structure to the directory."); }; - static shared Do_not_erase_const_enum_declarations_in_generated_code(){ return diag(6007, DiagnosticCategory::Message, "Do_not_erase_const_enum_declarations_in_generated_code_6007", "Do not erase const enum declarations in generated code."); }; - static shared Do_not_emit_outputs_if_any_errors_were_reported(){ return diag(6008, DiagnosticCategory::Message, "Do_not_emit_outputs_if_any_errors_were_reported_6008", "Do not emit outputs if any errors were reported."); }; - static shared Do_not_emit_comments_to_output(){ return diag(6009, DiagnosticCategory::Message, "Do_not_emit_comments_to_output_6009", "Do not emit comments to output."); }; - static shared Do_not_emit_outputs(){ return diag(6010, DiagnosticCategory::Message, "Do_not_emit_outputs_6010", "Do not emit outputs."); }; - static shared Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking(){ return diag(6011, DiagnosticCategory::Message, "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011", "Allow default imports from modules with no default export. This does not affect code emit, just typechecking."); }; - static shared Skip_type_checking_of_declaration_files(){ return diag(6012, DiagnosticCategory::Message, "Skip_type_checking_of_declaration_files_6012", "Skip type checking of declaration files."); }; - static shared Do_not_resolve_the_real_path_of_symlinks(){ return diag(6013, DiagnosticCategory::Message, "Do_not_resolve_the_real_path_of_symlinks_6013", "Do not resolve the real path of symlinks."); }; - static shared Only_emit_d_ts_declaration_files(){ return diag(6014, DiagnosticCategory::Message, "Only_emit_d_ts_declaration_files_6014", "Only emit '.d.ts' declaration files."); }; - static shared Specify_ECMAScript_target_version(){ return diag(6015, DiagnosticCategory::Message, "Specify_ECMAScript_target_version_6015", "Specify ECMAScript target version."); }; - static shared Specify_module_code_generation(){ return diag(6016, DiagnosticCategory::Message, "Specify_module_code_generation_6016", "Specify module code generation."); }; - static shared Print_this_message(){ return diag(6017, DiagnosticCategory::Message, "Print_this_message_6017", "Print this message."); }; - static shared Print_the_compiler_s_version(){ return diag(6019, DiagnosticCategory::Message, "Print_the_compiler_s_version_6019", "Print the compiler's version."); }; - static shared Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json(){ return diag(6020, DiagnosticCategory::Message, "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020", "Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'."); }; - static shared Syntax_Colon_0(){ return diag(6023, DiagnosticCategory::Message, "Syntax_Colon_0_6023", "Syntax: {0}"); }; - static shared options(){ return diag(6024, DiagnosticCategory::Message, "options_6024", "options"); }; - static shared file(){ return diag(6025, DiagnosticCategory::Message, "file_6025", "file"); }; - static shared Examples_Colon_0(){ return diag(6026, DiagnosticCategory::Message, "Examples_Colon_0_6026", "Examples: {0}"); }; - static shared Options_Colon(){ return diag(6027, DiagnosticCategory::Message, "Options_Colon_6027", "Options:"); }; - static shared Version_0(){ return diag(6029, DiagnosticCategory::Message, "Version_0_6029", "Version {0}"); }; - static shared Insert_command_line_options_and_files_from_a_file(){ return diag(6030, DiagnosticCategory::Message, "Insert_command_line_options_and_files_from_a_file_6030", "Insert command line options and files from a file."); }; - static shared Starting_compilation_in_watch_mode(){ return diag(6031, DiagnosticCategory::Message, "Starting_compilation_in_watch_mode_6031", "Starting compilation in watch mode..."); }; - static shared File_change_detected_Starting_incremental_compilation(){ return diag(6032, DiagnosticCategory::Message, "File_change_detected_Starting_incremental_compilation_6032", "File change detected. Starting incremental compilation..."); }; - static shared KIND(){ return diag(6034, DiagnosticCategory::Message, "KIND_6034", "KIND"); }; - static shared FILE(){ return diag(6035, DiagnosticCategory::Message, "FILE_6035", "FILE"); }; - static shared VERSION(){ return diag(6036, DiagnosticCategory::Message, "VERSION_6036", "VERSION"); }; - static shared LOCATION(){ return diag(6037, DiagnosticCategory::Message, "LOCATION_6037", "LOCATION"); }; - static shared DIRECTORY(){ return diag(6038, DiagnosticCategory::Message, "DIRECTORY_6038", "DIRECTORY"); }; - static shared STRATEGY(){ return diag(6039, DiagnosticCategory::Message, "STRATEGY_6039", "STRATEGY"); }; - static shared FILE_OR_DIRECTORY(){ return diag(6040, DiagnosticCategory::Message, "FILE_OR_DIRECTORY_6040", "FILE OR DIRECTORY"); }; - static shared Generates_corresponding_map_file(){ return diag(6043, DiagnosticCategory::Message, "Generates_corresponding_map_file_6043", "Generates corresponding '.map' file."); }; - static shared Compiler_option_0_expects_an_argument(){ return diag(6044, DiagnosticCategory::Error, "Compiler_option_0_expects_an_argument_6044", "Compiler option '{0}' expects an argument."); }; - static shared Unterminated_quoted_string_in_response_file_0(){ return diag(6045, DiagnosticCategory::Error, "Unterminated_quoted_string_in_response_file_0_6045", "Unterminated quoted string in response file '{0}'."); }; - static shared Argument_for_0_option_must_be_Colon_1(){ return diag(6046, DiagnosticCategory::Error, "Argument_for_0_option_must_be_Colon_1_6046", "Argument for '{0}' option must be: {1}."); }; - static shared Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1(){ return diag(6048, DiagnosticCategory::Error, "Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048", "Locale must be of the form or -. For example '{0}' or '{1}'."); }; - static shared Unable_to_open_file_0(){ return diag(6050, DiagnosticCategory::Error, "Unable_to_open_file_0_6050", "Unable to open file '{0}'."); }; - static shared Corrupted_locale_file_0(){ return diag(6051, DiagnosticCategory::Error, "Corrupted_locale_file_0_6051", "Corrupted locale file {0}."); }; - static shared Raise_error_on_expressions_and_declarations_with_an_implied_any_type(){ return diag(6052, DiagnosticCategory::Message, "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052", "Raise error on expressions and declarations with an implied 'any' type."); }; - static shared File_0_not_found(){ return diag(6053, DiagnosticCategory::Error, "File_0_not_found_6053", "File '{0}' not found."); }; - static shared File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1(){ return diag(6054, DiagnosticCategory::Error, "File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054", "File '{0}' has an unsupported extension. The only supported extensions are {1}."); }; - static shared Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures(){ return diag(6055, DiagnosticCategory::Message, "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055", "Suppress noImplicitAny errors for indexing objects lacking index signatures."); }; - static shared Do_not_emit_declarations_for_code_that_has_an_internal_annotation(){ return diag(6056, DiagnosticCategory::Message, "Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056", "Do not emit declarations for code that has an '@internal' annotation."); }; - static shared Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir(){ return diag(6058, DiagnosticCategory::Message, "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058", "Specify the root directory of input files. Use to control the output directory structure with --outDir."); }; - static shared File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files(){ return diag(6059, DiagnosticCategory::Error, "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059", "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files."); }; - static shared Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix(){ return diag(6060, DiagnosticCategory::Message, "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060", "Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)."); }; - static shared NEWLINE(){ return diag(6061, DiagnosticCategory::Message, "NEWLINE_6061", "NEWLINE"); }; - static shared Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line(){ return diag(6064, DiagnosticCategory::Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line_6064", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'null' on command line."); }; - static shared Enables_experimental_support_for_ES7_decorators(){ return diag(6065, DiagnosticCategory::Message, "Enables_experimental_support_for_ES7_decorators_6065", "Enables experimental support for ES7 decorators."); }; - static shared Enables_experimental_support_for_emitting_type_metadata_for_decorators(){ return diag(6066, DiagnosticCategory::Message, "Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066", "Enables experimental support for emitting type metadata for decorators."); }; - static shared Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6(){ return diag(6069, DiagnosticCategory::Message, "Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069", "Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6)."); }; - static shared Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file(){ return diag(6070, DiagnosticCategory::Message, "Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070", "Initializes a TypeScript project and creates a tsconfig.json file."); }; - static shared Successfully_created_a_tsconfig_json_file(){ return diag(6071, DiagnosticCategory::Message, "Successfully_created_a_tsconfig_json_file_6071", "Successfully created a tsconfig.json file."); }; - static shared Suppress_excess_property_checks_for_object_literals(){ return diag(6072, DiagnosticCategory::Message, "Suppress_excess_property_checks_for_object_literals_6072", "Suppress excess property checks for object literals."); }; - static shared Stylize_errors_and_messages_using_color_and_context_experimental(){ return diag(6073, DiagnosticCategory::Message, "Stylize_errors_and_messages_using_color_and_context_experimental_6073", "Stylize errors and messages using color and context (experimental)."); }; - static shared Do_not_report_errors_on_unused_labels(){ return diag(6074, DiagnosticCategory::Message, "Do_not_report_errors_on_unused_labels_6074", "Do not report errors on unused labels."); }; - static shared Report_error_when_not_all_code_paths_in_function_return_a_value(){ return diag(6075, DiagnosticCategory::Message, "Report_error_when_not_all_code_paths_in_function_return_a_value_6075", "Report error when not all code paths in function return a value."); }; - static shared Report_errors_for_fallthrough_cases_in_switch_statement(){ return diag(6076, DiagnosticCategory::Message, "Report_errors_for_fallthrough_cases_in_switch_statement_6076", "Report errors for fallthrough cases in switch statement."); }; - static shared Do_not_report_errors_on_unreachable_code(){ return diag(6077, DiagnosticCategory::Message, "Do_not_report_errors_on_unreachable_code_6077", "Do not report errors on unreachable code."); }; - static shared Disallow_inconsistently_cased_references_to_the_same_file(){ return diag(6078, DiagnosticCategory::Message, "Disallow_inconsistently_cased_references_to_the_same_file_6078", "Disallow inconsistently-cased references to the same file."); }; - static shared Specify_library_files_to_be_included_in_the_compilation(){ return diag(6079, DiagnosticCategory::Message, "Specify_library_files_to_be_included_in_the_compilation_6079", "Specify library files to be included in the compilation."); }; - static shared Specify_JSX_code_generation(){ return diag(6080, DiagnosticCategory::Message, "Specify_JSX_code_generation_6080", "Specify JSX code generation."); }; - static shared File_0_has_an_unsupported_extension_so_skipping_it(){ return diag(6081, DiagnosticCategory::Message, "File_0_has_an_unsupported_extension_so_skipping_it_6081", "File '{0}' has an unsupported extension, so skipping it."); }; - static shared Only_amd_and_system_modules_are_supported_alongside_0(){ return diag(6082, DiagnosticCategory::Error, "Only_amd_and_system_modules_are_supported_alongside_0_6082", "Only 'amd' and 'system' modules are supported alongside --{0}."); }; - static shared Base_directory_to_resolve_non_absolute_module_names(){ return diag(6083, DiagnosticCategory::Message, "Base_directory_to_resolve_non_absolute_module_names_6083", "Base directory to resolve non-absolute module names."); }; - static shared Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit(){ return diag(6084, DiagnosticCategory::Message, "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084", "[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit"); }; - static shared Enable_tracing_of_the_name_resolution_process(){ return diag(6085, DiagnosticCategory::Message, "Enable_tracing_of_the_name_resolution_process_6085", "Enable tracing of the name resolution process."); }; - static shared Resolving_module_0_from_1(){ return diag(6086, DiagnosticCategory::Message, "Resolving_module_0_from_1_6086", "======== Resolving module '{0}' from '{1}'. ========"); }; - static shared Explicitly_specified_module_resolution_kind_Colon_0(){ return diag(6087, DiagnosticCategory::Message, "Explicitly_specified_module_resolution_kind_Colon_0_6087", "Explicitly specified module resolution kind: '{0}'."); }; - static shared Module_resolution_kind_is_not_specified_using_0(){ return diag(6088, DiagnosticCategory::Message, "Module_resolution_kind_is_not_specified_using_0_6088", "Module resolution kind is not specified, using '{0}'."); }; - static shared Module_name_0_was_successfully_resolved_to_1(){ return diag(6089, DiagnosticCategory::Message, "Module_name_0_was_successfully_resolved_to_1_6089", "======== Module name '{0}' was successfully resolved to '{1}'. ========"); }; - static shared Module_name_0_was_not_resolved(){ return diag(6090, DiagnosticCategory::Message, "Module_name_0_was_not_resolved_6090", "======== Module name '{0}' was not resolved. ========"); }; - static shared paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0(){ return diag(6091, DiagnosticCategory::Message, "paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091", "'paths' option is specified, looking for a pattern to match module name '{0}'."); }; - static shared Module_name_0_matched_pattern_1(){ return diag(6092, DiagnosticCategory::Message, "Module_name_0_matched_pattern_1_6092", "Module name '{0}', matched pattern '{1}'."); }; - static shared Trying_substitution_0_candidate_module_location_Colon_1(){ return diag(6093, DiagnosticCategory::Message, "Trying_substitution_0_candidate_module_location_Colon_1_6093", "Trying substitution '{0}', candidate module location: '{1}'."); }; - static shared Resolving_module_name_0_relative_to_base_url_1_2(){ return diag(6094, DiagnosticCategory::Message, "Resolving_module_name_0_relative_to_base_url_1_2_6094", "Resolving module name '{0}' relative to base url '{1}' - '{2}'."); }; - static shared Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1(){ return diag(6095, DiagnosticCategory::Message, "Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1_6095", "Loading module as file / folder, candidate module location '{0}', target file type '{1}'."); }; - static shared File_0_does_not_exist(){ return diag(6096, DiagnosticCategory::Message, "File_0_does_not_exist_6096", "File '{0}' does not exist."); }; - static shared File_0_exist_use_it_as_a_name_resolution_result(){ return diag(6097, DiagnosticCategory::Message, "File_0_exist_use_it_as_a_name_resolution_result_6097", "File '{0}' exist - use it as a name resolution result."); }; - static shared Loading_module_0_from_node_modules_folder_target_file_type_1(){ return diag(6098, DiagnosticCategory::Message, "Loading_module_0_from_node_modules_folder_target_file_type_1_6098", "Loading module '{0}' from 'node_modules' folder, target file type '{1}'."); }; - static shared Found_package_json_at_0(){ return diag(6099, DiagnosticCategory::Message, "Found_package_json_at_0_6099", "Found 'package.json' at '{0}'."); }; - static shared package_json_does_not_have_a_0_field(){ return diag(6100, DiagnosticCategory::Message, "package_json_does_not_have_a_0_field_6100", "'package.json' does not have a '{0}' field."); }; - static shared package_json_has_0_field_1_that_references_2(){ return diag(6101, DiagnosticCategory::Message, "package_json_has_0_field_1_that_references_2_6101", "'package.json' has '{0}' field '{1}' that references '{2}'."); }; - static shared Allow_javascript_files_to_be_compiled(){ return diag(6102, DiagnosticCategory::Message, "Allow_javascript_files_to_be_compiled_6102", "Allow javascript files to be compiled."); }; - static shared Checking_if_0_is_the_longest_matching_prefix_for_1_2(){ return diag(6104, DiagnosticCategory::Message, "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104", "Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'."); }; - static shared Expected_type_of_0_field_in_package_json_to_be_1_got_2(){ return diag(6105, DiagnosticCategory::Message, "Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105", "Expected type of '{0}' field in 'package.json' to be '{1}', got '{2}'."); }; - static shared baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1(){ return diag(6106, DiagnosticCategory::Message, "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106", "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'."); }; - static shared rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0(){ return diag(6107, DiagnosticCategory::Message, "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107", "'rootDirs' option is set, using it to resolve relative module name '{0}'."); }; - static shared Longest_matching_prefix_for_0_is_1(){ return diag(6108, DiagnosticCategory::Message, "Longest_matching_prefix_for_0_is_1_6108", "Longest matching prefix for '{0}' is '{1}'."); }; - static shared Loading_0_from_the_root_dir_1_candidate_location_2(){ return diag(6109, DiagnosticCategory::Message, "Loading_0_from_the_root_dir_1_candidate_location_2_6109", "Loading '{0}' from the root dir '{1}', candidate location '{2}'."); }; - static shared Trying_other_entries_in_rootDirs(){ return diag(6110, DiagnosticCategory::Message, "Trying_other_entries_in_rootDirs_6110", "Trying other entries in 'rootDirs'."); }; - static shared Module_resolution_using_rootDirs_has_failed(){ return diag(6111, DiagnosticCategory::Message, "Module_resolution_using_rootDirs_has_failed_6111", "Module resolution using 'rootDirs' has failed."); }; - static shared Do_not_emit_use_strict_directives_in_module_output(){ return diag(6112, DiagnosticCategory::Message, "Do_not_emit_use_strict_directives_in_module_output_6112", "Do not emit 'use strict' directives in module output."); }; - static shared Enable_strict_null_checks(){ return diag(6113, DiagnosticCategory::Message, "Enable_strict_null_checks_6113", "Enable strict null checks."); }; - static shared Unknown_option_excludes_Did_you_mean_exclude(){ return diag(6114, DiagnosticCategory::Error, "Unknown_option_excludes_Did_you_mean_exclude_6114", "Unknown option 'excludes'. Did you mean 'exclude'?"); }; - static shared Raise_error_on_this_expressions_with_an_implied_any_type(){ return diag(6115, DiagnosticCategory::Message, "Raise_error_on_this_expressions_with_an_implied_any_type_6115", "Raise error on 'this' expressions with an implied 'any' type."); }; - static shared Resolving_type_reference_directive_0_containing_file_1_root_directory_2(){ return diag(6116, DiagnosticCategory::Message, "Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116", "======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========"); }; - static shared Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2(){ return diag(6119, DiagnosticCategory::Message, "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119", "======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========"); }; - static shared Type_reference_directive_0_was_not_resolved(){ return diag(6120, DiagnosticCategory::Message, "Type_reference_directive_0_was_not_resolved_6120", "======== Type reference directive '{0}' was not resolved. ========"); }; - static shared Resolving_with_primary_search_path_0(){ return diag(6121, DiagnosticCategory::Message, "Resolving_with_primary_search_path_0_6121", "Resolving with primary search path '{0}'."); }; - static shared Root_directory_cannot_be_determined_skipping_primary_search_paths(){ return diag(6122, DiagnosticCategory::Message, "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122", "Root directory cannot be determined, skipping primary search paths."); }; - static shared Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set(){ return diag(6123, DiagnosticCategory::Message, "Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123", "======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========"); }; - static shared Type_declaration_files_to_be_included_in_compilation(){ return diag(6124, DiagnosticCategory::Message, "Type_declaration_files_to_be_included_in_compilation_6124", "Type declaration files to be included in compilation."); }; - static shared Looking_up_in_node_modules_folder_initial_location_0(){ return diag(6125, DiagnosticCategory::Message, "Looking_up_in_node_modules_folder_initial_location_0_6125", "Looking up in 'node_modules' folder, initial location '{0}'."); }; - static shared Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder(){ return diag(6126, DiagnosticCategory::Message, "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126", "Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder."); }; - static shared Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1(){ return diag(6127, DiagnosticCategory::Message, "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127", "======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========"); }; - static shared Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set(){ return diag(6128, DiagnosticCategory::Message, "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128", "======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========"); }; - static shared Resolving_real_path_for_0_result_1(){ return diag(6130, DiagnosticCategory::Message, "Resolving_real_path_for_0_result_1_6130", "Resolving real path for '{0}', result '{1}'."); }; - static shared Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system(){ return diag(6131, DiagnosticCategory::Error, "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131", "Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'."); }; - static shared File_name_0_has_a_1_extension_stripping_it(){ return diag(6132, DiagnosticCategory::Message, "File_name_0_has_a_1_extension_stripping_it_6132", "File name '{0}' has a '{1}' extension - stripping it."); }; - static shared _0_is_declared_but_its_value_is_never_read(){ return diag(6133, DiagnosticCategory::Error, "_0_is_declared_but_its_value_is_never_read_6133", "'{0}' is declared but its value is never read.", /*reportsUnnecessary*/ true); }; - static shared Report_errors_on_unused_locals(){ return diag(6134, DiagnosticCategory::Message, "Report_errors_on_unused_locals_6134", "Report errors on unused locals."); }; - static shared Report_errors_on_unused_parameters(){ return diag(6135, DiagnosticCategory::Message, "Report_errors_on_unused_parameters_6135", "Report errors on unused parameters."); }; - static shared The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files(){ return diag(6136, DiagnosticCategory::Message, "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136", "The maximum dependency depth to search under node_modules and load JavaScript files."); }; - static shared Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1(){ return diag(6137, DiagnosticCategory::Error, "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137", "Cannot import type declaration files. Consider importing '{0}' instead of '{1}'."); }; - static shared Property_0_is_declared_but_its_value_is_never_read(){ return diag(6138, DiagnosticCategory::Error, "Property_0_is_declared_but_its_value_is_never_read_6138", "Property '{0}' is declared but its value is never read.", /*reportsUnnecessary*/ true); }; - static shared Import_emit_helpers_from_tslib(){ return diag(6139, DiagnosticCategory::Message, "Import_emit_helpers_from_tslib_6139", "Import emit helpers from 'tslib'."); }; - static shared Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2(){ return diag(6140, DiagnosticCategory::Error, "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140", "Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'."); }; - static shared Parse_in_strict_mode_and_emit_use_strict_for_each_source_file(){ return diag(6141, DiagnosticCategory::Message, "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141", "Parse in strict mode and emit \"use strict\" for each source file."); }; - static shared Module_0_was_resolved_to_1_but_jsx_is_not_set(){ return diag(6142, DiagnosticCategory::Error, "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142", "Module '{0}' was resolved to '{1}', but '--jsx' is not set."); }; - static shared Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1(){ return diag(6144, DiagnosticCategory::Message, "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144", "Module '{0}' was resolved as locally declared ambient module in file '{1}'."); }; - static shared Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified(){ return diag(6145, DiagnosticCategory::Message, "Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145", "Module '{0}' was resolved as ambient module declared in '{1}' since this file was not modified."); }; - static shared Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h(){ return diag(6146, DiagnosticCategory::Message, "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146", "Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'."); }; - static shared Resolution_for_module_0_was_found_in_cache_from_location_1(){ return diag(6147, DiagnosticCategory::Message, "Resolution_for_module_0_was_found_in_cache_from_location_1_6147", "Resolution for module '{0}' was found in cache from location '{1}'."); }; - static shared Directory_0_does_not_exist_skipping_all_lookups_in_it(){ return diag(6148, DiagnosticCategory::Message, "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148", "Directory '{0}' does not exist, skipping all lookups in it."); }; - static shared Show_diagnostic_information(){ return diag(6149, DiagnosticCategory::Message, "Show_diagnostic_information_6149", "Show diagnostic information."); }; - static shared Show_verbose_diagnostic_information(){ return diag(6150, DiagnosticCategory::Message, "Show_verbose_diagnostic_information_6150", "Show verbose diagnostic information."); }; - static shared Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file(){ return diag(6151, DiagnosticCategory::Message, "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151", "Emit a single file with source maps instead of having a separate file."); }; - static shared Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set(){ return diag(6152, DiagnosticCategory::Message, "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152", "Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set."); }; - static shared Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule(){ return diag(6153, DiagnosticCategory::Message, "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153", "Transpile each file as a separate module (similar to 'ts.transpileModule')."); }; - static shared Print_names_of_generated_files_part_of_the_compilation(){ return diag(6154, DiagnosticCategory::Message, "Print_names_of_generated_files_part_of_the_compilation_6154", "Print names of generated files part of the compilation."); }; - static shared Print_names_of_files_part_of_the_compilation(){ return diag(6155, DiagnosticCategory::Message, "Print_names_of_files_part_of_the_compilation_6155", "Print names of files part of the compilation."); }; - static shared The_locale_used_when_displaying_messages_to_the_user_e_g_en_us(){ return diag(6156, DiagnosticCategory::Message, "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156", "The locale used when displaying messages to the user (e.g. 'en-us')"); }; - static shared Do_not_generate_custom_helper_functions_like_extends_in_compiled_output(){ return diag(6157, DiagnosticCategory::Message, "Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157", "Do not generate custom helper functions like '__extends' in compiled output."); }; - static shared Do_not_include_the_default_library_file_lib_d_ts(){ return diag(6158, DiagnosticCategory::Message, "Do_not_include_the_default_library_file_lib_d_ts_6158", "Do not include the default library file (lib.d.ts)."); }; - static shared Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files(){ return diag(6159, DiagnosticCategory::Message, "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159", "Do not add triple-slash references or imported modules to the list of compiled files."); }; - static shared Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files(){ return diag(6160, DiagnosticCategory::Message, "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160", "[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files."); }; - static shared List_of_folders_to_include_type_definitions_from(){ return diag(6161, DiagnosticCategory::Message, "List_of_folders_to_include_type_definitions_from_6161", "List of folders to include type definitions from."); }; - static shared Disable_size_limitations_on_JavaScript_projects(){ return diag(6162, DiagnosticCategory::Message, "Disable_size_limitations_on_JavaScript_projects_6162", "Disable size limitations on JavaScript projects."); }; - static shared The_character_set_of_the_input_files(){ return diag(6163, DiagnosticCategory::Message, "The_character_set_of_the_input_files_6163", "The character set of the input files."); }; - static shared Do_not_truncate_error_messages(){ return diag(6165, DiagnosticCategory::Message, "Do_not_truncate_error_messages_6165", "Do not truncate error messages."); }; - static shared Output_directory_for_generated_declaration_files(){ return diag(6166, DiagnosticCategory::Message, "Output_directory_for_generated_declaration_files_6166", "Output directory for generated declaration files."); }; - static shared A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl(){ return diag(6167, DiagnosticCategory::Message, "A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167", "A series of entries which re-map imports to lookup locations relative to the 'baseUrl'."); }; - static shared List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime(){ return diag(6168, DiagnosticCategory::Message, "List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168", "List of root folders whose combined content represents the structure of the project at runtime."); }; - static shared Show_all_compiler_options(){ return diag(6169, DiagnosticCategory::Message, "Show_all_compiler_options_6169", "Show all compiler options."); }; - static shared Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file(){ return diag(6170, DiagnosticCategory::Message, "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170", "[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file"); }; - static shared Command_line_Options(){ return diag(6171, DiagnosticCategory::Message, "Command_line_Options_6171", "Command-line Options"); }; - static shared Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3(){ return diag(6179, DiagnosticCategory::Message, "Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3_6179", "Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'."); }; - static shared Enable_all_strict_type_checking_options(){ return diag(6180, DiagnosticCategory::Message, "Enable_all_strict_type_checking_options_6180", "Enable all strict type-checking options."); }; - static shared List_of_language_service_plugins(){ return diag(6181, DiagnosticCategory::Message, "List_of_language_service_plugins_6181", "List of language service plugins."); }; - static shared Scoped_package_detected_looking_in_0(){ return diag(6182, DiagnosticCategory::Message, "Scoped_package_detected_looking_in_0_6182", "Scoped package detected, looking in '{0}'"); }; - static shared Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2(){ return diag(6183, DiagnosticCategory::Message, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_6183", "Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."); }; - static shared Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3(){ return diag(6184, DiagnosticCategory::Message, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package__6184", "Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."); }; - static shared Enable_strict_checking_of_function_types(){ return diag(6186, DiagnosticCategory::Message, "Enable_strict_checking_of_function_types_6186", "Enable strict checking of function types."); }; - static shared Enable_strict_checking_of_property_initialization_in_classes(){ return diag(6187, DiagnosticCategory::Message, "Enable_strict_checking_of_property_initialization_in_classes_6187", "Enable strict checking of property initialization in classes."); }; - static shared Numeric_separators_are_not_allowed_here(){ return diag(6188, DiagnosticCategory::Error, "Numeric_separators_are_not_allowed_here_6188", "Numeric separators are not allowed here."); }; - static shared Multiple_consecutive_numeric_separators_are_not_permitted(){ return diag(6189, DiagnosticCategory::Error, "Multiple_consecutive_numeric_separators_are_not_permitted_6189", "Multiple consecutive numeric separators are not permitted."); }; - static shared Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen(){ return diag(6191, DiagnosticCategory::Message, "Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191", "Whether to keep outdated console output in watch mode instead of clearing the screen."); }; - static shared All_imports_in_import_declaration_are_unused(){ return diag(6192, DiagnosticCategory::Error, "All_imports_in_import_declaration_are_unused_6192", "All imports in import declaration are unused.", /*reportsUnnecessary*/ true); }; - static shared Found_1_error_Watching_for_file_changes(){ return diag(6193, DiagnosticCategory::Message, "Found_1_error_Watching_for_file_changes_6193", "Found 1 error. Watching for file changes."); }; - static shared Found_0_errors_Watching_for_file_changes(){ return diag(6194, DiagnosticCategory::Message, "Found_0_errors_Watching_for_file_changes_6194", "Found {0} errors. Watching for file changes."); }; - static shared Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols(){ return diag(6195, DiagnosticCategory::Message, "Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols_6195", "Resolve 'keyof' to string valued property names only (no numbers or symbols)."); }; - static shared _0_is_declared_but_never_used(){ return diag(6196, DiagnosticCategory::Error, "_0_is_declared_but_never_used_6196", "'{0}' is declared but never used.", /*reportsUnnecessary*/ true); }; - static shared Include_modules_imported_with_json_extension(){ return diag(6197, DiagnosticCategory::Message, "Include_modules_imported_with_json_extension_6197", "Include modules imported with '.json' extension"); }; - static shared All_destructured_elements_are_unused(){ return diag(6198, DiagnosticCategory::Error, "All_destructured_elements_are_unused_6198", "All destructured elements are unused.", /*reportsUnnecessary*/ true); }; - static shared All_variables_are_unused(){ return diag(6199, DiagnosticCategory::Error, "All_variables_are_unused_6199", "All variables are unused.", /*reportsUnnecessary*/ true); }; - static shared Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0(){ return diag(6200, DiagnosticCategory::Error, "Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200", "Definitions of the following identifiers conflict with those in another file: {0}"); }; - static shared Conflicts_are_in_this_file(){ return diag(6201, DiagnosticCategory::Message, "Conflicts_are_in_this_file_6201", "Conflicts are in this file."); }; - static shared Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0(){ return diag(6202, DiagnosticCategory::Error, "Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202", "Project references may not form a circular graph. Cycle detected: {0}"); }; - static shared _0_was_also_declared_here(){ return diag(6203, DiagnosticCategory::Message, "_0_was_also_declared_here_6203", "'{0}' was also declared here."); }; - static shared and_here(){ return diag(6204, DiagnosticCategory::Message, "and_here_6204", "and here."); }; - static shared All_type_parameters_are_unused(){ return diag(6205, DiagnosticCategory::Error, "All_type_parameters_are_unused_6205", "All type parameters are unused."); }; - static shared package_json_has_a_typesVersions_field_with_version_specific_path_mappings(){ return diag(6206, DiagnosticCategory::Message, "package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206", "'package.json' has a 'typesVersions' field with version-specific path mappings."); }; - static shared package_json_does_not_have_a_typesVersions_entry_that_matches_version_0(){ return diag(6207, DiagnosticCategory::Message, "package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207", "'package.json' does not have a 'typesVersions' entry that matches version '{0}'."); }; - static shared package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2(){ return diag(6208, DiagnosticCategory::Message, "package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208", "'package.json' has a 'typesVersions' entry '{0}' that matches compiler version '{1}', looking for a pattern to match module name '{2}'."); }; - static shared package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range(){ return diag(6209, DiagnosticCategory::Message, "package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209", "'package.json' has a 'typesVersions' entry '{0}' that is not a valid semver range."); }; - static shared An_argument_for_0_was_not_provided(){ return diag(6210, DiagnosticCategory::Message, "An_argument_for_0_was_not_provided_6210", "An argument for '{0}' was not provided."); }; - static shared An_argument_matching_this_binding_pattern_was_not_provided(){ return diag(6211, DiagnosticCategory::Message, "An_argument_matching_this_binding_pattern_was_not_provided_6211", "An argument matching this binding pattern was not provided."); }; - static shared Did_you_mean_to_call_this_expression(){ return diag(6212, DiagnosticCategory::Message, "Did_you_mean_to_call_this_expression_6212", "Did you mean to call this expression?"); }; - static shared Did_you_mean_to_use_new_with_this_expression(){ return diag(6213, DiagnosticCategory::Message, "Did_you_mean_to_use_new_with_this_expression_6213", "Did you mean to use 'new' with this expression?"); }; - static shared Enable_strict_bind_call_and_apply_methods_on_functions(){ return diag(6214, DiagnosticCategory::Message, "Enable_strict_bind_call_and_apply_methods_on_functions_6214", "Enable strict 'bind', 'call', and 'apply' methods on functions."); }; - static shared Using_compiler_options_of_project_reference_redirect_0(){ return diag(6215, DiagnosticCategory::Message, "Using_compiler_options_of_project_reference_redirect_0_6215", "Using compiler options of project reference redirect '{0}'."); }; - static shared Found_1_error(){ return diag(6216, DiagnosticCategory::Message, "Found_1_error_6216", "Found 1 error."); }; - static shared Found_0_errors(){ return diag(6217, DiagnosticCategory::Message, "Found_0_errors_6217", "Found {0} errors."); }; - static shared Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2(){ return diag(6218, DiagnosticCategory::Message, "Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218", "======== Module name '{0}' was successfully resolved to '{1}' with Package ID '{2}'. ========"); }; - static shared Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3(){ return diag(6219, DiagnosticCategory::Message, "Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219", "======== Type reference directive '{0}' was successfully resolved to '{1}' with Package ID '{2}', primary: {3}. ========"); }; - static shared package_json_had_a_falsy_0_field(){ return diag(6220, DiagnosticCategory::Message, "package_json_had_a_falsy_0_field_6220", "'package.json' had a falsy '{0}' field."); }; - static shared Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects(){ return diag(6221, DiagnosticCategory::Message, "Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221", "Disable use of source files instead of declaration files from referenced projects."); }; - static shared Emit_class_fields_with_Define_instead_of_Set(){ return diag(6222, DiagnosticCategory::Message, "Emit_class_fields_with_Define_instead_of_Set_6222", "Emit class fields with Define instead of Set."); }; - static shared Generates_a_CPU_profile(){ return diag(6223, DiagnosticCategory::Message, "Generates_a_CPU_profile_6223", "Generates a CPU profile."); }; - static shared Disable_solution_searching_for_this_project(){ return diag(6224, DiagnosticCategory::Message, "Disable_solution_searching_for_this_project_6224", "Disable solution searching for this project."); }; - static shared Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling_UseFsEvents_UseFsEventsOnParentDirectory(){ return diag(6225, DiagnosticCategory::Message, "Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225", + static shared_ptr Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node12_or_nodenext_Did_you_mean_0(){ return diag(2835, DiagnosticCategory::Error, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?"); }; + static shared_ptr Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls(){ return diag(2836, DiagnosticCategory::Error, "Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836", "Import assertions are not allowed on statements that transpile to commonjs 'require' calls."); }; + static shared_ptr Import_declaration_0_is_using_private_name_1(){ return diag(4000, DiagnosticCategory::Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."); }; + static shared_ptr Type_parameter_0_of_exported_class_has_or_is_using_private_name_1(){ return diag(4002, DiagnosticCategory::Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."); }; + static shared_ptr Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1(){ return diag(4004, DiagnosticCategory::Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."); }; + static shared_ptr Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1(){ return diag(4006, DiagnosticCategory::Error, "Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4006", "Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."); }; + static shared_ptr Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1(){ return diag(4008, DiagnosticCategory::Error, "Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008", "Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'."); }; + static shared_ptr Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1(){ return diag(4010, DiagnosticCategory::Error, "Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010", "Type parameter '{0}' of public static method from exported class has or is using private name '{1}'."); }; + static shared_ptr Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1(){ return diag(4012, DiagnosticCategory::Error, "Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012", "Type parameter '{0}' of public method from exported class has or is using private name '{1}'."); }; + static shared_ptr Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1(){ return diag(4014, DiagnosticCategory::Error, "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014", "Type parameter '{0}' of method from exported interface has or is using private name '{1}'."); }; + static shared_ptr Type_parameter_0_of_exported_function_has_or_is_using_private_name_1(){ return diag(4016, DiagnosticCategory::Error, "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016", "Type parameter '{0}' of exported function has or is using private name '{1}'."); }; + static shared_ptr Implements_clause_of_exported_class_0_has_or_is_using_private_name_1(){ return diag(4019, DiagnosticCategory::Error, "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019", "Implements clause of exported class '{0}' has or is using private name '{1}'."); }; + static shared_ptr extends_clause_of_exported_class_0_has_or_is_using_private_name_1(){ return diag(4020, DiagnosticCategory::Error, "extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020", "'extends' clause of exported class '{0}' has or is using private name '{1}'."); }; + static shared_ptr extends_clause_of_exported_class_has_or_is_using_private_name_0(){ return diag(4021, DiagnosticCategory::Error, "extends_clause_of_exported_class_has_or_is_using_private_name_0_4021", "'extends' clause of exported class has or is using private name '{0}'."); }; + static shared_ptr extends_clause_of_exported_interface_0_has_or_is_using_private_name_1(){ return diag(4022, DiagnosticCategory::Error, "extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022", "'extends' clause of exported interface '{0}' has or is using private name '{1}'."); }; + static shared_ptr Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named(){ return diag(4023, DiagnosticCategory::Error, "Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023", "Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named."); }; + static shared_ptr Exported_variable_0_has_or_is_using_name_1_from_private_module_2(){ return diag(4024, DiagnosticCategory::Error, "Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024", "Exported variable '{0}' has or is using name '{1}' from private module '{2}'."); }; + static shared_ptr Exported_variable_0_has_or_is_using_private_name_1(){ return diag(4025, DiagnosticCategory::Error, "Exported_variable_0_has_or_is_using_private_name_1_4025", "Exported variable '{0}' has or is using private name '{1}'."); }; + static shared_ptr Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named(){ return diag(4026, DiagnosticCategory::Error, "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026", "Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."); }; + static shared_ptr Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2(){ return diag(4027, DiagnosticCategory::Error, "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027", "Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'."); }; + static shared_ptr Public_static_property_0_of_exported_class_has_or_is_using_private_name_1(){ return diag(4028, DiagnosticCategory::Error, "Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028", "Public static property '{0}' of exported class has or is using private name '{1}'."); }; + static shared_ptr Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named(){ return diag(4029, DiagnosticCategory::Error, "Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_name_4029", "Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."); }; + static shared_ptr Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2(){ return diag(4030, DiagnosticCategory::Error, "Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4030", "Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'."); }; + static shared_ptr Public_property_0_of_exported_class_has_or_is_using_private_name_1(){ return diag(4031, DiagnosticCategory::Error, "Public_property_0_of_exported_class_has_or_is_using_private_name_1_4031", "Public property '{0}' of exported class has or is using private name '{1}'."); }; + static shared_ptr Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2(){ return diag(4032, DiagnosticCategory::Error, "Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032", "Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'."); }; + static shared_ptr Property_0_of_exported_interface_has_or_is_using_private_name_1(){ return diag(4033, DiagnosticCategory::Error, "Property_0_of_exported_interface_has_or_is_using_private_name_1_4033", "Property '{0}' of exported interface has or is using private name '{1}'."); }; + static shared_ptr Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2(){ return diag(4034, DiagnosticCategory::Error, "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034", "Parameter type of public static setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."); }; + static shared_ptr Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1(){ return diag(4035, DiagnosticCategory::Error, "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1_4035", "Parameter type of public static setter '{0}' from exported class has or is using private name '{1}'."); }; + static shared_ptr Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2(){ return diag(4036, DiagnosticCategory::Error, "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036", "Parameter type of public setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."); }; + static shared_ptr Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1(){ return diag(4037, DiagnosticCategory::Error, "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037", "Parameter type of public setter '{0}' from exported class has or is using private name '{1}'."); }; + static shared_ptr Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named(){ return diag(4038, DiagnosticCategory::Error, "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_modul_4038", "Return type of public static getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."); }; + static shared_ptr Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2(){ return diag(4039, DiagnosticCategory::Error, "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_4039", "Return type of public static getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."); }; + static shared_ptr Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1(){ return diag(4040, DiagnosticCategory::Error, "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1_4040", "Return type of public static getter '{0}' from exported class has or is using private name '{1}'."); }; + static shared_ptr Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named(){ return diag(4041, DiagnosticCategory::Error, "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_4041", "Return type of public getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."); }; + static shared_ptr Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2(){ return diag(4042, DiagnosticCategory::Error, "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4042", "Return type of public getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."); }; + static shared_ptr Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1(){ return diag(4043, DiagnosticCategory::Error, "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1_4043", "Return type of public getter '{0}' from exported class has or is using private name '{1}'."); }; + static shared_ptr Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1(){ return diag(4044, DiagnosticCategory::Error, "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044", "Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'."); }; + static shared_ptr Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0(){ return diag(4045, DiagnosticCategory::Error, "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0_4045", "Return type of constructor signature from exported interface has or is using private name '{0}'."); }; + static shared_ptr Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1(){ return diag(4046, DiagnosticCategory::Error, "Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046", "Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'."); }; + static shared_ptr Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0(){ return diag(4047, DiagnosticCategory::Error, "Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047", "Return type of call signature from exported interface has or is using private name '{0}'."); }; + static shared_ptr Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1(){ return diag(4048, DiagnosticCategory::Error, "Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4048", "Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'."); }; + static shared_ptr Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0(){ return diag(4049, DiagnosticCategory::Error, "Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0_4049", "Return type of index signature from exported interface has or is using private name '{0}'."); }; + static shared_ptr Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named(){ return diag(4050, DiagnosticCategory::Error, "Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module__4050", "Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named."); }; + static shared_ptr Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1(){ return diag(4051, DiagnosticCategory::Error, "Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4051", "Return type of public static method from exported class has or is using name '{0}' from private module '{1}'."); }; + static shared_ptr Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0(){ return diag(4052, DiagnosticCategory::Error, "Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0_4052", "Return type of public static method from exported class has or is using private name '{0}'."); }; + static shared_ptr Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named(){ return diag(4053, DiagnosticCategory::Error, "Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_c_4053", "Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named."); }; + static shared_ptr Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1(){ return diag(4054, DiagnosticCategory::Error, "Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4054", "Return type of public method from exported class has or is using name '{0}' from private module '{1}'."); }; + static shared_ptr Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0(){ return diag(4055, DiagnosticCategory::Error, "Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0_4055", "Return type of public method from exported class has or is using private name '{0}'."); }; + static shared_ptr Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1(){ return diag(4056, DiagnosticCategory::Error, "Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4056", "Return type of method from exported interface has or is using name '{0}' from private module '{1}'."); }; + static shared_ptr Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0(){ return diag(4057, DiagnosticCategory::Error, "Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0_4057", "Return type of method from exported interface has or is using private name '{0}'."); }; + static shared_ptr Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named(){ return diag(4058, DiagnosticCategory::Error, "Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named_4058", "Return type of exported function has or is using name '{0}' from external module {1} but cannot be named."); }; + static shared_ptr Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1(){ return diag(4059, DiagnosticCategory::Error, "Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1_4059", "Return type of exported function has or is using name '{0}' from private module '{1}'."); }; + static shared_ptr Return_type_of_exported_function_has_or_is_using_private_name_0(){ return diag(4060, DiagnosticCategory::Error, "Return_type_of_exported_function_has_or_is_using_private_name_0_4060", "Return type of exported function has or is using private name '{0}'."); }; + static shared_ptr Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named(){ return diag(4061, DiagnosticCategory::Error, "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061", "Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named."); }; + static shared_ptr Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2(){ return diag(4062, DiagnosticCategory::Error, "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2_4062", "Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'."); }; + static shared_ptr Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1(){ return diag(4063, DiagnosticCategory::Error, "Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1_4063", "Parameter '{0}' of constructor from exported class has or is using private name '{1}'."); }; + static shared_ptr Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2(){ return diag(4064, DiagnosticCategory::Error, "Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_mod_4064", "Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'."); }; + static shared_ptr Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1(){ return diag(4065, DiagnosticCategory::Error, "Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4065", "Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."); }; + static shared_ptr Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2(){ return diag(4066, DiagnosticCategory::Error, "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066", "Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'."); }; + static shared_ptr Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1(){ return diag(4067, DiagnosticCategory::Error, "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067", "Parameter '{0}' of call signature from exported interface has or is using private name '{1}'."); }; + static shared_ptr Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named(){ return diag(4068, DiagnosticCategory::Error, "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module__4068", "Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named."); }; + static shared_ptr Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2(){ return diag(4069, DiagnosticCategory::Error, "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4069", "Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'."); }; + static shared_ptr Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1(){ return diag(4070, DiagnosticCategory::Error, "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070", "Parameter '{0}' of public static method from exported class has or is using private name '{1}'."); }; + static shared_ptr Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named(){ return diag(4071, DiagnosticCategory::Error, "Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_c_4071", "Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named."); }; + static shared_ptr Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2(){ return diag(4072, DiagnosticCategory::Error, "Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4072", "Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'."); }; + static shared_ptr Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1(){ return diag(4073, DiagnosticCategory::Error, "Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4073", "Parameter '{0}' of public method from exported class has or is using private name '{1}'."); }; + static shared_ptr Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2(){ return diag(4074, DiagnosticCategory::Error, "Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4074", "Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'."); }; + static shared_ptr Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1(){ return diag(4075, DiagnosticCategory::Error, "Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4075", "Parameter '{0}' of method from exported interface has or is using private name '{1}'."); }; + static shared_ptr Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named(){ return diag(4076, DiagnosticCategory::Error, "Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4076", "Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named."); }; + static shared_ptr Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2(){ return diag(4077, DiagnosticCategory::Error, "Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2_4077", "Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'."); }; + static shared_ptr Parameter_0_of_exported_function_has_or_is_using_private_name_1(){ return diag(4078, DiagnosticCategory::Error, "Parameter_0_of_exported_function_has_or_is_using_private_name_1_4078", "Parameter '{0}' of exported function has or is using private name '{1}'."); }; + static shared_ptr Exported_type_alias_0_has_or_is_using_private_name_1(){ return diag(4081, DiagnosticCategory::Error, "Exported_type_alias_0_has_or_is_using_private_name_1_4081", "Exported type alias '{0}' has or is using private name '{1}'."); }; + static shared_ptr Default_export_of_the_module_has_or_is_using_private_name_0(){ return diag(4082, DiagnosticCategory::Error, "Default_export_of_the_module_has_or_is_using_private_name_0_4082", "Default export of the module has or is using private name '{0}'."); }; + static shared_ptr Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1(){ return diag(4083, DiagnosticCategory::Error, "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083", "Type parameter '{0}' of exported type alias has or is using private name '{1}'."); }; + static shared_ptr Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2(){ return diag(4084, DiagnosticCategory::Error, "Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2_4084", "Exported type alias '{0}' has or is using private name '{1}' from module {2}."); }; + static shared_ptr Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_library_to_resolve_the_conflict(){ return diag(4090, DiagnosticCategory::Error, "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090", "Conflicting definitions for '{0}' found at '{1}' and '{2}'. Consider installing a specific version of this library to resolve the conflict."); }; + static shared_ptr Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2(){ return diag(4091, DiagnosticCategory::Error, "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091", "Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'."); }; + static shared_ptr Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1(){ return diag(4092, DiagnosticCategory::Error, "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092", "Parameter '{0}' of index signature from exported interface has or is using private name '{1}'."); }; + static shared_ptr Property_0_of_exported_class_expression_may_not_be_private_or_protected(){ return diag(4094, DiagnosticCategory::Error, "Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094", "Property '{0}' of exported class expression may not be private or protected."); }; + static shared_ptr Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named(){ return diag(4095, DiagnosticCategory::Error, "Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_4095", "Public static method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."); }; + static shared_ptr Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2(){ return diag(4096, DiagnosticCategory::Error, "Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4096", "Public static method '{0}' of exported class has or is using name '{1}' from private module '{2}'."); }; + static shared_ptr Public_static_method_0_of_exported_class_has_or_is_using_private_name_1(){ return diag(4097, DiagnosticCategory::Error, "Public_static_method_0_of_exported_class_has_or_is_using_private_name_1_4097", "Public static method '{0}' of exported class has or is using private name '{1}'."); }; + static shared_ptr Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named(){ return diag(4098, DiagnosticCategory::Error, "Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4098", "Public method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."); }; + static shared_ptr Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2(){ return diag(4099, DiagnosticCategory::Error, "Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4099", "Public method '{0}' of exported class has or is using name '{1}' from private module '{2}'."); }; + static shared_ptr Public_method_0_of_exported_class_has_or_is_using_private_name_1(){ return diag(4100, DiagnosticCategory::Error, "Public_method_0_of_exported_class_has_or_is_using_private_name_1_4100", "Public method '{0}' of exported class has or is using private name '{1}'."); }; + static shared_ptr Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2(){ return diag(4101, DiagnosticCategory::Error, "Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101", "Method '{0}' of exported interface has or is using name '{1}' from private module '{2}'."); }; + static shared_ptr Method_0_of_exported_interface_has_or_is_using_private_name_1(){ return diag(4102, DiagnosticCategory::Error, "Method_0_of_exported_interface_has_or_is_using_private_name_1_4102", "Method '{0}' of exported interface has or is using private name '{1}'."); }; + static shared_ptr Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1(){ return diag(4103, DiagnosticCategory::Error, "Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103", "Type parameter '{0}' of exported mapped object type is using private name '{1}'."); }; + static shared_ptr The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1(){ return diag(4104, DiagnosticCategory::Error, "The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104", "The type '{0}' is 'readonly' and cannot be assigned to the mutable type '{1}'."); }; + static shared_ptr Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter(){ return diag(4105, DiagnosticCategory::Error, "Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105", "Private or protected member '{0}' cannot be accessed on a type parameter."); }; + static shared_ptr Parameter_0_of_accessor_has_or_is_using_private_name_1(){ return diag(4106, DiagnosticCategory::Error, "Parameter_0_of_accessor_has_or_is_using_private_name_1_4106", "Parameter '{0}' of accessor has or is using private name '{1}'."); }; + static shared_ptr Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2(){ return diag(4107, DiagnosticCategory::Error, "Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107", "Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'."); }; + static shared_ptr Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named(){ return diag(4108, DiagnosticCategory::Error, "Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108", "Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named."); }; + static shared_ptr Type_arguments_for_0_circularly_reference_themselves(){ return diag(4109, DiagnosticCategory::Error, "Type_arguments_for_0_circularly_reference_themselves_4109", "Type arguments for '{0}' circularly reference themselves."); }; + static shared_ptr Tuple_type_arguments_circularly_reference_themselves(){ return diag(4110, DiagnosticCategory::Error, "Tuple_type_arguments_circularly_reference_themselves_4110", "Tuple type arguments circularly reference themselves."); }; + static shared_ptr Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0(){ return diag(4111, DiagnosticCategory::Error, "Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0_4111", "Property '{0}' comes from an index signature, so it must be accessed with ['{0}']."); }; + static shared_ptr This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class(){ return diag(4112, DiagnosticCategory::Error, "This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another__4112", "This member cannot have an 'override' modifier because its containing class '{0}' does not extend another class."); }; + static shared_ptr This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0(){ return diag(4113, DiagnosticCategory::Error, "This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_4113", "This member cannot have an 'override' modifier because it is not declared in the base class '{0}'."); }; + static shared_ptr This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0(){ return diag(4114, DiagnosticCategory::Error, "This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0_4114", "This member must have an 'override' modifier because it overrides a member in the base class '{0}'."); }; + static shared_ptr This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0(){ return diag(4115, DiagnosticCategory::Error, "This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0_4115", "This parameter property must have an 'override' modifier because it overrides a member in base class '{0}'."); }; + static shared_ptr This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0(){ return diag(4116, DiagnosticCategory::Error, "This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116", "This member must have an 'override' modifier because it overrides an abstract method that is declared in the base class '{0}'."); }; + static shared_ptr This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1(){ return diag(4117, DiagnosticCategory::Error, "This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117", "This member cannot have an 'override' modifier because it is not declared in the base class '{0}'. Did you mean '{1}'?"); }; + static shared_ptr The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized(){ return diag(4118, DiagnosticCategory::Error, "The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized_4118", "The type of this node cannot be serialized because its property '{0}' cannot be serialized."); }; + static shared_ptr This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0(){ return diag(4119, DiagnosticCategory::Error, "This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119", "This member must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."); }; + static shared_ptr This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0(){ return diag(4120, DiagnosticCategory::Error, "This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120", "This parameter property must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."); }; + static shared_ptr This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class(){ return diag(4121, DiagnosticCategory::Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121", "This member cannot have a JSDoc comment with an '@override' tag because its containing class '{0}' does not extend another class."); }; + static shared_ptr This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0(){ return diag(4122, DiagnosticCategory::Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122", "This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."); }; + static shared_ptr This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1(){ return diag(4123, DiagnosticCategory::Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123", "This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"); }; + static shared_ptr Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next(){ return diag(4124, DiagnosticCategory::Error, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."); }; + static shared_ptr The_current_host_does_not_support_the_0_option(){ return diag(5001, DiagnosticCategory::Error, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."); }; + static shared_ptr Cannot_find_the_common_subdirectory_path_for_the_input_files(){ return diag(5009, DiagnosticCategory::Error, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."); }; + static shared_ptr File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0(){ return diag(5010, DiagnosticCategory::Error, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."); }; + static shared_ptr Cannot_read_file_0_Colon_1(){ return diag(5012, DiagnosticCategory::Error, "Cannot_read_file_0_Colon_1_5012", "Cannot read file '{0}': {1}."); }; + static shared_ptr Failed_to_parse_file_0_Colon_1(){ return diag(5014, DiagnosticCategory::Error, "Failed_to_parse_file_0_Colon_1_5014", "Failed to parse file '{0}': {1}."); }; + static shared_ptr Unknown_compiler_option_0(){ return diag(5023, DiagnosticCategory::Error, "Unknown_compiler_option_0_5023", "Unknown compiler option '{0}'."); }; + static shared_ptr Compiler_option_0_requires_a_value_of_type_1(){ return diag(5024, DiagnosticCategory::Error, "Compiler_option_0_requires_a_value_of_type_1_5024", "Compiler option '{0}' requires a value of type {1}."); }; + static shared_ptr Unknown_compiler_option_0_Did_you_mean_1(){ return diag(5025, DiagnosticCategory::Error, "Unknown_compiler_option_0_Did_you_mean_1_5025", "Unknown compiler option '{0}'. Did you mean '{1}'?"); }; + static shared_ptr Could_not_write_file_0_Colon_1(){ return diag(5033, DiagnosticCategory::Error, "Could_not_write_file_0_Colon_1_5033", "Could not write file '{0}': {1}."); }; + static shared_ptr Option_project_cannot_be_mixed_with_source_files_on_a_command_line(){ return diag(5042, DiagnosticCategory::Error, "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042", "Option 'project' cannot be mixed with source files on a command line."); }; + static shared_ptr Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher(){ return diag(5047, DiagnosticCategory::Error, "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047", "Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher."); }; + static shared_ptr Option_0_cannot_be_specified_when_option_target_is_ES3(){ return diag(5048, DiagnosticCategory::Error, "Option_0_cannot_be_specified_when_option_target_is_ES3_5048", "Option '{0}' cannot be specified when option 'target' is 'ES3'."); }; + static shared_ptr Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided(){ return diag(5051, DiagnosticCategory::Error, "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051", "Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided."); }; + static shared_ptr Option_0_cannot_be_specified_without_specifying_option_1(){ return diag(5052, DiagnosticCategory::Error, "Option_0_cannot_be_specified_without_specifying_option_1_5052", "Option '{0}' cannot be specified without specifying option '{1}'."); }; + static shared_ptr Option_0_cannot_be_specified_with_option_1(){ return diag(5053, DiagnosticCategory::Error, "Option_0_cannot_be_specified_with_option_1_5053", "Option '{0}' cannot be specified with option '{1}'."); }; + static shared_ptr A_tsconfig_json_file_is_already_defined_at_Colon_0(){ return diag(5054, DiagnosticCategory::Error, "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054", "A 'tsconfig.json' file is already defined at: '{0}'."); }; + static shared_ptr Cannot_write_file_0_because_it_would_overwrite_input_file(){ return diag(5055, DiagnosticCategory::Error, "Cannot_write_file_0_because_it_would_overwrite_input_file_5055", "Cannot write file '{0}' because it would overwrite input file."); }; + static shared_ptr Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files(){ return diag(5056, DiagnosticCategory::Error, "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056", "Cannot write file '{0}' because it would be overwritten by multiple input files."); }; + static shared_ptr Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0(){ return diag(5057, DiagnosticCategory::Error, "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057", "Cannot find a tsconfig.json file at the specified directory: '{0}'."); }; + static shared_ptr The_specified_path_does_not_exist_Colon_0(){ return diag(5058, DiagnosticCategory::Error, "The_specified_path_does_not_exist_Colon_0_5058", "The specified path does not exist: '{0}'."); }; + static shared_ptr Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier(){ return diag(5059, DiagnosticCategory::Error, "Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059", "Invalid value for '--reactNamespace'. '{0}' is not a valid identifier."); }; + static shared_ptr Pattern_0_can_have_at_most_one_Asterisk_character(){ return diag(5061, DiagnosticCategory::Error, "Pattern_0_can_have_at_most_one_Asterisk_character_5061", "Pattern '{0}' can have at most one '*' character."); }; + static shared_ptr Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character(){ return diag(5062, DiagnosticCategory::Error, "Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062", "Substitution '{0}' in pattern '{1}' can have at most one '*' character."); }; + static shared_ptr Substitutions_for_pattern_0_should_be_an_array(){ return diag(5063, DiagnosticCategory::Error, "Substitutions_for_pattern_0_should_be_an_array_5063", "Substitutions for pattern '{0}' should be an array."); }; + static shared_ptr Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2(){ return diag(5064, DiagnosticCategory::Error, "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064", "Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'."); }; + static shared_ptr File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0(){ return diag(5065, DiagnosticCategory::Error, "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065", "File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'."); }; + static shared_ptr Substitutions_for_pattern_0_shouldn_t_be_an_empty_array(){ return diag(5066, DiagnosticCategory::Error, "Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066", "Substitutions for pattern '{0}' shouldn't be an empty array."); }; + static shared_ptr Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name(){ return diag(5067, DiagnosticCategory::Error, "Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name_5067", "Invalid value for 'jsxFactory'. '{0}' is not a valid identifier or qualified-name."); }; + static shared_ptr 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(){ return diag(5068, DiagnosticCategory::Error, "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068", "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig."); }; + static shared_ptr Option_0_cannot_be_specified_without_specifying_option_1_or_option_2(){ return diag(5069, DiagnosticCategory::Error, "Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069", "Option '{0}' cannot be specified without specifying option '{1}' or option '{2}'."); }; + static shared_ptr Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy(){ return diag(5070, DiagnosticCategory::Error, "Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy_5070", "Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy."); }; + static shared_ptr Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_esNext(){ return diag(5071, DiagnosticCategory::Error, "Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_5071", "Option '--resolveJsonModule' can only be specified when module code generation is 'commonjs', 'amd', 'es2015' or 'esNext'."); }; + static shared_ptr Unknown_build_option_0(){ return diag(5072, DiagnosticCategory::Error, "Unknown_build_option_0_5072", "Unknown build option '{0}'."); }; + static shared_ptr Build_option_0_requires_a_value_of_type_1(){ return diag(5073, DiagnosticCategory::Error, "Build_option_0_requires_a_value_of_type_1_5073", "Build option '{0}' requires a value of type {1}."); }; + static shared_ptr Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified(){ return diag(5074, DiagnosticCategory::Error, "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074", "Option '--incremental' can only be specified using tsconfig, emitting to single file or when option '--tsBuildInfoFile' is specified."); }; + static shared_ptr _0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2(){ return diag(5075, DiagnosticCategory::Error, "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075", "'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'."); }; + static shared_ptr _0_and_1_operations_cannot_be_mixed_without_parentheses(){ return diag(5076, DiagnosticCategory::Error, "_0_and_1_operations_cannot_be_mixed_without_parentheses_5076", "'{0}' and '{1}' operations cannot be mixed without parentheses."); }; + static shared_ptr Unknown_build_option_0_Did_you_mean_1(){ return diag(5077, DiagnosticCategory::Error, "Unknown_build_option_0_Did_you_mean_1_5077", "Unknown build option '{0}'. Did you mean '{1}'?"); }; + static shared_ptr Unknown_watch_option_0(){ return diag(5078, DiagnosticCategory::Error, "Unknown_watch_option_0_5078", "Unknown watch option '{0}'."); }; + static shared_ptr Unknown_watch_option_0_Did_you_mean_1(){ return diag(5079, DiagnosticCategory::Error, "Unknown_watch_option_0_Did_you_mean_1_5079", "Unknown watch option '{0}'. Did you mean '{1}'?"); }; + static shared_ptr Watch_option_0_requires_a_value_of_type_1(){ return diag(5080, DiagnosticCategory::Error, "Watch_option_0_requires_a_value_of_type_1_5080", "Watch option '{0}' requires a value of type {1}."); }; + static shared_ptr Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0(){ return diag(5081, DiagnosticCategory::Error, "Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081", "Cannot find a tsconfig.json file at the current directory: {0}."); }; + static shared_ptr _0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1(){ return diag(5082, DiagnosticCategory::Error, "_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1_5082", "'{0}' could be instantiated with an arbitrary type which could be unrelated to '{1}'."); }; + static shared_ptr Cannot_read_file_0(){ return diag(5083, DiagnosticCategory::Error, "Cannot_read_file_0_5083", "Cannot read file '{0}'."); }; + static shared_ptr Tuple_members_must_all_have_names_or_all_not_have_names(){ return diag(5084, DiagnosticCategory::Error, "Tuple_members_must_all_have_names_or_all_not_have_names_5084", "Tuple members must all have names or all not have names."); }; + static shared_ptr A_tuple_member_cannot_be_both_optional_and_rest(){ return diag(5085, DiagnosticCategory::Error, "A_tuple_member_cannot_be_both_optional_and_rest_5085", "A tuple member cannot be both optional and rest."); }; + static shared_ptr A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type(){ return diag(5086, DiagnosticCategory::Error, "A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086", "A labeled tuple element is declared as optional with a question mark after the name and before the colon, rather than after the type."); }; + static shared_ptr A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type(){ return diag(5087, DiagnosticCategory::Error, "A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087", "A labeled tuple element is declared as rest with a '...' before the name, rather than before the type."); }; + static shared_ptr The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary(){ return diag(5088, DiagnosticCategory::Error, "The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialize_5088", "The inferred type of '{0}' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary."); }; + static shared_ptr Option_0_cannot_be_specified_when_option_jsx_is_1(){ return diag(5089, DiagnosticCategory::Error, "Option_0_cannot_be_specified_when_option_jsx_is_1_5089", "Option '{0}' cannot be specified when option 'jsx' is '{1}'."); }; + static shared_ptr Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash(){ return diag(5090, DiagnosticCategory::Error, "Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash_5090", "Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?"); }; + static shared_ptr Option_preserveConstEnums_cannot_be_disabled_when_isolatedModules_is_enabled(){ return diag(5091, DiagnosticCategory::Error, "Option_preserveConstEnums_cannot_be_disabled_when_isolatedModules_is_enabled_5091", "Option 'preserveConstEnums' cannot be disabled when 'isolatedModules' is enabled."); }; + static shared_ptr The_root_value_of_a_0_file_must_be_an_object(){ return diag(5092, DiagnosticCategory::Error, "The_root_value_of_a_0_file_must_be_an_object_5092", "The root value of a '{0}' file must be an object."); }; + static shared_ptr Compiler_option_0_may_only_be_used_with_build(){ return diag(5093, DiagnosticCategory::Error, "Compiler_option_0_may_only_be_used_with_build_5093", "Compiler option '--{0}' may only be used with '--build'."); }; + static shared_ptr Compiler_option_0_may_not_be_used_with_build(){ return diag(5094, DiagnosticCategory::Error, "Compiler_option_0_may_not_be_used_with_build_5094", "Compiler option '--{0}' may not be used with '--build'."); }; + static shared_ptr Option_preserveValueImports_can_only_be_used_when_module_is_set_to_es2015_or_later(){ return diag(5095, DiagnosticCategory::Error, "Option_preserveValueImports_can_only_be_used_when_module_is_set_to_es2015_or_later_5095", "Option 'preserveValueImports' can only be used when 'module' is set to 'es2015' or later."); }; + static shared_ptr Generates_a_sourcemap_for_each_corresponding_d_ts_file(){ return diag(6000, DiagnosticCategory::Message, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."); }; + static shared_ptr Concatenate_and_emit_output_to_single_file(){ return diag(6001, DiagnosticCategory::Message, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."); }; + static shared_ptr Generates_corresponding_d_ts_file(){ return diag(6002, DiagnosticCategory::Message, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."); }; + static shared_ptr Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations(){ return diag(6004, DiagnosticCategory::Message, "Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004", "Specify the location where debugger should locate TypeScript files instead of source locations."); }; + static shared_ptr Watch_input_files(){ return diag(6005, DiagnosticCategory::Message, "Watch_input_files_6005", "Watch input files."); }; + static shared_ptr Redirect_output_structure_to_the_directory(){ return diag(6006, DiagnosticCategory::Message, "Redirect_output_structure_to_the_directory_6006", "Redirect output structure to the directory."); }; + static shared_ptr Do_not_erase_const_enum_declarations_in_generated_code(){ return diag(6007, DiagnosticCategory::Message, "Do_not_erase_const_enum_declarations_in_generated_code_6007", "Do not erase const enum declarations in generated code."); }; + static shared_ptr Do_not_emit_outputs_if_any_errors_were_reported(){ return diag(6008, DiagnosticCategory::Message, "Do_not_emit_outputs_if_any_errors_were_reported_6008", "Do not emit outputs if any errors were reported."); }; + static shared_ptr Do_not_emit_comments_to_output(){ return diag(6009, DiagnosticCategory::Message, "Do_not_emit_comments_to_output_6009", "Do not emit comments to output."); }; + static shared_ptr Do_not_emit_outputs(){ return diag(6010, DiagnosticCategory::Message, "Do_not_emit_outputs_6010", "Do not emit outputs."); }; + static shared_ptr Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking(){ return diag(6011, DiagnosticCategory::Message, "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011", "Allow default imports from modules with no default export. This does not affect code emit, just typechecking."); }; + static shared_ptr Skip_type_checking_of_declaration_files(){ return diag(6012, DiagnosticCategory::Message, "Skip_type_checking_of_declaration_files_6012", "Skip type checking of declaration files."); }; + static shared_ptr Do_not_resolve_the_real_path_of_symlinks(){ return diag(6013, DiagnosticCategory::Message, "Do_not_resolve_the_real_path_of_symlinks_6013", "Do not resolve the real path of symlinks."); }; + static shared_ptr Only_emit_d_ts_declaration_files(){ return diag(6014, DiagnosticCategory::Message, "Only_emit_d_ts_declaration_files_6014", "Only emit '.d.ts' declaration files."); }; + static shared_ptr Specify_ECMAScript_target_version(){ return diag(6015, DiagnosticCategory::Message, "Specify_ECMAScript_target_version_6015", "Specify ECMAScript target version."); }; + static shared_ptr Specify_module_code_generation(){ return diag(6016, DiagnosticCategory::Message, "Specify_module_code_generation_6016", "Specify module code generation."); }; + static shared_ptr Print_this_message(){ return diag(6017, DiagnosticCategory::Message, "Print_this_message_6017", "Print this message."); }; + static shared_ptr Print_the_compiler_s_version(){ return diag(6019, DiagnosticCategory::Message, "Print_the_compiler_s_version_6019", "Print the compiler's version."); }; + static shared_ptr Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json(){ return diag(6020, DiagnosticCategory::Message, "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020", "Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'."); }; + static shared_ptr Syntax_Colon_0(){ return diag(6023, DiagnosticCategory::Message, "Syntax_Colon_0_6023", "Syntax: {0}"); }; + static shared_ptr options(){ return diag(6024, DiagnosticCategory::Message, "options_6024", "options"); }; + static shared_ptr file(){ return diag(6025, DiagnosticCategory::Message, "file_6025", "file"); }; + static shared_ptr Examples_Colon_0(){ return diag(6026, DiagnosticCategory::Message, "Examples_Colon_0_6026", "Examples: {0}"); }; + static shared_ptr Options_Colon(){ return diag(6027, DiagnosticCategory::Message, "Options_Colon_6027", "Options:"); }; + static shared_ptr Version_0(){ return diag(6029, DiagnosticCategory::Message, "Version_0_6029", "Version {0}"); }; + static shared_ptr Insert_command_line_options_and_files_from_a_file(){ return diag(6030, DiagnosticCategory::Message, "Insert_command_line_options_and_files_from_a_file_6030", "Insert command line options and files from a file."); }; + static shared_ptr Starting_compilation_in_watch_mode(){ return diag(6031, DiagnosticCategory::Message, "Starting_compilation_in_watch_mode_6031", "Starting compilation in watch mode..."); }; + static shared_ptr File_change_detected_Starting_incremental_compilation(){ return diag(6032, DiagnosticCategory::Message, "File_change_detected_Starting_incremental_compilation_6032", "File change detected. Starting incremental compilation..."); }; + static shared_ptr KIND(){ return diag(6034, DiagnosticCategory::Message, "KIND_6034", "KIND"); }; + static shared_ptr FILE(){ return diag(6035, DiagnosticCategory::Message, "FILE_6035", "FILE"); }; + static shared_ptr VERSION(){ return diag(6036, DiagnosticCategory::Message, "VERSION_6036", "VERSION"); }; + static shared_ptr LOCATION(){ return diag(6037, DiagnosticCategory::Message, "LOCATION_6037", "LOCATION"); }; + static shared_ptr DIRECTORY(){ return diag(6038, DiagnosticCategory::Message, "DIRECTORY_6038", "DIRECTORY"); }; + static shared_ptr STRATEGY(){ return diag(6039, DiagnosticCategory::Message, "STRATEGY_6039", "STRATEGY"); }; + static shared_ptr FILE_OR_DIRECTORY(){ return diag(6040, DiagnosticCategory::Message, "FILE_OR_DIRECTORY_6040", "FILE OR DIRECTORY"); }; + static shared_ptr Generates_corresponding_map_file(){ return diag(6043, DiagnosticCategory::Message, "Generates_corresponding_map_file_6043", "Generates corresponding '.map' file."); }; + static shared_ptr Compiler_option_0_expects_an_argument(){ return diag(6044, DiagnosticCategory::Error, "Compiler_option_0_expects_an_argument_6044", "Compiler option '{0}' expects an argument."); }; + static shared_ptr Unterminated_quoted_string_in_response_file_0(){ return diag(6045, DiagnosticCategory::Error, "Unterminated_quoted_string_in_response_file_0_6045", "Unterminated quoted string in response file '{0}'."); }; + static shared_ptr Argument_for_0_option_must_be_Colon_1(){ return diag(6046, DiagnosticCategory::Error, "Argument_for_0_option_must_be_Colon_1_6046", "Argument for '{0}' option must be: {1}."); }; + static shared_ptr Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1(){ return diag(6048, DiagnosticCategory::Error, "Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048", "Locale must be of the form or -. For example '{0}' or '{1}'."); }; + static shared_ptr Unable_to_open_file_0(){ return diag(6050, DiagnosticCategory::Error, "Unable_to_open_file_0_6050", "Unable to open file '{0}'."); }; + static shared_ptr Corrupted_locale_file_0(){ return diag(6051, DiagnosticCategory::Error, "Corrupted_locale_file_0_6051", "Corrupted locale file {0}."); }; + static shared_ptr Raise_error_on_expressions_and_declarations_with_an_implied_any_type(){ return diag(6052, DiagnosticCategory::Message, "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052", "Raise error on expressions and declarations with an implied 'any' type."); }; + static shared_ptr File_0_not_found(){ return diag(6053, DiagnosticCategory::Error, "File_0_not_found_6053", "File '{0}' not found."); }; + static shared_ptr File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1(){ return diag(6054, DiagnosticCategory::Error, "File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054", "File '{0}' has an unsupported extension. The only supported extensions are {1}."); }; + static shared_ptr Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures(){ return diag(6055, DiagnosticCategory::Message, "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055", "Suppress noImplicitAny errors for indexing objects lacking index signatures."); }; + static shared_ptr Do_not_emit_declarations_for_code_that_has_an_internal_annotation(){ return diag(6056, DiagnosticCategory::Message, "Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056", "Do not emit declarations for code that has an '@internal' annotation."); }; + static shared_ptr Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir(){ return diag(6058, DiagnosticCategory::Message, "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058", "Specify the root directory of input files. Use to control the output directory structure with --outDir."); }; + static shared_ptr File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files(){ return diag(6059, DiagnosticCategory::Error, "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059", "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files."); }; + static shared_ptr Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix(){ return diag(6060, DiagnosticCategory::Message, "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060", "Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)."); }; + static shared_ptr NEWLINE(){ return diag(6061, DiagnosticCategory::Message, "NEWLINE_6061", "NEWLINE"); }; + static shared_ptr Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line(){ return diag(6064, DiagnosticCategory::Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line_6064", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'null' on command line."); }; + static shared_ptr Enables_experimental_support_for_ES7_decorators(){ return diag(6065, DiagnosticCategory::Message, "Enables_experimental_support_for_ES7_decorators_6065", "Enables experimental support for ES7 decorators."); }; + static shared_ptr Enables_experimental_support_for_emitting_type_metadata_for_decorators(){ return diag(6066, DiagnosticCategory::Message, "Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066", "Enables experimental support for emitting type metadata for decorators."); }; + static shared_ptr Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6(){ return diag(6069, DiagnosticCategory::Message, "Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069", "Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6)."); }; + static shared_ptr Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file(){ return diag(6070, DiagnosticCategory::Message, "Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070", "Initializes a TypeScript project and creates a tsconfig.json file."); }; + static shared_ptr Successfully_created_a_tsconfig_json_file(){ return diag(6071, DiagnosticCategory::Message, "Successfully_created_a_tsconfig_json_file_6071", "Successfully created a tsconfig.json file."); }; + static shared_ptr Suppress_excess_property_checks_for_object_literals(){ return diag(6072, DiagnosticCategory::Message, "Suppress_excess_property_checks_for_object_literals_6072", "Suppress excess property checks for object literals."); }; + static shared_ptr Stylize_errors_and_messages_using_color_and_context_experimental(){ return diag(6073, DiagnosticCategory::Message, "Stylize_errors_and_messages_using_color_and_context_experimental_6073", "Stylize errors and messages using color and context (experimental)."); }; + static shared_ptr Do_not_report_errors_on_unused_labels(){ return diag(6074, DiagnosticCategory::Message, "Do_not_report_errors_on_unused_labels_6074", "Do not report errors on unused labels."); }; + static shared_ptr Report_error_when_not_all_code_paths_in_function_return_a_value(){ return diag(6075, DiagnosticCategory::Message, "Report_error_when_not_all_code_paths_in_function_return_a_value_6075", "Report error when not all code paths in function return a value."); }; + static shared_ptr Report_errors_for_fallthrough_cases_in_switch_statement(){ return diag(6076, DiagnosticCategory::Message, "Report_errors_for_fallthrough_cases_in_switch_statement_6076", "Report errors for fallthrough cases in switch statement."); }; + static shared_ptr Do_not_report_errors_on_unreachable_code(){ return diag(6077, DiagnosticCategory::Message, "Do_not_report_errors_on_unreachable_code_6077", "Do not report errors on unreachable code."); }; + static shared_ptr Disallow_inconsistently_cased_references_to_the_same_file(){ return diag(6078, DiagnosticCategory::Message, "Disallow_inconsistently_cased_references_to_the_same_file_6078", "Disallow inconsistently-cased references to the same file."); }; + static shared_ptr Specify_library_files_to_be_included_in_the_compilation(){ return diag(6079, DiagnosticCategory::Message, "Specify_library_files_to_be_included_in_the_compilation_6079", "Specify library files to be included in the compilation."); }; + static shared_ptr Specify_JSX_code_generation(){ return diag(6080, DiagnosticCategory::Message, "Specify_JSX_code_generation_6080", "Specify JSX code generation."); }; + static shared_ptr File_0_has_an_unsupported_extension_so_skipping_it(){ return diag(6081, DiagnosticCategory::Message, "File_0_has_an_unsupported_extension_so_skipping_it_6081", "File '{0}' has an unsupported extension, so skipping it."); }; + static shared_ptr Only_amd_and_system_modules_are_supported_alongside_0(){ return diag(6082, DiagnosticCategory::Error, "Only_amd_and_system_modules_are_supported_alongside_0_6082", "Only 'amd' and 'system' modules are supported alongside --{0}."); }; + static shared_ptr Base_directory_to_resolve_non_absolute_module_names(){ return diag(6083, DiagnosticCategory::Message, "Base_directory_to_resolve_non_absolute_module_names_6083", "Base directory to resolve non-absolute module names."); }; + static shared_ptr Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit(){ return diag(6084, DiagnosticCategory::Message, "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084", "[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit"); }; + static shared_ptr Enable_tracing_of_the_name_resolution_process(){ return diag(6085, DiagnosticCategory::Message, "Enable_tracing_of_the_name_resolution_process_6085", "Enable tracing of the name resolution process."); }; + static shared_ptr Resolving_module_0_from_1(){ return diag(6086, DiagnosticCategory::Message, "Resolving_module_0_from_1_6086", "======== Resolving module '{0}' from '{1}'. ========"); }; + static shared_ptr Explicitly_specified_module_resolution_kind_Colon_0(){ return diag(6087, DiagnosticCategory::Message, "Explicitly_specified_module_resolution_kind_Colon_0_6087", "Explicitly specified module resolution kind: '{0}'."); }; + static shared_ptr Module_resolution_kind_is_not_specified_using_0(){ return diag(6088, DiagnosticCategory::Message, "Module_resolution_kind_is_not_specified_using_0_6088", "Module resolution kind is not specified, using '{0}'."); }; + static shared_ptr Module_name_0_was_successfully_resolved_to_1(){ return diag(6089, DiagnosticCategory::Message, "Module_name_0_was_successfully_resolved_to_1_6089", "======== Module name '{0}' was successfully resolved to '{1}'. ========"); }; + static shared_ptr Module_name_0_was_not_resolved(){ return diag(6090, DiagnosticCategory::Message, "Module_name_0_was_not_resolved_6090", "======== Module name '{0}' was not resolved. ========"); }; + static shared_ptr paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0(){ return diag(6091, DiagnosticCategory::Message, "paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091", "'paths' option is specified, looking for a pattern to match module name '{0}'."); }; + static shared_ptr Module_name_0_matched_pattern_1(){ return diag(6092, DiagnosticCategory::Message, "Module_name_0_matched_pattern_1_6092", "Module name '{0}', matched pattern '{1}'."); }; + static shared_ptr Trying_substitution_0_candidate_module_location_Colon_1(){ return diag(6093, DiagnosticCategory::Message, "Trying_substitution_0_candidate_module_location_Colon_1_6093", "Trying substitution '{0}', candidate module location: '{1}'."); }; + static shared_ptr Resolving_module_name_0_relative_to_base_url_1_2(){ return diag(6094, DiagnosticCategory::Message, "Resolving_module_name_0_relative_to_base_url_1_2_6094", "Resolving module name '{0}' relative to base url '{1}' - '{2}'."); }; + static shared_ptr Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1(){ return diag(6095, DiagnosticCategory::Message, "Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1_6095", "Loading module as file / folder, candidate module location '{0}', target file type '{1}'."); }; + static shared_ptr File_0_does_not_exist(){ return diag(6096, DiagnosticCategory::Message, "File_0_does_not_exist_6096", "File '{0}' does not exist."); }; + static shared_ptr File_0_exist_use_it_as_a_name_resolution_result(){ return diag(6097, DiagnosticCategory::Message, "File_0_exist_use_it_as_a_name_resolution_result_6097", "File '{0}' exist - use it as a name resolution result."); }; + static shared_ptr Loading_module_0_from_node_modules_folder_target_file_type_1(){ return diag(6098, DiagnosticCategory::Message, "Loading_module_0_from_node_modules_folder_target_file_type_1_6098", "Loading module '{0}' from 'node_modules' folder, target file type '{1}'."); }; + static shared_ptr Found_package_json_at_0(){ return diag(6099, DiagnosticCategory::Message, "Found_package_json_at_0_6099", "Found 'package.json' at '{0}'."); }; + static shared_ptr package_json_does_not_have_a_0_field(){ return diag(6100, DiagnosticCategory::Message, "package_json_does_not_have_a_0_field_6100", "'package.json' does not have a '{0}' field."); }; + static shared_ptr package_json_has_0_field_1_that_references_2(){ return diag(6101, DiagnosticCategory::Message, "package_json_has_0_field_1_that_references_2_6101", "'package.json' has '{0}' field '{1}' that references '{2}'."); }; + static shared_ptr Allow_javascript_files_to_be_compiled(){ return diag(6102, DiagnosticCategory::Message, "Allow_javascript_files_to_be_compiled_6102", "Allow javascript files to be compiled."); }; + static shared_ptr Checking_if_0_is_the_longest_matching_prefix_for_1_2(){ return diag(6104, DiagnosticCategory::Message, "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104", "Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'."); }; + static shared_ptr Expected_type_of_0_field_in_package_json_to_be_1_got_2(){ return diag(6105, DiagnosticCategory::Message, "Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105", "Expected type of '{0}' field in 'package.json' to be '{1}', got '{2}'."); }; + static shared_ptr baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1(){ return diag(6106, DiagnosticCategory::Message, "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106", "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'."); }; + static shared_ptr rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0(){ return diag(6107, DiagnosticCategory::Message, "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107", "'rootDirs' option is set, using it to resolve relative module name '{0}'."); }; + static shared_ptr Longest_matching_prefix_for_0_is_1(){ return diag(6108, DiagnosticCategory::Message, "Longest_matching_prefix_for_0_is_1_6108", "Longest matching prefix for '{0}' is '{1}'."); }; + static shared_ptr Loading_0_from_the_root_dir_1_candidate_location_2(){ return diag(6109, DiagnosticCategory::Message, "Loading_0_from_the_root_dir_1_candidate_location_2_6109", "Loading '{0}' from the root dir '{1}', candidate location '{2}'."); }; + static shared_ptr Trying_other_entries_in_rootDirs(){ return diag(6110, DiagnosticCategory::Message, "Trying_other_entries_in_rootDirs_6110", "Trying other entries in 'rootDirs'."); }; + static shared_ptr Module_resolution_using_rootDirs_has_failed(){ return diag(6111, DiagnosticCategory::Message, "Module_resolution_using_rootDirs_has_failed_6111", "Module resolution using 'rootDirs' has failed."); }; + static shared_ptr Do_not_emit_use_strict_directives_in_module_output(){ return diag(6112, DiagnosticCategory::Message, "Do_not_emit_use_strict_directives_in_module_output_6112", "Do not emit 'use strict' directives in module output."); }; + static shared_ptr Enable_strict_null_checks(){ return diag(6113, DiagnosticCategory::Message, "Enable_strict_null_checks_6113", "Enable strict null checks."); }; + static shared_ptr Unknown_option_excludes_Did_you_mean_exclude(){ return diag(6114, DiagnosticCategory::Error, "Unknown_option_excludes_Did_you_mean_exclude_6114", "Unknown option 'excludes'. Did you mean 'exclude'?"); }; + static shared_ptr Raise_error_on_this_expressions_with_an_implied_any_type(){ return diag(6115, DiagnosticCategory::Message, "Raise_error_on_this_expressions_with_an_implied_any_type_6115", "Raise error on 'this' expressions with an implied 'any' type."); }; + static shared_ptr Resolving_type_reference_directive_0_containing_file_1_root_directory_2(){ return diag(6116, DiagnosticCategory::Message, "Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116", "======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========"); }; + static shared_ptr Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2(){ return diag(6119, DiagnosticCategory::Message, "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119", "======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========"); }; + static shared_ptr Type_reference_directive_0_was_not_resolved(){ return diag(6120, DiagnosticCategory::Message, "Type_reference_directive_0_was_not_resolved_6120", "======== Type reference directive '{0}' was not resolved. ========"); }; + static shared_ptr Resolving_with_primary_search_path_0(){ return diag(6121, DiagnosticCategory::Message, "Resolving_with_primary_search_path_0_6121", "Resolving with primary search path '{0}'."); }; + static shared_ptr Root_directory_cannot_be_determined_skipping_primary_search_paths(){ return diag(6122, DiagnosticCategory::Message, "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122", "Root directory cannot be determined, skipping primary search paths."); }; + static shared_ptr Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set(){ return diag(6123, DiagnosticCategory::Message, "Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123", "======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========"); }; + static shared_ptr Type_declaration_files_to_be_included_in_compilation(){ return diag(6124, DiagnosticCategory::Message, "Type_declaration_files_to_be_included_in_compilation_6124", "Type declaration files to be included in compilation."); }; + static shared_ptr Looking_up_in_node_modules_folder_initial_location_0(){ return diag(6125, DiagnosticCategory::Message, "Looking_up_in_node_modules_folder_initial_location_0_6125", "Looking up in 'node_modules' folder, initial location '{0}'."); }; + static shared_ptr Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder(){ return diag(6126, DiagnosticCategory::Message, "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126", "Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder."); }; + static shared_ptr Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1(){ return diag(6127, DiagnosticCategory::Message, "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127", "======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========"); }; + static shared_ptr Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set(){ return diag(6128, DiagnosticCategory::Message, "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128", "======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========"); }; + static shared_ptr Resolving_real_path_for_0_result_1(){ return diag(6130, DiagnosticCategory::Message, "Resolving_real_path_for_0_result_1_6130", "Resolving real path for '{0}', result '{1}'."); }; + static shared_ptr Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system(){ return diag(6131, DiagnosticCategory::Error, "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131", "Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'."); }; + static shared_ptr File_name_0_has_a_1_extension_stripping_it(){ return diag(6132, DiagnosticCategory::Message, "File_name_0_has_a_1_extension_stripping_it_6132", "File name '{0}' has a '{1}' extension - stripping it."); }; + static shared_ptr _0_is_declared_but_its_value_is_never_read(){ return diag(6133, DiagnosticCategory::Error, "_0_is_declared_but_its_value_is_never_read_6133", "'{0}' is declared but its value is never read.", /*reportsUnnecessary*/ true); }; + static shared_ptr Report_errors_on_unused_locals(){ return diag(6134, DiagnosticCategory::Message, "Report_errors_on_unused_locals_6134", "Report errors on unused locals."); }; + static shared_ptr Report_errors_on_unused_parameters(){ return diag(6135, DiagnosticCategory::Message, "Report_errors_on_unused_parameters_6135", "Report errors on unused parameters."); }; + static shared_ptr The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files(){ return diag(6136, DiagnosticCategory::Message, "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136", "The maximum dependency depth to search under node_modules and load JavaScript files."); }; + static shared_ptr Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1(){ return diag(6137, DiagnosticCategory::Error, "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137", "Cannot import type declaration files. Consider importing '{0}' instead of '{1}'."); }; + static shared_ptr Property_0_is_declared_but_its_value_is_never_read(){ return diag(6138, DiagnosticCategory::Error, "Property_0_is_declared_but_its_value_is_never_read_6138", "Property '{0}' is declared but its value is never read.", /*reportsUnnecessary*/ true); }; + static shared_ptr Import_emit_helpers_from_tslib(){ return diag(6139, DiagnosticCategory::Message, "Import_emit_helpers_from_tslib_6139", "Import emit helpers from 'tslib'."); }; + static shared_ptr Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2(){ return diag(6140, DiagnosticCategory::Error, "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140", "Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'."); }; + static shared_ptr Parse_in_strict_mode_and_emit_use_strict_for_each_source_file(){ return diag(6141, DiagnosticCategory::Message, "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141", "Parse in strict mode and emit \"use strict\" for each source file."); }; + static shared_ptr Module_0_was_resolved_to_1_but_jsx_is_not_set(){ return diag(6142, DiagnosticCategory::Error, "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142", "Module '{0}' was resolved to '{1}', but '--jsx' is not set."); }; + static shared_ptr Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1(){ return diag(6144, DiagnosticCategory::Message, "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144", "Module '{0}' was resolved as locally declared ambient module in file '{1}'."); }; + static shared_ptr Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified(){ return diag(6145, DiagnosticCategory::Message, "Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145", "Module '{0}' was resolved as ambient module declared in '{1}' since this file was not modified."); }; + static shared_ptr Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h(){ return diag(6146, DiagnosticCategory::Message, "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146", "Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'."); }; + static shared_ptr Resolution_for_module_0_was_found_in_cache_from_location_1(){ return diag(6147, DiagnosticCategory::Message, "Resolution_for_module_0_was_found_in_cache_from_location_1_6147", "Resolution for module '{0}' was found in cache from location '{1}'."); }; + static shared_ptr Directory_0_does_not_exist_skipping_all_lookups_in_it(){ return diag(6148, DiagnosticCategory::Message, "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148", "Directory '{0}' does not exist, skipping all lookups in it."); }; + static shared_ptr Show_diagnostic_information(){ return diag(6149, DiagnosticCategory::Message, "Show_diagnostic_information_6149", "Show diagnostic information."); }; + static shared_ptr Show_verbose_diagnostic_information(){ return diag(6150, DiagnosticCategory::Message, "Show_verbose_diagnostic_information_6150", "Show verbose diagnostic information."); }; + static shared_ptr Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file(){ return diag(6151, DiagnosticCategory::Message, "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151", "Emit a single file with source maps instead of having a separate file."); }; + static shared_ptr Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set(){ return diag(6152, DiagnosticCategory::Message, "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152", "Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set."); }; + static shared_ptr Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule(){ return diag(6153, DiagnosticCategory::Message, "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153", "Transpile each file as a separate module (similar to 'ts.transpileModule')."); }; + static shared_ptr Print_names_of_generated_files_part_of_the_compilation(){ return diag(6154, DiagnosticCategory::Message, "Print_names_of_generated_files_part_of_the_compilation_6154", "Print names of generated files part of the compilation."); }; + static shared_ptr Print_names_of_files_part_of_the_compilation(){ return diag(6155, DiagnosticCategory::Message, "Print_names_of_files_part_of_the_compilation_6155", "Print names of files part of the compilation."); }; + static shared_ptr The_locale_used_when_displaying_messages_to_the_user_e_g_en_us(){ return diag(6156, DiagnosticCategory::Message, "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156", "The locale used when displaying messages to the user (e.g. 'en-us')"); }; + static shared_ptr Do_not_generate_custom_helper_functions_like_extends_in_compiled_output(){ return diag(6157, DiagnosticCategory::Message, "Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157", "Do not generate custom helper functions like '__extends' in compiled output."); }; + static shared_ptr Do_not_include_the_default_library_file_lib_d_ts(){ return diag(6158, DiagnosticCategory::Message, "Do_not_include_the_default_library_file_lib_d_ts_6158", "Do not include the default library file (lib.d.ts)."); }; + static shared_ptr Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files(){ return diag(6159, DiagnosticCategory::Message, "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159", "Do not add triple-slash references or imported modules to the list of compiled files."); }; + static shared_ptr Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files(){ return diag(6160, DiagnosticCategory::Message, "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160", "[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files."); }; + static shared_ptr List_of_folders_to_include_type_definitions_from(){ return diag(6161, DiagnosticCategory::Message, "List_of_folders_to_include_type_definitions_from_6161", "List of folders to include type definitions from."); }; + static shared_ptr Disable_size_limitations_on_JavaScript_projects(){ return diag(6162, DiagnosticCategory::Message, "Disable_size_limitations_on_JavaScript_projects_6162", "Disable size limitations on JavaScript projects."); }; + static shared_ptr The_character_set_of_the_input_files(){ return diag(6163, DiagnosticCategory::Message, "The_character_set_of_the_input_files_6163", "The character set of the input files."); }; + static shared_ptr Do_not_truncate_error_messages(){ return diag(6165, DiagnosticCategory::Message, "Do_not_truncate_error_messages_6165", "Do not truncate error messages."); }; + static shared_ptr Output_directory_for_generated_declaration_files(){ return diag(6166, DiagnosticCategory::Message, "Output_directory_for_generated_declaration_files_6166", "Output directory for generated declaration files."); }; + static shared_ptr A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl(){ return diag(6167, DiagnosticCategory::Message, "A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167", "A series of entries which re-map imports to lookup locations relative to the 'baseUrl'."); }; + static shared_ptr List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime(){ return diag(6168, DiagnosticCategory::Message, "List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168", "List of root folders whose combined content represents the structure of the project at runtime."); }; + static shared_ptr Show_all_compiler_options(){ return diag(6169, DiagnosticCategory::Message, "Show_all_compiler_options_6169", "Show all compiler options."); }; + static shared_ptr Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file(){ return diag(6170, DiagnosticCategory::Message, "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170", "[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file"); }; + static shared_ptr Command_line_Options(){ return diag(6171, DiagnosticCategory::Message, "Command_line_Options_6171", "Command-line Options"); }; + static shared_ptr Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3(){ return diag(6179, DiagnosticCategory::Message, "Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3_6179", "Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'."); }; + static shared_ptr Enable_all_strict_type_checking_options(){ return diag(6180, DiagnosticCategory::Message, "Enable_all_strict_type_checking_options_6180", "Enable all strict type-checking options."); }; + static shared_ptr List_of_language_service_plugins(){ return diag(6181, DiagnosticCategory::Message, "List_of_language_service_plugins_6181", "List of language service plugins."); }; + static shared_ptr Scoped_package_detected_looking_in_0(){ return diag(6182, DiagnosticCategory::Message, "Scoped_package_detected_looking_in_0_6182", "Scoped package detected, looking in '{0}'"); }; + static shared_ptr Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2(){ return diag(6183, DiagnosticCategory::Message, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_6183", "Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."); }; + static shared_ptr Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3(){ return diag(6184, DiagnosticCategory::Message, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package__6184", "Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."); }; + static shared_ptr Enable_strict_checking_of_function_types(){ return diag(6186, DiagnosticCategory::Message, "Enable_strict_checking_of_function_types_6186", "Enable strict checking of function types."); }; + static shared_ptr Enable_strict_checking_of_property_initialization_in_classes(){ return diag(6187, DiagnosticCategory::Message, "Enable_strict_checking_of_property_initialization_in_classes_6187", "Enable strict checking of property initialization in classes."); }; + static shared_ptr Numeric_separators_are_not_allowed_here(){ return diag(6188, DiagnosticCategory::Error, "Numeric_separators_are_not_allowed_here_6188", "Numeric separators are not allowed here."); }; + static shared_ptr Multiple_consecutive_numeric_separators_are_not_permitted(){ return diag(6189, DiagnosticCategory::Error, "Multiple_consecutive_numeric_separators_are_not_permitted_6189", "Multiple consecutive numeric separators are not permitted."); }; + static shared_ptr Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen(){ return diag(6191, DiagnosticCategory::Message, "Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191", "Whether to keep outdated console output in watch mode instead of clearing the screen."); }; + static shared_ptr All_imports_in_import_declaration_are_unused(){ return diag(6192, DiagnosticCategory::Error, "All_imports_in_import_declaration_are_unused_6192", "All imports in import declaration are unused.", /*reportsUnnecessary*/ true); }; + static shared_ptr Found_1_error_Watching_for_file_changes(){ return diag(6193, DiagnosticCategory::Message, "Found_1_error_Watching_for_file_changes_6193", "Found 1 error. Watching for file changes."); }; + static shared_ptr Found_0_errors_Watching_for_file_changes(){ return diag(6194, DiagnosticCategory::Message, "Found_0_errors_Watching_for_file_changes_6194", "Found {0} errors. Watching for file changes."); }; + static shared_ptr Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols(){ return diag(6195, DiagnosticCategory::Message, "Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols_6195", "Resolve 'keyof' to string valued property names only (no numbers or symbols)."); }; + static shared_ptr _0_is_declared_but_never_used(){ return diag(6196, DiagnosticCategory::Error, "_0_is_declared_but_never_used_6196", "'{0}' is declared but never used.", /*reportsUnnecessary*/ true); }; + static shared_ptr Include_modules_imported_with_json_extension(){ return diag(6197, DiagnosticCategory::Message, "Include_modules_imported_with_json_extension_6197", "Include modules imported with '.json' extension"); }; + static shared_ptr All_destructured_elements_are_unused(){ return diag(6198, DiagnosticCategory::Error, "All_destructured_elements_are_unused_6198", "All destructured elements are unused.", /*reportsUnnecessary*/ true); }; + static shared_ptr All_variables_are_unused(){ return diag(6199, DiagnosticCategory::Error, "All_variables_are_unused_6199", "All variables are unused.", /*reportsUnnecessary*/ true); }; + static shared_ptr Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0(){ return diag(6200, DiagnosticCategory::Error, "Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200", "Definitions of the following identifiers conflict with those in another file: {0}"); }; + static shared_ptr Conflicts_are_in_this_file(){ return diag(6201, DiagnosticCategory::Message, "Conflicts_are_in_this_file_6201", "Conflicts are in this file."); }; + static shared_ptr Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0(){ return diag(6202, DiagnosticCategory::Error, "Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202", "Project references may not form a circular graph. Cycle detected: {0}"); }; + static shared_ptr _0_was_also_declared_here(){ return diag(6203, DiagnosticCategory::Message, "_0_was_also_declared_here_6203", "'{0}' was also declared here."); }; + static shared_ptr and_here(){ return diag(6204, DiagnosticCategory::Message, "and_here_6204", "and here."); }; + static shared_ptr All_type_parameters_are_unused(){ return diag(6205, DiagnosticCategory::Error, "All_type_parameters_are_unused_6205", "All type parameters are unused."); }; + static shared_ptr package_json_has_a_typesVersions_field_with_version_specific_path_mappings(){ return diag(6206, DiagnosticCategory::Message, "package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206", "'package.json' has a 'typesVersions' field with version-specific path mappings."); }; + static shared_ptr package_json_does_not_have_a_typesVersions_entry_that_matches_version_0(){ return diag(6207, DiagnosticCategory::Message, "package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207", "'package.json' does not have a 'typesVersions' entry that matches version '{0}'."); }; + static shared_ptr package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2(){ return diag(6208, DiagnosticCategory::Message, "package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208", "'package.json' has a 'typesVersions' entry '{0}' that matches compiler version '{1}', looking for a pattern to match module name '{2}'."); }; + static shared_ptr package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range(){ return diag(6209, DiagnosticCategory::Message, "package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209", "'package.json' has a 'typesVersions' entry '{0}' that is not a valid semver range."); }; + static shared_ptr An_argument_for_0_was_not_provided(){ return diag(6210, DiagnosticCategory::Message, "An_argument_for_0_was_not_provided_6210", "An argument for '{0}' was not provided."); }; + static shared_ptr An_argument_matching_this_binding_pattern_was_not_provided(){ return diag(6211, DiagnosticCategory::Message, "An_argument_matching_this_binding_pattern_was_not_provided_6211", "An argument matching this binding pattern was not provided."); }; + static shared_ptr Did_you_mean_to_call_this_expression(){ return diag(6212, DiagnosticCategory::Message, "Did_you_mean_to_call_this_expression_6212", "Did you mean to call this expression?"); }; + static shared_ptr Did_you_mean_to_use_new_with_this_expression(){ return diag(6213, DiagnosticCategory::Message, "Did_you_mean_to_use_new_with_this_expression_6213", "Did you mean to use 'new' with this expression?"); }; + static shared_ptr Enable_strict_bind_call_and_apply_methods_on_functions(){ return diag(6214, DiagnosticCategory::Message, "Enable_strict_bind_call_and_apply_methods_on_functions_6214", "Enable strict 'bind', 'call', and 'apply' methods on functions."); }; + static shared_ptr Using_compiler_options_of_project_reference_redirect_0(){ return diag(6215, DiagnosticCategory::Message, "Using_compiler_options_of_project_reference_redirect_0_6215", "Using compiler options of project reference redirect '{0}'."); }; + static shared_ptr Found_1_error(){ return diag(6216, DiagnosticCategory::Message, "Found_1_error_6216", "Found 1 error."); }; + static shared_ptr Found_0_errors(){ return diag(6217, DiagnosticCategory::Message, "Found_0_errors_6217", "Found {0} errors."); }; + static shared_ptr Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2(){ return diag(6218, DiagnosticCategory::Message, "Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218", "======== Module name '{0}' was successfully resolved to '{1}' with Package ID '{2}'. ========"); }; + static shared_ptr Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3(){ return diag(6219, DiagnosticCategory::Message, "Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219", "======== Type reference directive '{0}' was successfully resolved to '{1}' with Package ID '{2}', primary: {3}. ========"); }; + static shared_ptr package_json_had_a_falsy_0_field(){ return diag(6220, DiagnosticCategory::Message, "package_json_had_a_falsy_0_field_6220", "'package.json' had a falsy '{0}' field."); }; + static shared_ptr Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects(){ return diag(6221, DiagnosticCategory::Message, "Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221", "Disable use of source files instead of declaration files from referenced projects."); }; + static shared_ptr Emit_class_fields_with_Define_instead_of_Set(){ return diag(6222, DiagnosticCategory::Message, "Emit_class_fields_with_Define_instead_of_Set_6222", "Emit class fields with Define instead of Set."); }; + static shared_ptr Generates_a_CPU_profile(){ return diag(6223, DiagnosticCategory::Message, "Generates_a_CPU_profile_6223", "Generates a CPU profile."); }; + static shared_ptr Disable_solution_searching_for_this_project(){ return diag(6224, DiagnosticCategory::Message, "Disable_solution_searching_for_this_project_6224", "Disable solution searching for this project."); }; + static shared_ptr Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling_UseFsEvents_UseFsEventsOnParentDirectory(){ return diag(6225, DiagnosticCategory::Message, "Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225", "Specify strategy for watching file: 'FixedPollingInterval' (default), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'."); }; - static shared Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling(){ return diag(6226, DiagnosticCategory::Message, "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226", + static shared_ptr Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling(){ return diag(6226, DiagnosticCategory::Message, "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226", "Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling'."); }; - static shared Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority_FixedChunkSize(){ return diag(6227, DiagnosticCategory::Message, "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227", + static shared_ptr Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority_FixedChunkSize(){ return diag(6227, DiagnosticCategory::Message, "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227", "Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority', 'FixedChunkSize'."); }; - static shared Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3(){ return diag(6229, DiagnosticCategory::Error, "Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3_6229", "Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'."); }; - static shared Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line(){ return diag(6230, DiagnosticCategory::Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line_6230", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'false' or 'null' on command line."); }; - static shared Could_not_resolve_the_path_0_with_the_extensions_Colon_1(){ return diag(6231, DiagnosticCategory::Error, "Could_not_resolve_the_path_0_with_the_extensions_Colon_1_6231", "Could not resolve the path '{0}' with the extensions: {1}."); }; - static shared Declaration_augments_declaration_in_another_file_This_cannot_be_serialized(){ return diag(6232, DiagnosticCategory::Error, "Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232", "Declaration augments declaration in another file. This cannot be serialized."); }; - static shared This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file(){ return diag(6233, DiagnosticCategory::Error, "This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233", "This is the declaration being augmented. Consider moving the augmenting declaration into the same file."); }; - static shared This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without(){ return diag(6234, DiagnosticCategory::Error, "This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without_6234", "This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?"); }; - static shared Disable_loading_referenced_projects(){ return diag(6235, DiagnosticCategory::Message, "Disable_loading_referenced_projects_6235", "Disable loading referenced projects."); }; - static shared Arguments_for_the_rest_parameter_0_were_not_provided(){ return diag(6236, DiagnosticCategory::Error, "Arguments_for_the_rest_parameter_0_were_not_provided_6236", "Arguments for the rest parameter '{0}' were not provided."); }; - static shared Generates_an_event_trace_and_a_list_of_types(){ return diag(6237, DiagnosticCategory::Message, "Generates_an_event_trace_and_a_list_of_types_6237", "Generates an event trace and a list of types."); }; - static shared Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react(){ return diag(6238, DiagnosticCategory::Error, "Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react_6238", "Specify the module specifier to be used to import the 'jsx' and 'jsxs' factory functions from. eg, react"); }; - static shared File_0_exists_according_to_earlier_cached_lookups(){ return diag(6239, DiagnosticCategory::Message, "File_0_exists_according_to_earlier_cached_lookups_6239", "File '{0}' exists according to earlier cached lookups."); }; - static shared File_0_does_not_exist_according_to_earlier_cached_lookups(){ return diag(6240, DiagnosticCategory::Message, "File_0_does_not_exist_according_to_earlier_cached_lookups_6240", "File '{0}' does not exist according to earlier cached lookups."); }; - static shared Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1(){ return diag(6241, DiagnosticCategory::Message, "Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1_6241", "Resolution for type reference directive '{0}' was found in cache from location '{1}'."); }; - static shared Resolving_type_reference_directive_0_containing_file_1(){ return diag(6242, DiagnosticCategory::Message, "Resolving_type_reference_directive_0_containing_file_1_6242", "======== Resolving type reference directive '{0}', containing file '{1}'. ========"); }; - static shared Interpret_optional_property_types_as_written_rather_than_adding_undefined(){ return diag(6243, DiagnosticCategory::Message, "Interpret_optional_property_types_as_written_rather_than_adding_undefined_6243", "Interpret optional property types as written, rather than adding 'undefined'."); }; - static shared Modules(){ return diag(6244, DiagnosticCategory::Message, "Modules_6244", "Modules"); }; - static shared File_Management(){ return diag(6245, DiagnosticCategory::Message, "File_Management_6245", "File Management"); }; - static shared Emit(){ return diag(6246, DiagnosticCategory::Message, "Emit_6246", "Emit"); }; - static shared JavaScript_Support(){ return diag(6247, DiagnosticCategory::Message, "JavaScript_Support_6247", "JavaScript Support"); }; - static shared Type_Checking(){ return diag(6248, DiagnosticCategory::Message, "Type_Checking_6248", "Type Checking"); }; - static shared Editor_Support(){ return diag(6249, DiagnosticCategory::Message, "Editor_Support_6249", "Editor Support"); }; - static shared Watch_and_Build_Modes(){ return diag(6250, DiagnosticCategory::Message, "Watch_and_Build_Modes_6250", "Watch and Build Modes"); }; - static shared Compiler_Diagnostics(){ return diag(6251, DiagnosticCategory::Message, "Compiler_Diagnostics_6251", "Compiler Diagnostics"); }; - static shared Interop_Constraints(){ return diag(6252, DiagnosticCategory::Message, "Interop_Constraints_6252", "Interop Constraints"); }; - static shared Backwards_Compatibility(){ return diag(6253, DiagnosticCategory::Message, "Backwards_Compatibility_6253", "Backwards Compatibility"); }; - static shared Language_and_Environment(){ return diag(6254, DiagnosticCategory::Message, "Language_and_Environment_6254", "Language and Environment"); }; - static shared Projects(){ return diag(6255, DiagnosticCategory::Message, "Projects_6255", "Projects"); }; - static shared Output_Formatting(){ return diag(6256, DiagnosticCategory::Message, "Output_Formatting_6256", "Output Formatting"); }; - static shared Completeness(){ return diag(6257, DiagnosticCategory::Message, "Completeness_6257", "Completeness"); }; - static shared _0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file(){ return diag(6258, DiagnosticCategory::Error, "_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file_6258", "'{0}' should be set inside the 'compilerOptions' object of the config json file"); }; - static shared Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve(){ return diag(6270, DiagnosticCategory::Message, "Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve_6270", "Directory '{0}' has no containing package.json scope. Imports will not resolve."); }; - static shared Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1(){ return diag(6271, DiagnosticCategory::Message, "Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6271", "Import specifier '{0}' does not exist in package.json scope at path '{1}'."); }; - static shared Invalid_import_specifier_0_has_no_possible_resolutions(){ return diag(6272, DiagnosticCategory::Message, "Invalid_import_specifier_0_has_no_possible_resolutions_6272", "Invalid import specifier '{0}' has no possible resolutions."); }; - static shared package_json_scope_0_has_no_imports_defined(){ return diag(6273, DiagnosticCategory::Message, "package_json_scope_0_has_no_imports_defined_6273", "package.json scope '{0}' has no imports defined."); }; - static shared package_json_scope_0_explicitly_maps_specifier_1_to_null(){ return diag(6274, DiagnosticCategory::Message, "package_json_scope_0_explicitly_maps_specifier_1_to_null_6274", "package.json scope '{0}' explicitly maps specifier '{1}' to null."); }; - static shared package_json_scope_0_has_invalid_type_for_target_of_specifier_1(){ return diag(6275, DiagnosticCategory::Message, "package_json_scope_0_has_invalid_type_for_target_of_specifier_1_6275", "package.json scope '{0}' has invalid type for target of specifier '{1}'"); }; - static shared Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1(){ return diag(6276, DiagnosticCategory::Message, "Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6276", "Export specifier '{0}' does not exist in package.json scope at path '{1}'."); }; - static shared Enable_project_compilation(){ return diag(6302, DiagnosticCategory::Message, "Enable_project_compilation_6302", "Enable project compilation"); }; - static shared Composite_projects_may_not_disable_declaration_emit(){ return diag(6304, DiagnosticCategory::Error, "Composite_projects_may_not_disable_declaration_emit_6304", "Composite projects may not disable declaration emit."); }; - static shared Output_file_0_has_not_been_built_from_source_file_1(){ return diag(6305, DiagnosticCategory::Error, "Output_file_0_has_not_been_built_from_source_file_1_6305", "Output file '{0}' has not been built from source file '{1}'."); }; - static shared Referenced_project_0_must_have_setting_composite_Colon_true(){ return diag(6306, DiagnosticCategory::Error, "Referenced_project_0_must_have_setting_composite_Colon_true_6306", "Referenced project '{0}' must have setting \"composite\": true."); }; - static shared File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern(){ return diag(6307, DiagnosticCategory::Error, "File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307", "File '{0}' is not listed within the file list of project '{1}'. Projects must list all files or use an 'include' pattern."); }; - static shared Cannot_prepend_project_0_because_it_does_not_have_outFile_set(){ return diag(6308, DiagnosticCategory::Error, "Cannot_prepend_project_0_because_it_does_not_have_outFile_set_6308", "Cannot prepend project '{0}' because it does not have 'outFile' set"); }; - static shared Output_file_0_from_project_1_does_not_exist(){ return diag(6309, DiagnosticCategory::Error, "Output_file_0_from_project_1_does_not_exist_6309", "Output file '{0}' from project '{1}' does not exist"); }; - static shared Referenced_project_0_may_not_disable_emit(){ return diag(6310, DiagnosticCategory::Error, "Referenced_project_0_may_not_disable_emit_6310", "Referenced project '{0}' may not disable emit."); }; - static shared Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2(){ return diag(6350, DiagnosticCategory::Message, "Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350", "Project '{0}' is out of date because oldest output '{1}' is older than newest input '{2}'"); }; - static shared Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2(){ return diag(6351, DiagnosticCategory::Message, "Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351", "Project '{0}' is up to date because newest input '{1}' is older than oldest output '{2}'"); }; - static shared Project_0_is_out_of_date_because_output_file_1_does_not_exist(){ return diag(6352, DiagnosticCategory::Message, "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352", "Project '{0}' is out of date because output file '{1}' does not exist"); }; - static shared Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date(){ return diag(6353, DiagnosticCategory::Message, "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353", "Project '{0}' is out of date because its dependency '{1}' is out of date"); }; - static shared Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies(){ return diag(6354, DiagnosticCategory::Message, "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354", "Project '{0}' is up to date with .d.ts files from its dependencies"); }; - static shared Projects_in_this_build_Colon_0(){ return diag(6355, DiagnosticCategory::Message, "Projects_in_this_build_Colon_0_6355", "Projects in this build: {0}"); }; - static shared A_non_dry_build_would_delete_the_following_files_Colon_0(){ return diag(6356, DiagnosticCategory::Message, "A_non_dry_build_would_delete_the_following_files_Colon_0_6356", "A non-dry build would delete the following files: {0}"); }; - static shared A_non_dry_build_would_build_project_0(){ return diag(6357, DiagnosticCategory::Message, "A_non_dry_build_would_build_project_0_6357", "A non-dry build would build project '{0}'"); }; - static shared Building_project_0(){ return diag(6358, DiagnosticCategory::Message, "Building_project_0_6358", "Building project '{0}'..."); }; - static shared Updating_output_timestamps_of_project_0(){ return diag(6359, DiagnosticCategory::Message, "Updating_output_timestamps_of_project_0_6359", "Updating output timestamps of project '{0}'..."); }; - static shared Project_0_is_up_to_date(){ return diag(6361, DiagnosticCategory::Message, "Project_0_is_up_to_date_6361", "Project '{0}' is up to date"); }; - static shared Skipping_build_of_project_0_because_its_dependency_1_has_errors(){ return diag(6362, DiagnosticCategory::Message, "Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362", "Skipping build of project '{0}' because its dependency '{1}' has errors"); }; - static shared Project_0_can_t_be_built_because_its_dependency_1_has_errors(){ return diag(6363, DiagnosticCategory::Message, "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363", "Project '{0}' can't be built because its dependency '{1}' has errors"); }; - static shared Build_one_or_more_projects_and_their_dependencies_if_out_of_date(){ return diag(6364, DiagnosticCategory::Message, "Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364", "Build one or more projects and their dependencies, if out of date"); }; - static shared Delete_the_outputs_of_all_projects(){ return diag(6365, DiagnosticCategory::Message, "Delete_the_outputs_of_all_projects_6365", "Delete the outputs of all projects"); }; - static shared Show_what_would_be_built_or_deleted_if_specified_with_clean(){ return diag(6367, DiagnosticCategory::Message, "Show_what_would_be_built_or_deleted_if_specified_with_clean_6367", "Show what would be built (or deleted, if specified with '--clean')"); }; - static shared Option_build_must_be_the_first_command_line_argument(){ return diag(6369, DiagnosticCategory::Error, "Option_build_must_be_the_first_command_line_argument_6369", "Option '--build' must be the first command line argument."); }; - static shared Options_0_and_1_cannot_be_combined(){ return diag(6370, DiagnosticCategory::Error, "Options_0_and_1_cannot_be_combined_6370", "Options '{0}' and '{1}' cannot be combined."); }; - static shared Updating_unchanged_output_timestamps_of_project_0(){ return diag(6371, DiagnosticCategory::Message, "Updating_unchanged_output_timestamps_of_project_0_6371", "Updating unchanged output timestamps of project '{0}'..."); }; - static shared Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed(){ return diag(6372, DiagnosticCategory::Message, "Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed_6372", "Project '{0}' is out of date because output of its dependency '{1}' has changed"); }; - static shared Updating_output_of_project_0(){ return diag(6373, DiagnosticCategory::Message, "Updating_output_of_project_0_6373", "Updating output of project '{0}'..."); }; - static shared A_non_dry_build_would_update_timestamps_for_output_of_project_0(){ return diag(6374, DiagnosticCategory::Message, "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374", "A non-dry build would update timestamps for output of project '{0}'"); }; - static shared A_non_dry_build_would_update_output_of_project_0(){ return diag(6375, DiagnosticCategory::Message, "A_non_dry_build_would_update_output_of_project_0_6375", "A non-dry build would update output of project '{0}'"); }; - static shared Cannot_update_output_of_project_0_because_there_was_error_reading_file_1(){ return diag(6376, DiagnosticCategory::Message, "Cannot_update_output_of_project_0_because_there_was_error_reading_file_1_6376", "Cannot update output of project '{0}' because there was error reading file '{1}'"); }; - static shared Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1(){ return diag(6377, DiagnosticCategory::Error, "Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377", "Cannot write file '{0}' because it will overwrite '.tsbuildinfo' file generated by referenced project '{1}'"); }; - static shared Enable_incremental_compilation(){ return diag(6378, DiagnosticCategory::Message, "Enable_incremental_compilation_6378", "Enable incremental compilation"); }; - static shared Composite_projects_may_not_disable_incremental_compilation(){ return diag(6379, DiagnosticCategory::Error, "Composite_projects_may_not_disable_incremental_compilation_6379", "Composite projects may not disable incremental compilation."); }; - static shared Specify_file_to_store_incremental_compilation_information(){ return diag(6380, DiagnosticCategory::Message, "Specify_file_to_store_incremental_compilation_information_6380", "Specify file to store incremental compilation information"); }; - static shared Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2(){ return diag(6381, DiagnosticCategory::Message, "Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381", "Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'"); }; - static shared Skipping_build_of_project_0_because_its_dependency_1_was_not_built(){ return diag(6382, DiagnosticCategory::Message, "Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382", "Skipping build of project '{0}' because its dependency '{1}' was not built"); }; - static shared Project_0_can_t_be_built_because_its_dependency_1_was_not_built(){ return diag(6383, DiagnosticCategory::Message, "Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383", "Project '{0}' can't be built because its dependency '{1}' was not built"); }; - static shared Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it(){ return diag(6384, DiagnosticCategory::Message, "Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384", "Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it."); }; - static shared _0_is_deprecated(){ return diag(6385, DiagnosticCategory::Suggestion, "_0_is_deprecated_6385", "'{0}' is deprecated.", /*reportsUnnecessary*/ false, /*elidedInCompatabilityPyramid*/ false, /*reportsDeprecated*/ true); }; - static shared Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found(){ return diag(6386, DiagnosticCategory::Message, "Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_nativ_6386", + static shared_ptr Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3(){ return diag(6229, DiagnosticCategory::Error, "Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3_6229", "Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'."); }; + static shared_ptr Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line(){ return diag(6230, DiagnosticCategory::Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line_6230", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'false' or 'null' on command line."); }; + static shared_ptr Could_not_resolve_the_path_0_with_the_extensions_Colon_1(){ return diag(6231, DiagnosticCategory::Error, "Could_not_resolve_the_path_0_with_the_extensions_Colon_1_6231", "Could not resolve the path '{0}' with the extensions: {1}."); }; + static shared_ptr Declaration_augments_declaration_in_another_file_This_cannot_be_serialized(){ return diag(6232, DiagnosticCategory::Error, "Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232", "Declaration augments declaration in another file. This cannot be serialized."); }; + static shared_ptr This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file(){ return diag(6233, DiagnosticCategory::Error, "This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233", "This is the declaration being augmented. Consider moving the augmenting declaration into the same file."); }; + static shared_ptr This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without(){ return diag(6234, DiagnosticCategory::Error, "This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without_6234", "This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?"); }; + static shared_ptr Disable_loading_referenced_projects(){ return diag(6235, DiagnosticCategory::Message, "Disable_loading_referenced_projects_6235", "Disable loading referenced projects."); }; + static shared_ptr Arguments_for_the_rest_parameter_0_were_not_provided(){ return diag(6236, DiagnosticCategory::Error, "Arguments_for_the_rest_parameter_0_were_not_provided_6236", "Arguments for the rest parameter '{0}' were not provided."); }; + static shared_ptr Generates_an_event_trace_and_a_list_of_types(){ return diag(6237, DiagnosticCategory::Message, "Generates_an_event_trace_and_a_list_of_types_6237", "Generates an event trace and a list of types."); }; + static shared_ptr Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react(){ return diag(6238, DiagnosticCategory::Error, "Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react_6238", "Specify the module specifier to be used to import the 'jsx' and 'jsxs' factory functions from. eg, react"); }; + static shared_ptr File_0_exists_according_to_earlier_cached_lookups(){ return diag(6239, DiagnosticCategory::Message, "File_0_exists_according_to_earlier_cached_lookups_6239", "File '{0}' exists according to earlier cached lookups."); }; + static shared_ptr File_0_does_not_exist_according_to_earlier_cached_lookups(){ return diag(6240, DiagnosticCategory::Message, "File_0_does_not_exist_according_to_earlier_cached_lookups_6240", "File '{0}' does not exist according to earlier cached lookups."); }; + static shared_ptr Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1(){ return diag(6241, DiagnosticCategory::Message, "Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1_6241", "Resolution for type reference directive '{0}' was found in cache from location '{1}'."); }; + static shared_ptr Resolving_type_reference_directive_0_containing_file_1(){ return diag(6242, DiagnosticCategory::Message, "Resolving_type_reference_directive_0_containing_file_1_6242", "======== Resolving type reference directive '{0}', containing file '{1}'. ========"); }; + static shared_ptr Interpret_optional_property_types_as_written_rather_than_adding_undefined(){ return diag(6243, DiagnosticCategory::Message, "Interpret_optional_property_types_as_written_rather_than_adding_undefined_6243", "Interpret optional property types as written, rather than adding 'undefined'."); }; + static shared_ptr Modules(){ return diag(6244, DiagnosticCategory::Message, "Modules_6244", "Modules"); }; + static shared_ptr File_Management(){ return diag(6245, DiagnosticCategory::Message, "File_Management_6245", "File Management"); }; + static shared_ptr Emit(){ return diag(6246, DiagnosticCategory::Message, "Emit_6246", "Emit"); }; + static shared_ptr JavaScript_Support(){ return diag(6247, DiagnosticCategory::Message, "JavaScript_Support_6247", "JavaScript Support"); }; + static shared_ptr Type_Checking(){ return diag(6248, DiagnosticCategory::Message, "Type_Checking_6248", "Type Checking"); }; + static shared_ptr Editor_Support(){ return diag(6249, DiagnosticCategory::Message, "Editor_Support_6249", "Editor Support"); }; + static shared_ptr Watch_and_Build_Modes(){ return diag(6250, DiagnosticCategory::Message, "Watch_and_Build_Modes_6250", "Watch and Build Modes"); }; + static shared_ptr Compiler_Diagnostics(){ return diag(6251, DiagnosticCategory::Message, "Compiler_Diagnostics_6251", "Compiler Diagnostics"); }; + static shared_ptr Interop_Constraints(){ return diag(6252, DiagnosticCategory::Message, "Interop_Constraints_6252", "Interop Constraints"); }; + static shared_ptr Backwards_Compatibility(){ return diag(6253, DiagnosticCategory::Message, "Backwards_Compatibility_6253", "Backwards Compatibility"); }; + static shared_ptr Language_and_Environment(){ return diag(6254, DiagnosticCategory::Message, "Language_and_Environment_6254", "Language and Environment"); }; + static shared_ptr Projects(){ return diag(6255, DiagnosticCategory::Message, "Projects_6255", "Projects"); }; + static shared_ptr Output_Formatting(){ return diag(6256, DiagnosticCategory::Message, "Output_Formatting_6256", "Output Formatting"); }; + static shared_ptr Completeness(){ return diag(6257, DiagnosticCategory::Message, "Completeness_6257", "Completeness"); }; + static shared_ptr _0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file(){ return diag(6258, DiagnosticCategory::Error, "_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file_6258", "'{0}' should be set inside the 'compilerOptions' object of the config json file"); }; + static shared_ptr Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve(){ return diag(6270, DiagnosticCategory::Message, "Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve_6270", "Directory '{0}' has no containing package.json scope. Imports will not resolve."); }; + static shared_ptr Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1(){ return diag(6271, DiagnosticCategory::Message, "Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6271", "Import specifier '{0}' does not exist in package.json scope at path '{1}'."); }; + static shared_ptr Invalid_import_specifier_0_has_no_possible_resolutions(){ return diag(6272, DiagnosticCategory::Message, "Invalid_import_specifier_0_has_no_possible_resolutions_6272", "Invalid import specifier '{0}' has no possible resolutions."); }; + static shared_ptr package_json_scope_0_has_no_imports_defined(){ return diag(6273, DiagnosticCategory::Message, "package_json_scope_0_has_no_imports_defined_6273", "package.json scope '{0}' has no imports defined."); }; + static shared_ptr package_json_scope_0_explicitly_maps_specifier_1_to_null(){ return diag(6274, DiagnosticCategory::Message, "package_json_scope_0_explicitly_maps_specifier_1_to_null_6274", "package.json scope '{0}' explicitly maps specifier '{1}' to null."); }; + static shared_ptr package_json_scope_0_has_invalid_type_for_target_of_specifier_1(){ return diag(6275, DiagnosticCategory::Message, "package_json_scope_0_has_invalid_type_for_target_of_specifier_1_6275", "package.json scope '{0}' has invalid type for target of specifier '{1}'"); }; + static shared_ptr Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1(){ return diag(6276, DiagnosticCategory::Message, "Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6276", "Export specifier '{0}' does not exist in package.json scope at path '{1}'."); }; + static shared_ptr Enable_project_compilation(){ return diag(6302, DiagnosticCategory::Message, "Enable_project_compilation_6302", "Enable project compilation"); }; + static shared_ptr Composite_projects_may_not_disable_declaration_emit(){ return diag(6304, DiagnosticCategory::Error, "Composite_projects_may_not_disable_declaration_emit_6304", "Composite projects may not disable declaration emit."); }; + static shared_ptr Output_file_0_has_not_been_built_from_source_file_1(){ return diag(6305, DiagnosticCategory::Error, "Output_file_0_has_not_been_built_from_source_file_1_6305", "Output file '{0}' has not been built from source file '{1}'."); }; + static shared_ptr Referenced_project_0_must_have_setting_composite_Colon_true(){ return diag(6306, DiagnosticCategory::Error, "Referenced_project_0_must_have_setting_composite_Colon_true_6306", "Referenced project '{0}' must have setting \"composite\": true."); }; + static shared_ptr File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern(){ return diag(6307, DiagnosticCategory::Error, "File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307", "File '{0}' is not listed within the file list of project '{1}'. Projects must list all files or use an 'include' pattern."); }; + static shared_ptr Cannot_prepend_project_0_because_it_does_not_have_outFile_set(){ return diag(6308, DiagnosticCategory::Error, "Cannot_prepend_project_0_because_it_does_not_have_outFile_set_6308", "Cannot prepend project '{0}' because it does not have 'outFile' set"); }; + static shared_ptr Output_file_0_from_project_1_does_not_exist(){ return diag(6309, DiagnosticCategory::Error, "Output_file_0_from_project_1_does_not_exist_6309", "Output file '{0}' from project '{1}' does not exist"); }; + static shared_ptr Referenced_project_0_may_not_disable_emit(){ return diag(6310, DiagnosticCategory::Error, "Referenced_project_0_may_not_disable_emit_6310", "Referenced project '{0}' may not disable emit."); }; + static shared_ptr Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2(){ return diag(6350, DiagnosticCategory::Message, "Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350", "Project '{0}' is out of date because oldest output '{1}' is older than newest input '{2}'"); }; + static shared_ptr Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2(){ return diag(6351, DiagnosticCategory::Message, "Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351", "Project '{0}' is up to date because newest input '{1}' is older than oldest output '{2}'"); }; + static shared_ptr Project_0_is_out_of_date_because_output_file_1_does_not_exist(){ return diag(6352, DiagnosticCategory::Message, "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352", "Project '{0}' is out of date because output file '{1}' does not exist"); }; + static shared_ptr Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date(){ return diag(6353, DiagnosticCategory::Message, "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353", "Project '{0}' is out of date because its dependency '{1}' is out of date"); }; + static shared_ptr Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies(){ return diag(6354, DiagnosticCategory::Message, "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354", "Project '{0}' is up to date with .d.ts files from its dependencies"); }; + static shared_ptr Projects_in_this_build_Colon_0(){ return diag(6355, DiagnosticCategory::Message, "Projects_in_this_build_Colon_0_6355", "Projects in this build: {0}"); }; + static shared_ptr A_non_dry_build_would_delete_the_following_files_Colon_0(){ return diag(6356, DiagnosticCategory::Message, "A_non_dry_build_would_delete_the_following_files_Colon_0_6356", "A non-dry build would delete the following files: {0}"); }; + static shared_ptr A_non_dry_build_would_build_project_0(){ return diag(6357, DiagnosticCategory::Message, "A_non_dry_build_would_build_project_0_6357", "A non-dry build would build project '{0}'"); }; + static shared_ptr Building_project_0(){ return diag(6358, DiagnosticCategory::Message, "Building_project_0_6358", "Building project '{0}'..."); }; + static shared_ptr Updating_output_timestamps_of_project_0(){ return diag(6359, DiagnosticCategory::Message, "Updating_output_timestamps_of_project_0_6359", "Updating output timestamps of project '{0}'..."); }; + static shared_ptr Project_0_is_up_to_date(){ return diag(6361, DiagnosticCategory::Message, "Project_0_is_up_to_date_6361", "Project '{0}' is up to date"); }; + static shared_ptr Skipping_build_of_project_0_because_its_dependency_1_has_errors(){ return diag(6362, DiagnosticCategory::Message, "Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362", "Skipping build of project '{0}' because its dependency '{1}' has errors"); }; + static shared_ptr Project_0_can_t_be_built_because_its_dependency_1_has_errors(){ return diag(6363, DiagnosticCategory::Message, "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363", "Project '{0}' can't be built because its dependency '{1}' has errors"); }; + static shared_ptr Build_one_or_more_projects_and_their_dependencies_if_out_of_date(){ return diag(6364, DiagnosticCategory::Message, "Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364", "Build one or more projects and their dependencies, if out of date"); }; + static shared_ptr Delete_the_outputs_of_all_projects(){ return diag(6365, DiagnosticCategory::Message, "Delete_the_outputs_of_all_projects_6365", "Delete the outputs of all projects"); }; + static shared_ptr Show_what_would_be_built_or_deleted_if_specified_with_clean(){ return diag(6367, DiagnosticCategory::Message, "Show_what_would_be_built_or_deleted_if_specified_with_clean_6367", "Show what would be built (or deleted, if specified with '--clean')"); }; + static shared_ptr Option_build_must_be_the_first_command_line_argument(){ return diag(6369, DiagnosticCategory::Error, "Option_build_must_be_the_first_command_line_argument_6369", "Option '--build' must be the first command line argument."); }; + static shared_ptr Options_0_and_1_cannot_be_combined(){ return diag(6370, DiagnosticCategory::Error, "Options_0_and_1_cannot_be_combined_6370", "Options '{0}' and '{1}' cannot be combined."); }; + static shared_ptr Updating_unchanged_output_timestamps_of_project_0(){ return diag(6371, DiagnosticCategory::Message, "Updating_unchanged_output_timestamps_of_project_0_6371", "Updating unchanged output timestamps of project '{0}'..."); }; + static shared_ptr Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed(){ return diag(6372, DiagnosticCategory::Message, "Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed_6372", "Project '{0}' is out of date because output of its dependency '{1}' has changed"); }; + static shared_ptr Updating_output_of_project_0(){ return diag(6373, DiagnosticCategory::Message, "Updating_output_of_project_0_6373", "Updating output of project '{0}'..."); }; + static shared_ptr A_non_dry_build_would_update_timestamps_for_output_of_project_0(){ return diag(6374, DiagnosticCategory::Message, "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374", "A non-dry build would update timestamps for output of project '{0}'"); }; + static shared_ptr A_non_dry_build_would_update_output_of_project_0(){ return diag(6375, DiagnosticCategory::Message, "A_non_dry_build_would_update_output_of_project_0_6375", "A non-dry build would update output of project '{0}'"); }; + static shared_ptr Cannot_update_output_of_project_0_because_there_was_error_reading_file_1(){ return diag(6376, DiagnosticCategory::Message, "Cannot_update_output_of_project_0_because_there_was_error_reading_file_1_6376", "Cannot update output of project '{0}' because there was error reading file '{1}'"); }; + static shared_ptr Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1(){ return diag(6377, DiagnosticCategory::Error, "Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377", "Cannot write file '{0}' because it will overwrite '.tsbuildinfo' file generated by referenced project '{1}'"); }; + static shared_ptr Enable_incremental_compilation(){ return diag(6378, DiagnosticCategory::Message, "Enable_incremental_compilation_6378", "Enable incremental compilation"); }; + static shared_ptr Composite_projects_may_not_disable_incremental_compilation(){ return diag(6379, DiagnosticCategory::Error, "Composite_projects_may_not_disable_incremental_compilation_6379", "Composite projects may not disable incremental compilation."); }; + static shared_ptr Specify_file_to_store_incremental_compilation_information(){ return diag(6380, DiagnosticCategory::Message, "Specify_file_to_store_incremental_compilation_information_6380", "Specify file to store incremental compilation information"); }; + static shared_ptr Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2(){ return diag(6381, DiagnosticCategory::Message, "Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381", "Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'"); }; + static shared_ptr Skipping_build_of_project_0_because_its_dependency_1_was_not_built(){ return diag(6382, DiagnosticCategory::Message, "Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382", "Skipping build of project '{0}' because its dependency '{1}' was not built"); }; + static shared_ptr Project_0_can_t_be_built_because_its_dependency_1_was_not_built(){ return diag(6383, DiagnosticCategory::Message, "Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383", "Project '{0}' can't be built because its dependency '{1}' was not built"); }; + static shared_ptr Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it(){ return diag(6384, DiagnosticCategory::Message, "Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384", "Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it."); }; + static shared_ptr _0_is_deprecated(){ return diag(6385, DiagnosticCategory::Suggestion, "_0_is_deprecated_6385", "'{0}' is deprecated.", /*reportsUnnecessary*/ false, /*elidedInCompatabilityPyramid*/ false, /*reportsDeprecated*/ true); }; + static shared_ptr Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found(){ return diag(6386, DiagnosticCategory::Message, "Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_nativ_6386", "Performance timings for '--diagnostics' or '--extendedDiagnostics' are not available in this session. A native implementation of the Web Performance API could not be found."); }; - static shared The_signature_0_of_1_is_deprecated(){ return diag(6387, DiagnosticCategory::Suggestion, "The_signature_0_of_1_is_deprecated_6387", "The signature '{0}' of '{1}' is deprecated.", /*reportsUnnecessary*/ false, /*elidedInCompatabilityPyramid*/ false, /*reportsDeprecated*/ true); }; - static shared Project_0_is_being_forcibly_rebuilt(){ return diag(6388, DiagnosticCategory::Message, "Project_0_is_being_forcibly_rebuilt_6388", "Project '{0}' is being forcibly rebuilt"); }; - static shared Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved(){ return diag(6389, DiagnosticCategory::Message, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved_6389", "Reusing resolution of module '{0}' from '{1}' of old program, it was not resolved."); }; - static shared Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2(){ return diag(6390, DiagnosticCategory::Message, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6390", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."); }; - static shared Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3(){ return diag(6391, DiagnosticCategory::Message, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6391", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."); }; - static shared Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved(){ return diag(6392, DiagnosticCategory::Message, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved_6392", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was not resolved."); }; - static shared Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3(){ return diag(6393, DiagnosticCategory::Message, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6393", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."); }; - static shared Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4(){ return diag(6394, DiagnosticCategory::Message, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6394", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."); }; - static shared Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved(){ return diag(6395, DiagnosticCategory::Message, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved_6395", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was not resolved."); }; - static shared Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3(){ return diag(6396, DiagnosticCategory::Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6396", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."); }; - static shared Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4(){ return diag(6397, DiagnosticCategory::Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6397", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."); }; - static shared Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved(){ return diag(6398, DiagnosticCategory::Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_re_6398", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was not resolved."); }; - static shared The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1(){ return diag(6500, DiagnosticCategory::Message, "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500", "The expected type comes from property '{0}' which is declared here on type '{1}'"); }; - static shared The_expected_type_comes_from_this_index_signature(){ return diag(6501, DiagnosticCategory::Message, "The_expected_type_comes_from_this_index_signature_6501", "The expected type comes from this index signature."); }; - static shared The_expected_type_comes_from_the_return_type_of_this_signature(){ return diag(6502, DiagnosticCategory::Message, "The_expected_type_comes_from_the_return_type_of_this_signature_6502", "The expected type comes from the return type of this signature."); }; - static shared Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing(){ return diag(6503, DiagnosticCategory::Message, "Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503", "Print names of files that are part of the compilation and then stop processing."); }; - static shared File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option(){ return diag(6504, DiagnosticCategory::Error, "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504", "File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?"); }; - static shared Print_names_of_files_and_the_reason_they_are_part_of_the_compilation(){ return diag(6505, DiagnosticCategory::Message, "Print_names_of_files_and_the_reason_they_are_part_of_the_compilation_6505", "Print names of files and the reason they are part of the compilation."); }; - static shared Consider_adding_a_declare_modifier_to_this_class(){ return diag(6506, DiagnosticCategory::Message, "Consider_adding_a_declare_modifier_to_this_class_6506", "Consider adding a 'declare' modifier to this class."); }; - static shared Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files(){ return diag(6600, DiagnosticCategory::Message, "Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these__6600", "Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files."); }; - static shared Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export(){ return diag(6601, DiagnosticCategory::Message, "Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export_6601", "Allow 'import x from y' when a module doesn't have a default export."); }; - static shared Allow_accessing_UMD_globals_from_modules(){ return diag(6602, DiagnosticCategory::Message, "Allow_accessing_UMD_globals_from_modules_6602", "Allow accessing UMD globals from modules."); }; - static shared Disable_error_reporting_for_unreachable_code(){ return diag(6603, DiagnosticCategory::Message, "Disable_error_reporting_for_unreachable_code_6603", "Disable error reporting for unreachable code."); }; - static shared Disable_error_reporting_for_unused_labels(){ return diag(6604, DiagnosticCategory::Message, "Disable_error_reporting_for_unused_labels_6604", "Disable error reporting for unused labels."); }; - static shared Ensure_use_strict_is_always_emitted(){ return diag(6605, DiagnosticCategory::Message, "Ensure_use_strict_is_always_emitted_6605", "Ensure 'use strict' is always emitted."); }; - static shared Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it(){ return diag(6606, DiagnosticCategory::Message, "Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_wi_6606", "Have recompiles in projects that use `incremental` and `watch` mode assume that changes within a file will only affect files directly depending on it."); }; - static shared Specify_the_base_directory_to_resolve_non_relative_module_names(){ return diag(6607, DiagnosticCategory::Message, "Specify_the_base_directory_to_resolve_non_relative_module_names_6607", "Specify the base directory to resolve non-relative module names."); }; - static shared No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files(){ return diag(6608, DiagnosticCategory::Message, "No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files_6608", "No longer supported. In early versions, manually set the text encoding for reading files."); }; - static shared Enable_error_reporting_in_type_checked_JavaScript_files(){ return diag(6609, DiagnosticCategory::Message, "Enable_error_reporting_in_type_checked_JavaScript_files_6609", "Enable error reporting in type-checked JavaScript files."); }; - static shared Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references(){ return diag(6611, DiagnosticCategory::Message, "Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references_6611", "Enable constraints that allow a TypeScript project to be used with project references."); }; - static shared Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project(){ return diag(6612, DiagnosticCategory::Message, "Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project_6612", "Generate .d.ts files from TypeScript and JavaScript files in your project."); }; - static shared Specify_the_output_directory_for_generated_declaration_files(){ return diag(6613, DiagnosticCategory::Message, "Specify_the_output_directory_for_generated_declaration_files_6613", "Specify the output directory for generated declaration files."); }; - static shared Create_sourcemaps_for_d_ts_files(){ return diag(6614, DiagnosticCategory::Message, "Create_sourcemaps_for_d_ts_files_6614", "Create sourcemaps for d.ts files."); }; - static shared Output_compiler_performance_information_after_building(){ return diag(6615, DiagnosticCategory::Message, "Output_compiler_performance_information_after_building_6615", "Output compiler performance information after building."); }; - static shared Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project(){ return diag(6616, DiagnosticCategory::Message, "Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project_6616", "Disables inference for type acquisition by looking at filenames in a project."); }; - static shared Reduce_the_number_of_projects_loaded_automatically_by_TypeScript(){ return diag(6617, DiagnosticCategory::Message, "Reduce_the_number_of_projects_loaded_automatically_by_TypeScript_6617", "Reduce the number of projects loaded automatically by TypeScript."); }; - static shared Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server(){ return diag(6618, DiagnosticCategory::Message, "Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server_6618", "Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server."); }; - static shared Opt_a_project_out_of_multi_project_reference_checking_when_editing(){ return diag(6619, DiagnosticCategory::Message, "Opt_a_project_out_of_multi_project_reference_checking_when_editing_6619", "Opt a project out of multi-project reference checking when editing."); }; - static shared Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects(){ return diag(6620, DiagnosticCategory::Message, "Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects_6620", "Disable preferring source files instead of declaration files when referencing composite projects"); }; - static shared Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration(){ return diag(6621, DiagnosticCategory::Message, "Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration_6621", "Emit more compliant, but verbose and less performant JavaScript for iteration."); }; - static shared Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files(){ return diag(6622, DiagnosticCategory::Message, "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6622", "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."); }; - static shared Only_output_d_ts_files_and_not_JavaScript_files(){ return diag(6623, DiagnosticCategory::Message, "Only_output_d_ts_files_and_not_JavaScript_files_6623", "Only output d.ts files and not JavaScript files."); }; - static shared Emit_design_type_metadata_for_decorated_declarations_in_source_files(){ return diag(6624, DiagnosticCategory::Message, "Emit_design_type_metadata_for_decorated_declarations_in_source_files_6624", "Emit design-type metadata for decorated declarations in source files."); }; - static shared Disable_the_type_acquisition_for_JavaScript_projects(){ return diag(6625, DiagnosticCategory::Message, "Disable_the_type_acquisition_for_JavaScript_projects_6625", "Disable the type acquisition for JavaScript projects"); }; - static shared Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility(){ return diag(6626, DiagnosticCategory::Message, "Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheti_6626", "Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility."); }; - static shared Filters_results_from_the_include_option(){ return diag(6627, DiagnosticCategory::Message, "Filters_results_from_the_include_option_6627", "Filters results from the `include` option."); }; - static shared Remove_a_list_of_directories_from_the_watch_process(){ return diag(6628, DiagnosticCategory::Message, "Remove_a_list_of_directories_from_the_watch_process_6628", "Remove a list of directories from the watch process."); }; - static shared Remove_a_list_of_files_from_the_watch_mode_s_processing(){ return diag(6629, DiagnosticCategory::Message, "Remove_a_list_of_files_from_the_watch_mode_s_processing_6629", "Remove a list of files from the watch mode's processing."); }; - static shared Enable_experimental_support_for_TC39_stage_2_draft_decorators(){ return diag(6630, DiagnosticCategory::Message, "Enable_experimental_support_for_TC39_stage_2_draft_decorators_6630", "Enable experimental support for TC39 stage 2 draft decorators."); }; - static shared Print_files_read_during_the_compilation_including_why_it_was_included(){ return diag(6631, DiagnosticCategory::Message, "Print_files_read_during_the_compilation_including_why_it_was_included_6631", "Print files read during the compilation including why it was included."); }; - static shared Output_more_detailed_compiler_performance_information_after_building(){ return diag(6632, DiagnosticCategory::Message, "Output_more_detailed_compiler_performance_information_after_building_6632", "Output more detailed compiler performance information after building."); }; - static shared Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_are_inherited(){ return diag(6633, DiagnosticCategory::Message, "Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_a_6633", "Specify one or more path or node module references to base configuration files from which settings are inherited."); }; - static shared Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers(){ return diag(6634, DiagnosticCategory::Message, "Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers_6634", "Specify what approach the watcher should use if the system runs out of native file watchers."); }; - static shared Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include(){ return diag(6635, DiagnosticCategory::Message, "Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include_6635", "Include a list of files. This does not support glob patterns, as opposed to `include`."); }; - static shared Build_all_projects_including_those_that_appear_to_be_up_to_date(){ return diag(6636, DiagnosticCategory::Message, "Build_all_projects_including_those_that_appear_to_be_up_to_date_6636", "Build all projects, including those that appear to be up to date"); }; - static shared Ensure_that_casing_is_correct_in_imports(){ return diag(6637, DiagnosticCategory::Message, "Ensure_that_casing_is_correct_in_imports_6637", "Ensure that casing is correct in imports."); }; - static shared Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging(){ return diag(6638, DiagnosticCategory::Message, "Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging_6638", "Emit a v8 CPU profile of the compiler run for debugging."); }; - static shared Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file(){ return diag(6639, DiagnosticCategory::Message, "Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file_6639", "Allow importing helper functions from tslib once per project, instead of including them per-file."); }; - static shared Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation(){ return diag(6641, DiagnosticCategory::Message, "Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation_6641", "Specify a list of glob patterns that match files to be included in compilation."); }; - static shared Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects(){ return diag(6642, DiagnosticCategory::Message, "Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects_6642", "Save .tsbuildinfo files to allow for incremental compilation of projects."); }; - static shared Include_sourcemap_files_inside_the_emitted_JavaScript(){ return diag(6643, DiagnosticCategory::Message, "Include_sourcemap_files_inside_the_emitted_JavaScript_6643", "Include sourcemap files inside the emitted JavaScript."); }; - static shared Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript(){ return diag(6644, DiagnosticCategory::Message, "Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript_6644", "Include source code in the sourcemaps inside the emitted JavaScript."); }; - static shared Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports(){ return diag(6645, DiagnosticCategory::Message, "Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports_6645", "Ensure that each file can be safely transpiled without relying on other imports."); }; - static shared Specify_what_JSX_code_is_generated(){ return diag(6646, DiagnosticCategory::Message, "Specify_what_JSX_code_is_generated_6646", "Specify what JSX code is generated."); }; - static shared Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h(){ return diag(6647, DiagnosticCategory::Message, "Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h_6647", "Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'"); }; - static shared Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment(){ return diag(6648, DiagnosticCategory::Message, "Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragme_6648", "Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'."); }; - static shared Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk(){ return diag(6649, DiagnosticCategory::Message, "Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Ast_6649", "Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.`"); }; - static shared Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option(){ return diag(6650, DiagnosticCategory::Message, "Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option_6650", "Make keyof only return strings instead of string, numbers or symbols. Legacy option."); }; - static shared Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment(){ return diag(6651, DiagnosticCategory::Message, "Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment_6651", "Specify a set of bundled library declaration files that describe the target runtime environment."); }; - static shared Print_the_names_of_emitted_files_after_a_compilation(){ return diag(6652, DiagnosticCategory::Message, "Print_the_names_of_emitted_files_after_a_compilation_6652", "Print the names of emitted files after a compilation."); }; - static shared Print_all_of_the_files_read_during_the_compilation(){ return diag(6653, DiagnosticCategory::Message, "Print_all_of_the_files_read_during_the_compilation_6653", "Print all of the files read during the compilation."); }; - static shared Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit(){ return diag(6654, DiagnosticCategory::Message, "Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit_6654", "Set the language of the messaging from TypeScript. This does not affect emit."); }; - static shared Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations(){ return diag(6655, DiagnosticCategory::Message, "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6655", "Specify the location where debugger should locate map files instead of generated locations."); }; - static shared Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs(){ return diag(6656, DiagnosticCategory::Message, "Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicabl_6656", "Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`."); }; - static shared Specify_what_module_code_is_generated(){ return diag(6657, DiagnosticCategory::Message, "Specify_what_module_code_is_generated_6657", "Specify what module code is generated."); }; - static shared Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier(){ return diag(6658, DiagnosticCategory::Message, "Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier_6658", "Specify how TypeScript looks up a file from a given module specifier."); }; - static shared Set_the_newline_character_for_emitting_files(){ return diag(6659, DiagnosticCategory::Message, "Set_the_newline_character_for_emitting_files_6659", "Set the newline character for emitting files."); }; - static shared Disable_emitting_files_from_a_compilation(){ return diag(6660, DiagnosticCategory::Message, "Disable_emitting_files_from_a_compilation_6660", "Disable emitting files from a compilation."); }; - static shared Disable_generating_custom_helper_functions_like_extends_in_compiled_output(){ return diag(6661, DiagnosticCategory::Message, "Disable_generating_custom_helper_functions_like_extends_in_compiled_output_6661", "Disable generating custom helper functions like `__extends` in compiled output."); }; - static shared Disable_emitting_files_if_any_type_checking_errors_are_reported(){ return diag(6662, DiagnosticCategory::Message, "Disable_emitting_files_if_any_type_checking_errors_are_reported_6662", "Disable emitting files if any type checking errors are reported."); }; - static shared Disable_truncating_types_in_error_messages(){ return diag(6663, DiagnosticCategory::Message, "Disable_truncating_types_in_error_messages_6663", "Disable truncating types in error messages."); }; - static shared Enable_error_reporting_for_fallthrough_cases_in_switch_statements(){ return diag(6664, DiagnosticCategory::Message, "Enable_error_reporting_for_fallthrough_cases_in_switch_statements_6664", "Enable error reporting for fallthrough cases in switch statements."); }; - static shared Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type(){ return diag(6665, DiagnosticCategory::Message, "Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type_6665", "Enable error reporting for expressions and declarations with an implied `any` type.."); }; - static shared Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier(){ return diag(6666, DiagnosticCategory::Message, "Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier_6666", "Ensure overriding members in derived classes are marked with an override modifier."); }; - static shared Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function(){ return diag(6667, DiagnosticCategory::Message, "Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function_6667", "Enable error reporting for codepaths that do not explicitly return in a function."); }; - static shared Enable_error_reporting_when_this_is_given_the_type_any(){ return diag(6668, DiagnosticCategory::Message, "Enable_error_reporting_when_this_is_given_the_type_any_6668", "Enable error reporting when `this` is given the type `any`."); }; - static shared Disable_adding_use_strict_directives_in_emitted_JavaScript_files(){ return diag(6669, DiagnosticCategory::Message, "Disable_adding_use_strict_directives_in_emitted_JavaScript_files_6669", "Disable adding 'use strict' directives in emitted JavaScript files."); }; - static shared Disable_including_any_library_files_including_the_default_lib_d_ts(){ return diag(6670, DiagnosticCategory::Message, "Disable_including_any_library_files_including_the_default_lib_d_ts_6670", "Disable including any library files, including the default lib.d.ts."); }; - static shared Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type(){ return diag(6671, DiagnosticCategory::Message, "Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type_6671", "Enforces using indexed accessors for keys declared using an indexed type"); }; - static shared Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project(){ return diag(6672, DiagnosticCategory::Message, "Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add__6672", "Disallow `import`s, `require`s or ``s from expanding the number of files TypeScript should add to a project."); }; - static shared Disable_strict_checking_of_generic_signatures_in_function_types(){ return diag(6673, DiagnosticCategory::Message, "Disable_strict_checking_of_generic_signatures_in_function_types_6673", "Disable strict checking of generic signatures in function types."); }; - static shared Add_undefined_to_a_type_when_accessed_using_an_index(){ return diag(6674, DiagnosticCategory::Message, "Add_undefined_to_a_type_when_accessed_using_an_index_6674", "Add `undefined` to a type when accessed using an index."); }; - static shared Enable_error_reporting_when_a_local_variables_aren_t_read(){ return diag(6675, DiagnosticCategory::Message, "Enable_error_reporting_when_a_local_variables_aren_t_read_6675", "Enable error reporting when a local variables aren't read."); }; - static shared Raise_an_error_when_a_function_parameter_isn_t_read(){ return diag(6676, DiagnosticCategory::Message, "Raise_an_error_when_a_function_parameter_isn_t_read_6676", "Raise an error when a function parameter isn't read"); }; - static shared Deprecated_setting_Use_outFile_instead(){ return diag(6677, DiagnosticCategory::Message, "Deprecated_setting_Use_outFile_instead_6677", "Deprecated setting. Use `outFile` instead."); }; - static shared Specify_an_output_folder_for_all_emitted_files(){ return diag(6678, DiagnosticCategory::Message, "Specify_an_output_folder_for_all_emitted_files_6678", "Specify an output folder for all emitted files."); }; - static shared Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output(){ return diag(6679, DiagnosticCategory::Message, "Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designa_6679", "Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output."); }; - static shared Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations(){ return diag(6680, DiagnosticCategory::Message, "Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations_6680", "Specify a set of entries that re-map imports to additional lookup locations."); }; - static shared Specify_a_list_of_language_service_plugins_to_include(){ return diag(6681, DiagnosticCategory::Message, "Specify_a_list_of_language_service_plugins_to_include_6681", "Specify a list of language service plugins to include."); }; - static shared Disable_erasing_const_enum_declarations_in_generated_code(){ return diag(6682, DiagnosticCategory::Message, "Disable_erasing_const_enum_declarations_in_generated_code_6682", "Disable erasing `const enum` declarations in generated code."); }; - static shared Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node(){ return diag(6683, DiagnosticCategory::Message, "Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node_6683", "Disable resolving symlinks to their realpath. This correlates to the same flag in node."); }; - static shared Disable_wiping_the_console_in_watch_mode(){ return diag(6684, DiagnosticCategory::Message, "Disable_wiping_the_console_in_watch_mode_6684", "Disable wiping the console in watch mode"); }; - static shared Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read(){ return diag(6685, DiagnosticCategory::Message, "Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read_6685", "Enable color and formatting in TypeScript's output to make compiler errors easier to read"); }; - static shared Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit(){ return diag(6686, DiagnosticCategory::Message, "Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit_6686", "Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit."); }; - static shared Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references(){ return diag(6687, DiagnosticCategory::Message, "Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references_6687", "Specify an array of objects that specify paths for projects. Used in project references."); }; - static shared Disable_emitting_comments(){ return diag(6688, DiagnosticCategory::Message, "Disable_emitting_comments_6688", "Disable emitting comments."); }; - static shared Enable_importing_json_files(){ return diag(6689, DiagnosticCategory::Message, "Enable_importing_json_files_6689", "Enable importing .json files"); }; - static shared Specify_the_root_folder_within_your_source_files(){ return diag(6690, DiagnosticCategory::Message, "Specify_the_root_folder_within_your_source_files_6690", "Specify the root folder within your source files."); }; - static shared Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules(){ return diag(6691, DiagnosticCategory::Message, "Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules_6691", "Allow multiple folders to be treated as one when resolving modules."); }; - static shared Skip_type_checking_d_ts_files_that_are_included_with_TypeScript(){ return diag(6692, DiagnosticCategory::Message, "Skip_type_checking_d_ts_files_that_are_included_with_TypeScript_6692", "Skip type checking .d.ts files that are included with TypeScript."); }; - static shared Skip_type_checking_all_d_ts_files(){ return diag(6693, DiagnosticCategory::Message, "Skip_type_checking_all_d_ts_files_6693", "Skip type checking all .d.ts files."); }; - static shared Create_source_map_files_for_emitted_JavaScript_files(){ return diag(6694, DiagnosticCategory::Message, "Create_source_map_files_for_emitted_JavaScript_files_6694", "Create source map files for emitted JavaScript files."); }; - static shared Specify_the_root_path_for_debuggers_to_find_the_reference_source_code(){ return diag(6695, DiagnosticCategory::Message, "Specify_the_root_path_for_debuggers_to_find_the_reference_source_code_6695", "Specify the root path for debuggers to find the reference source code."); }; - static shared Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function(){ return diag(6697, DiagnosticCategory::Message, "Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function_6697", "Check that the arguments for `bind`, `call`, and `apply` methods match the original function."); }; - static shared When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible(){ return diag(6698, DiagnosticCategory::Message, "When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible_6698", "When assigning functions, check to ensure parameters and the return values are subtype-compatible."); }; - static shared When_type_checking_take_into_account_null_and_undefined(){ return diag(6699, DiagnosticCategory::Message, "When_type_checking_take_into_account_null_and_undefined_6699", "When type checking, take into account `null` and `undefined`."); }; - static shared Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor(){ return diag(6700, DiagnosticCategory::Message, "Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor_6700", "Check for class properties that are declared but not set in the constructor."); }; - static shared Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments(){ return diag(6701, DiagnosticCategory::Message, "Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments_6701", "Disable emitting declarations that have `@internal` in their JSDoc comments."); }; - static shared Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals(){ return diag(6702, DiagnosticCategory::Message, "Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals_6702", "Disable reporting of excess property errors during the creation of object literals."); }; - static shared Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures(){ return diag(6703, DiagnosticCategory::Message, "Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures_6703", "Suppress `noImplicitAny` errors when indexing objects that lack index signatures."); }; - static shared Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively(){ return diag(6704, DiagnosticCategory::Message, "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6704", "Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively."); }; - static shared Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations(){ return diag(6705, DiagnosticCategory::Message, "Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declaratio_6705", "Set the JavaScript language version for emitted JavaScript and include compatible library declarations."); }; - static shared Log_paths_used_during_the_moduleResolution_process(){ return diag(6706, DiagnosticCategory::Message, "Log_paths_used_during_the_moduleResolution_process_6706", "Log paths used during the `moduleResolution` process."); }; - static shared Specify_the_folder_for_tsbuildinfo_incremental_compilation_files(){ return diag(6707, DiagnosticCategory::Message, "Specify_the_folder_for_tsbuildinfo_incremental_compilation_files_6707", "Specify the folder for .tsbuildinfo incremental compilation files."); }; - static shared Specify_options_for_automatic_acquisition_of_declaration_files(){ return diag(6709, DiagnosticCategory::Message, "Specify_options_for_automatic_acquisition_of_declaration_files_6709", "Specify options for automatic acquisition of declaration files."); }; - static shared Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types(){ return diag(6710, DiagnosticCategory::Message, "Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types_6710", "Specify multiple folders that act like `./node_modules/@types`."); }; - static shared Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file(){ return diag(6711, DiagnosticCategory::Message, "Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file_6711", "Specify type package names to be included without being referenced in a source file."); }; - static shared Emit_ECMAScript_standard_compliant_class_fields(){ return diag(6712, DiagnosticCategory::Message, "Emit_ECMAScript_standard_compliant_class_fields_6712", "Emit ECMAScript-standard-compliant class fields."); }; - static shared Enable_verbose_logging(){ return diag(6713, DiagnosticCategory::Message, "Enable_verbose_logging_6713", "Enable verbose logging"); }; - static shared Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality(){ return diag(6714, DiagnosticCategory::Message, "Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality_6714", "Specify how directories are watched on systems that lack recursive file-watching functionality."); }; - static shared Specify_how_the_TypeScript_watch_mode_works(){ return diag(6715, DiagnosticCategory::Message, "Specify_how_the_TypeScript_watch_mode_works_6715", "Specify how the TypeScript watch mode works."); }; - static shared Include_undefined_in_index_signature_results(){ return diag(6716, DiagnosticCategory::Message, "Include_undefined_in_index_signature_results_6716", "Include 'undefined' in index signature results"); }; - static shared Require_undeclared_properties_from_index_signatures_to_use_element_accesses(){ return diag(6717, DiagnosticCategory::Message, "Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6717", "Require undeclared properties from index signatures to use element accesses."); }; - static shared Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types(){ return diag(6718, DiagnosticCategory::Message, "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718", "Specify emit/checking behavior for imports that are only used for types"); }; - static shared Type_catch_clause_variables_as_unknown_instead_of_any(){ return diag(6803, DiagnosticCategory::Message, "Type_catch_clause_variables_as_unknown_instead_of_any_6803", "Type catch clause variables as 'unknown' instead of 'any'."); }; - static shared one_of_Colon(){ return diag(6900, DiagnosticCategory::Message, "one_of_Colon_6900", "one of:"); }; - static shared one_or_more_Colon(){ return diag(6901, DiagnosticCategory::Message, "one_or_more_Colon_6901", "one or more:"); }; - static shared type_Colon(){ return diag(6902, DiagnosticCategory::Message, "type_Colon_6902", "type:"); }; - static shared default_Colon(){ return diag(6903, DiagnosticCategory::Message, "default_Colon_6903", "default:"); }; - static shared module_system_or_esModuleInterop(){ return diag(6904, DiagnosticCategory::Message, "module_system_or_esModuleInterop_6904", "module === \"system\" or esModuleInterop"); }; - static shared false_unless_strict_is_set(){ return diag(6905, DiagnosticCategory::Message, "false_unless_strict_is_set_6905", "`false`, unless `strict` is set"); }; - static shared false_unless_composite_is_set(){ return diag(6906, DiagnosticCategory::Message, "false_unless_composite_is_set_6906", "`false`, unless `composite` is set"); }; - static shared node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified(){ return diag(6907, DiagnosticCategory::Message, "node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified_6907", "`[\"node_modules\", \"bower_components\", \"jspm_packages\"]`, plus the value of `outDir` if one is specified."); }; - static shared if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk(){ return diag(6908, DiagnosticCategory::Message, "if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk_6908", "`[]` if `files` is specified, otherwise `[\"**/*\"]`"); }; - static shared true_if_composite_false_otherwise(){ return diag(6909, DiagnosticCategory::Message, "true_if_composite_false_otherwise_6909", "`true` if `composite`, `false` otherwise"); }; - static shared module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node(){ return diag(69010, DiagnosticCategory::Message, "module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node_69010", "module === `AMD` or `UMD` or `System` or `ES6`, then `Classic`, Otherwise `Node`"); }; - static shared Computed_from_the_list_of_input_files(){ return diag(6911, DiagnosticCategory::Message, "Computed_from_the_list_of_input_files_6911", "Computed from the list of input files"); }; - static shared Platform_specific(){ return diag(6912, DiagnosticCategory::Message, "Platform_specific_6912", "Platform specific"); }; - static shared You_can_learn_about_all_of_the_compiler_options_at_0(){ return diag(6913, DiagnosticCategory::Message, "You_can_learn_about_all_of_the_compiler_options_at_0_6913", "You can learn about all of the compiler options at {0}"); }; - static shared Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon(){ return diag(6914, DiagnosticCategory::Message, "Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914", "Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:"); }; - static shared Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0(){ return diag(6915, DiagnosticCategory::Message, "Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_tr_6915", + static shared_ptr The_signature_0_of_1_is_deprecated(){ return diag(6387, DiagnosticCategory::Suggestion, "The_signature_0_of_1_is_deprecated_6387", "The signature '{0}' of '{1}' is deprecated.", /*reportsUnnecessary*/ false, /*elidedInCompatabilityPyramid*/ false, /*reportsDeprecated*/ true); }; + static shared_ptr Project_0_is_being_forcibly_rebuilt(){ return diag(6388, DiagnosticCategory::Message, "Project_0_is_being_forcibly_rebuilt_6388", "Project '{0}' is being forcibly rebuilt"); }; + static shared_ptr Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved(){ return diag(6389, DiagnosticCategory::Message, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved_6389", "Reusing resolution of module '{0}' from '{1}' of old program, it was not resolved."); }; + static shared_ptr Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2(){ return diag(6390, DiagnosticCategory::Message, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6390", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."); }; + static shared_ptr Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3(){ return diag(6391, DiagnosticCategory::Message, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6391", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."); }; + static shared_ptr Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved(){ return diag(6392, DiagnosticCategory::Message, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved_6392", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was not resolved."); }; + static shared_ptr Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3(){ return diag(6393, DiagnosticCategory::Message, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6393", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."); }; + static shared_ptr Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4(){ return diag(6394, DiagnosticCategory::Message, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6394", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."); }; + static shared_ptr Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved(){ return diag(6395, DiagnosticCategory::Message, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved_6395", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was not resolved."); }; + static shared_ptr Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3(){ return diag(6396, DiagnosticCategory::Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6396", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."); }; + static shared_ptr Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4(){ return diag(6397, DiagnosticCategory::Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6397", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."); }; + static shared_ptr Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved(){ return diag(6398, DiagnosticCategory::Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_re_6398", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was not resolved."); }; + static shared_ptr The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1(){ return diag(6500, DiagnosticCategory::Message, "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500", "The expected type comes from property '{0}' which is declared here on type '{1}'"); }; + static shared_ptr The_expected_type_comes_from_this_index_signature(){ return diag(6501, DiagnosticCategory::Message, "The_expected_type_comes_from_this_index_signature_6501", "The expected type comes from this index signature."); }; + static shared_ptr The_expected_type_comes_from_the_return_type_of_this_signature(){ return diag(6502, DiagnosticCategory::Message, "The_expected_type_comes_from_the_return_type_of_this_signature_6502", "The expected type comes from the return type of this signature."); }; + static shared_ptr Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing(){ return diag(6503, DiagnosticCategory::Message, "Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503", "Print names of files that are part of the compilation and then stop processing."); }; + static shared_ptr File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option(){ return diag(6504, DiagnosticCategory::Error, "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504", "File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?"); }; + static shared_ptr Print_names_of_files_and_the_reason_they_are_part_of_the_compilation(){ return diag(6505, DiagnosticCategory::Message, "Print_names_of_files_and_the_reason_they_are_part_of_the_compilation_6505", "Print names of files and the reason they are part of the compilation."); }; + static shared_ptr Consider_adding_a_declare_modifier_to_this_class(){ return diag(6506, DiagnosticCategory::Message, "Consider_adding_a_declare_modifier_to_this_class_6506", "Consider adding a 'declare' modifier to this class."); }; + static shared_ptr Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files(){ return diag(6600, DiagnosticCategory::Message, "Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these__6600", "Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files."); }; + static shared_ptr Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export(){ return diag(6601, DiagnosticCategory::Message, "Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export_6601", "Allow 'import x from y' when a module doesn't have a default export."); }; + static shared_ptr Allow_accessing_UMD_globals_from_modules(){ return diag(6602, DiagnosticCategory::Message, "Allow_accessing_UMD_globals_from_modules_6602", "Allow accessing UMD globals from modules."); }; + static shared_ptr Disable_error_reporting_for_unreachable_code(){ return diag(6603, DiagnosticCategory::Message, "Disable_error_reporting_for_unreachable_code_6603", "Disable error reporting for unreachable code."); }; + static shared_ptr Disable_error_reporting_for_unused_labels(){ return diag(6604, DiagnosticCategory::Message, "Disable_error_reporting_for_unused_labels_6604", "Disable error reporting for unused labels."); }; + static shared_ptr Ensure_use_strict_is_always_emitted(){ return diag(6605, DiagnosticCategory::Message, "Ensure_use_strict_is_always_emitted_6605", "Ensure 'use strict' is always emitted."); }; + static shared_ptr Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it(){ return diag(6606, DiagnosticCategory::Message, "Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_wi_6606", "Have recompiles in projects that use `incremental` and `watch` mode assume that changes within a file will only affect files directly depending on it."); }; + static shared_ptr Specify_the_base_directory_to_resolve_non_relative_module_names(){ return diag(6607, DiagnosticCategory::Message, "Specify_the_base_directory_to_resolve_non_relative_module_names_6607", "Specify the base directory to resolve non-relative module names."); }; + static shared_ptr No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files(){ return diag(6608, DiagnosticCategory::Message, "No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files_6608", "No longer supported. In early versions, manually set the text encoding for reading files."); }; + static shared_ptr Enable_error_reporting_in_type_checked_JavaScript_files(){ return diag(6609, DiagnosticCategory::Message, "Enable_error_reporting_in_type_checked_JavaScript_files_6609", "Enable error reporting in type-checked JavaScript files."); }; + static shared_ptr Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references(){ return diag(6611, DiagnosticCategory::Message, "Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references_6611", "Enable constraints that allow a TypeScript project to be used with project references."); }; + static shared_ptr Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project(){ return diag(6612, DiagnosticCategory::Message, "Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project_6612", "Generate .d.ts files from TypeScript and JavaScript files in your project."); }; + static shared_ptr Specify_the_output_directory_for_generated_declaration_files(){ return diag(6613, DiagnosticCategory::Message, "Specify_the_output_directory_for_generated_declaration_files_6613", "Specify the output directory for generated declaration files."); }; + static shared_ptr Create_sourcemaps_for_d_ts_files(){ return diag(6614, DiagnosticCategory::Message, "Create_sourcemaps_for_d_ts_files_6614", "Create sourcemaps for d.ts files."); }; + static shared_ptr Output_compiler_performance_information_after_building(){ return diag(6615, DiagnosticCategory::Message, "Output_compiler_performance_information_after_building_6615", "Output compiler performance information after building."); }; + static shared_ptr Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project(){ return diag(6616, DiagnosticCategory::Message, "Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project_6616", "Disables inference for type acquisition by looking at filenames in a project."); }; + static shared_ptr Reduce_the_number_of_projects_loaded_automatically_by_TypeScript(){ return diag(6617, DiagnosticCategory::Message, "Reduce_the_number_of_projects_loaded_automatically_by_TypeScript_6617", "Reduce the number of projects loaded automatically by TypeScript."); }; + static shared_ptr Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server(){ return diag(6618, DiagnosticCategory::Message, "Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server_6618", "Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server."); }; + static shared_ptr Opt_a_project_out_of_multi_project_reference_checking_when_editing(){ return diag(6619, DiagnosticCategory::Message, "Opt_a_project_out_of_multi_project_reference_checking_when_editing_6619", "Opt a project out of multi-project reference checking when editing."); }; + static shared_ptr Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects(){ return diag(6620, DiagnosticCategory::Message, "Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects_6620", "Disable preferring source files instead of declaration files when referencing composite projects"); }; + static shared_ptr Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration(){ return diag(6621, DiagnosticCategory::Message, "Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration_6621", "Emit more compliant, but verbose and less performant JavaScript for iteration."); }; + static shared_ptr Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files(){ return diag(6622, DiagnosticCategory::Message, "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6622", "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."); }; + static shared_ptr Only_output_d_ts_files_and_not_JavaScript_files(){ return diag(6623, DiagnosticCategory::Message, "Only_output_d_ts_files_and_not_JavaScript_files_6623", "Only output d.ts files and not JavaScript files."); }; + static shared_ptr Emit_design_type_metadata_for_decorated_declarations_in_source_files(){ return diag(6624, DiagnosticCategory::Message, "Emit_design_type_metadata_for_decorated_declarations_in_source_files_6624", "Emit design-type metadata for decorated declarations in source files."); }; + static shared_ptr Disable_the_type_acquisition_for_JavaScript_projects(){ return diag(6625, DiagnosticCategory::Message, "Disable_the_type_acquisition_for_JavaScript_projects_6625", "Disable the type acquisition for JavaScript projects"); }; + static shared_ptr Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility(){ return diag(6626, DiagnosticCategory::Message, "Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheti_6626", "Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility."); }; + static shared_ptr Filters_results_from_the_include_option(){ return diag(6627, DiagnosticCategory::Message, "Filters_results_from_the_include_option_6627", "Filters results from the `include` option."); }; + static shared_ptr Remove_a_list_of_directories_from_the_watch_process(){ return diag(6628, DiagnosticCategory::Message, "Remove_a_list_of_directories_from_the_watch_process_6628", "Remove a list of directories from the watch process."); }; + static shared_ptr Remove_a_list_of_files_from_the_watch_mode_s_processing(){ return diag(6629, DiagnosticCategory::Message, "Remove_a_list_of_files_from_the_watch_mode_s_processing_6629", "Remove a list of files from the watch mode's processing."); }; + static shared_ptr Enable_experimental_support_for_TC39_stage_2_draft_decorators(){ return diag(6630, DiagnosticCategory::Message, "Enable_experimental_support_for_TC39_stage_2_draft_decorators_6630", "Enable experimental support for TC39 stage 2 draft decorators."); }; + static shared_ptr Print_files_read_during_the_compilation_including_why_it_was_included(){ return diag(6631, DiagnosticCategory::Message, "Print_files_read_during_the_compilation_including_why_it_was_included_6631", "Print files read during the compilation including why it was included."); }; + static shared_ptr Output_more_detailed_compiler_performance_information_after_building(){ return diag(6632, DiagnosticCategory::Message, "Output_more_detailed_compiler_performance_information_after_building_6632", "Output more detailed compiler performance information after building."); }; + static shared_ptr Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_are_inherited(){ return diag(6633, DiagnosticCategory::Message, "Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_a_6633", "Specify one or more path or node module references to base configuration files from which settings are inherited."); }; + static shared_ptr Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers(){ return diag(6634, DiagnosticCategory::Message, "Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers_6634", "Specify what approach the watcher should use if the system runs out of native file watchers."); }; + static shared_ptr Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include(){ return diag(6635, DiagnosticCategory::Message, "Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include_6635", "Include a list of files. This does not support glob patterns, as opposed to `include`."); }; + static shared_ptr Build_all_projects_including_those_that_appear_to_be_up_to_date(){ return diag(6636, DiagnosticCategory::Message, "Build_all_projects_including_those_that_appear_to_be_up_to_date_6636", "Build all projects, including those that appear to be up to date"); }; + static shared_ptr Ensure_that_casing_is_correct_in_imports(){ return diag(6637, DiagnosticCategory::Message, "Ensure_that_casing_is_correct_in_imports_6637", "Ensure that casing is correct in imports."); }; + static shared_ptr Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging(){ return diag(6638, DiagnosticCategory::Message, "Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging_6638", "Emit a v8 CPU profile of the compiler run for debugging."); }; + static shared_ptr Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file(){ return diag(6639, DiagnosticCategory::Message, "Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file_6639", "Allow importing helper functions from tslib once per project, instead of including them per-file."); }; + static shared_ptr Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation(){ return diag(6641, DiagnosticCategory::Message, "Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation_6641", "Specify a list of glob patterns that match files to be included in compilation."); }; + static shared_ptr Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects(){ return diag(6642, DiagnosticCategory::Message, "Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects_6642", "Save .tsbuildinfo files to allow for incremental compilation of projects."); }; + static shared_ptr Include_sourcemap_files_inside_the_emitted_JavaScript(){ return diag(6643, DiagnosticCategory::Message, "Include_sourcemap_files_inside_the_emitted_JavaScript_6643", "Include sourcemap files inside the emitted JavaScript."); }; + static shared_ptr Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript(){ return diag(6644, DiagnosticCategory::Message, "Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript_6644", "Include source code in the sourcemaps inside the emitted JavaScript."); }; + static shared_ptr Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports(){ return diag(6645, DiagnosticCategory::Message, "Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports_6645", "Ensure that each file can be safely transpiled without relying on other imports."); }; + static shared_ptr Specify_what_JSX_code_is_generated(){ return diag(6646, DiagnosticCategory::Message, "Specify_what_JSX_code_is_generated_6646", "Specify what JSX code is generated."); }; + static shared_ptr Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h(){ return diag(6647, DiagnosticCategory::Message, "Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h_6647", "Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'"); }; + static shared_ptr Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment(){ return diag(6648, DiagnosticCategory::Message, "Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragme_6648", "Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'."); }; + static shared_ptr Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk(){ return diag(6649, DiagnosticCategory::Message, "Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Ast_6649", "Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.`"); }; + static shared_ptr Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option(){ return diag(6650, DiagnosticCategory::Message, "Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option_6650", "Make keyof only return strings instead of string, numbers or symbols. Legacy option."); }; + static shared_ptr Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment(){ return diag(6651, DiagnosticCategory::Message, "Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment_6651", "Specify a set of bundled library declaration files that describe the target runtime environment."); }; + static shared_ptr Print_the_names_of_emitted_files_after_a_compilation(){ return diag(6652, DiagnosticCategory::Message, "Print_the_names_of_emitted_files_after_a_compilation_6652", "Print the names of emitted files after a compilation."); }; + static shared_ptr Print_all_of_the_files_read_during_the_compilation(){ return diag(6653, DiagnosticCategory::Message, "Print_all_of_the_files_read_during_the_compilation_6653", "Print all of the files read during the compilation."); }; + static shared_ptr Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit(){ return diag(6654, DiagnosticCategory::Message, "Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit_6654", "Set the language of the messaging from TypeScript. This does not affect emit."); }; + static shared_ptr Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations(){ return diag(6655, DiagnosticCategory::Message, "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6655", "Specify the location where debugger should locate map files instead of generated locations."); }; + static shared_ptr Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs(){ return diag(6656, DiagnosticCategory::Message, "Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicabl_6656", "Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`."); }; + static shared_ptr Specify_what_module_code_is_generated(){ return diag(6657, DiagnosticCategory::Message, "Specify_what_module_code_is_generated_6657", "Specify what module code is generated."); }; + static shared_ptr Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier(){ return diag(6658, DiagnosticCategory::Message, "Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier_6658", "Specify how TypeScript looks up a file from a given module specifier."); }; + static shared_ptr Set_the_newline_character_for_emitting_files(){ return diag(6659, DiagnosticCategory::Message, "Set_the_newline_character_for_emitting_files_6659", "Set the newline character for emitting files."); }; + static shared_ptr Disable_emitting_files_from_a_compilation(){ return diag(6660, DiagnosticCategory::Message, "Disable_emitting_files_from_a_compilation_6660", "Disable emitting files from a compilation."); }; + static shared_ptr Disable_generating_custom_helper_functions_like_extends_in_compiled_output(){ return diag(6661, DiagnosticCategory::Message, "Disable_generating_custom_helper_functions_like_extends_in_compiled_output_6661", "Disable generating custom helper functions like `__extends` in compiled output."); }; + static shared_ptr Disable_emitting_files_if_any_type_checking_errors_are_reported(){ return diag(6662, DiagnosticCategory::Message, "Disable_emitting_files_if_any_type_checking_errors_are_reported_6662", "Disable emitting files if any type checking errors are reported."); }; + static shared_ptr Disable_truncating_types_in_error_messages(){ return diag(6663, DiagnosticCategory::Message, "Disable_truncating_types_in_error_messages_6663", "Disable truncating types in error messages."); }; + static shared_ptr Enable_error_reporting_for_fallthrough_cases_in_switch_statements(){ return diag(6664, DiagnosticCategory::Message, "Enable_error_reporting_for_fallthrough_cases_in_switch_statements_6664", "Enable error reporting for fallthrough cases in switch statements."); }; + static shared_ptr Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type(){ return diag(6665, DiagnosticCategory::Message, "Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type_6665", "Enable error reporting for expressions and declarations with an implied `any` type.."); }; + static shared_ptr Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier(){ return diag(6666, DiagnosticCategory::Message, "Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier_6666", "Ensure overriding members in derived classes are marked with an override modifier."); }; + static shared_ptr Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function(){ return diag(6667, DiagnosticCategory::Message, "Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function_6667", "Enable error reporting for codepaths that do not explicitly return in a function."); }; + static shared_ptr Enable_error_reporting_when_this_is_given_the_type_any(){ return diag(6668, DiagnosticCategory::Message, "Enable_error_reporting_when_this_is_given_the_type_any_6668", "Enable error reporting when `this` is given the type `any`."); }; + static shared_ptr Disable_adding_use_strict_directives_in_emitted_JavaScript_files(){ return diag(6669, DiagnosticCategory::Message, "Disable_adding_use_strict_directives_in_emitted_JavaScript_files_6669", "Disable adding 'use strict' directives in emitted JavaScript files."); }; + static shared_ptr Disable_including_any_library_files_including_the_default_lib_d_ts(){ return diag(6670, DiagnosticCategory::Message, "Disable_including_any_library_files_including_the_default_lib_d_ts_6670", "Disable including any library files, including the default lib.d.ts."); }; + static shared_ptr Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type(){ return diag(6671, DiagnosticCategory::Message, "Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type_6671", "Enforces using indexed accessors for keys declared using an indexed type"); }; + static shared_ptr Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project(){ return diag(6672, DiagnosticCategory::Message, "Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add__6672", "Disallow `import`s, `require`s or ``s from expanding the number of files TypeScript should add to a project."); }; + static shared_ptr Disable_strict_checking_of_generic_signatures_in_function_types(){ return diag(6673, DiagnosticCategory::Message, "Disable_strict_checking_of_generic_signatures_in_function_types_6673", "Disable strict checking of generic signatures in function types."); }; + static shared_ptr Add_undefined_to_a_type_when_accessed_using_an_index(){ return diag(6674, DiagnosticCategory::Message, "Add_undefined_to_a_type_when_accessed_using_an_index_6674", "Add `undefined` to a type when accessed using an index."); }; + static shared_ptr Enable_error_reporting_when_a_local_variables_aren_t_read(){ return diag(6675, DiagnosticCategory::Message, "Enable_error_reporting_when_a_local_variables_aren_t_read_6675", "Enable error reporting when a local variables aren't read."); }; + static shared_ptr Raise_an_error_when_a_function_parameter_isn_t_read(){ return diag(6676, DiagnosticCategory::Message, "Raise_an_error_when_a_function_parameter_isn_t_read_6676", "Raise an error when a function parameter isn't read"); }; + static shared_ptr Deprecated_setting_Use_outFile_instead(){ return diag(6677, DiagnosticCategory::Message, "Deprecated_setting_Use_outFile_instead_6677", "Deprecated setting. Use `outFile` instead."); }; + static shared_ptr Specify_an_output_folder_for_all_emitted_files(){ return diag(6678, DiagnosticCategory::Message, "Specify_an_output_folder_for_all_emitted_files_6678", "Specify an output folder for all emitted files."); }; + static shared_ptr Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output(){ return diag(6679, DiagnosticCategory::Message, "Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designa_6679", "Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output."); }; + static shared_ptr Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations(){ return diag(6680, DiagnosticCategory::Message, "Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations_6680", "Specify a set of entries that re-map imports to additional lookup locations."); }; + static shared_ptr Specify_a_list_of_language_service_plugins_to_include(){ return diag(6681, DiagnosticCategory::Message, "Specify_a_list_of_language_service_plugins_to_include_6681", "Specify a list of language service plugins to include."); }; + static shared_ptr Disable_erasing_const_enum_declarations_in_generated_code(){ return diag(6682, DiagnosticCategory::Message, "Disable_erasing_const_enum_declarations_in_generated_code_6682", "Disable erasing `const enum` declarations in generated code."); }; + static shared_ptr Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node(){ return diag(6683, DiagnosticCategory::Message, "Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node_6683", "Disable resolving symlinks to their realpath. This correlates to the same flag in node."); }; + static shared_ptr Disable_wiping_the_console_in_watch_mode(){ return diag(6684, DiagnosticCategory::Message, "Disable_wiping_the_console_in_watch_mode_6684", "Disable wiping the console in watch mode"); }; + static shared_ptr Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read(){ return diag(6685, DiagnosticCategory::Message, "Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read_6685", "Enable color and formatting in TypeScript's output to make compiler errors easier to read"); }; + static shared_ptr Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit(){ return diag(6686, DiagnosticCategory::Message, "Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit_6686", "Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit."); }; + static shared_ptr Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references(){ return diag(6687, DiagnosticCategory::Message, "Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references_6687", "Specify an array of objects that specify paths for projects. Used in project references."); }; + static shared_ptr Disable_emitting_comments(){ return diag(6688, DiagnosticCategory::Message, "Disable_emitting_comments_6688", "Disable emitting comments."); }; + static shared_ptr Enable_importing_json_files(){ return diag(6689, DiagnosticCategory::Message, "Enable_importing_json_files_6689", "Enable importing .json files"); }; + static shared_ptr Specify_the_root_folder_within_your_source_files(){ return diag(6690, DiagnosticCategory::Message, "Specify_the_root_folder_within_your_source_files_6690", "Specify the root folder within your source files."); }; + static shared_ptr Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules(){ return diag(6691, DiagnosticCategory::Message, "Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules_6691", "Allow multiple folders to be treated as one when resolving modules."); }; + static shared_ptr Skip_type_checking_d_ts_files_that_are_included_with_TypeScript(){ return diag(6692, DiagnosticCategory::Message, "Skip_type_checking_d_ts_files_that_are_included_with_TypeScript_6692", "Skip type checking .d.ts files that are included with TypeScript."); }; + static shared_ptr Skip_type_checking_all_d_ts_files(){ return diag(6693, DiagnosticCategory::Message, "Skip_type_checking_all_d_ts_files_6693", "Skip type checking all .d.ts files."); }; + static shared_ptr Create_source_map_files_for_emitted_JavaScript_files(){ return diag(6694, DiagnosticCategory::Message, "Create_source_map_files_for_emitted_JavaScript_files_6694", "Create source map files for emitted JavaScript files."); }; + static shared_ptr Specify_the_root_path_for_debuggers_to_find_the_reference_source_code(){ return diag(6695, DiagnosticCategory::Message, "Specify_the_root_path_for_debuggers_to_find_the_reference_source_code_6695", "Specify the root path for debuggers to find the reference source code."); }; + static shared_ptr Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function(){ return diag(6697, DiagnosticCategory::Message, "Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function_6697", "Check that the arguments for `bind`, `call`, and `apply` methods match the original function."); }; + static shared_ptr When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible(){ return diag(6698, DiagnosticCategory::Message, "When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible_6698", "When assigning functions, check to ensure parameters and the return values are subtype-compatible."); }; + static shared_ptr When_type_checking_take_into_account_null_and_undefined(){ return diag(6699, DiagnosticCategory::Message, "When_type_checking_take_into_account_null_and_undefined_6699", "When type checking, take into account `null` and `undefined`."); }; + static shared_ptr Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor(){ return diag(6700, DiagnosticCategory::Message, "Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor_6700", "Check for class properties that are declared but not set in the constructor."); }; + static shared_ptr Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments(){ return diag(6701, DiagnosticCategory::Message, "Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments_6701", "Disable emitting declarations that have `@internal` in their JSDoc comments."); }; + static shared_ptr Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals(){ return diag(6702, DiagnosticCategory::Message, "Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals_6702", "Disable reporting of excess property errors during the creation of object literals."); }; + static shared_ptr Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures(){ return diag(6703, DiagnosticCategory::Message, "Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures_6703", "Suppress `noImplicitAny` errors when indexing objects that lack index signatures."); }; + static shared_ptr Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively(){ return diag(6704, DiagnosticCategory::Message, "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6704", "Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively."); }; + static shared_ptr Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations(){ return diag(6705, DiagnosticCategory::Message, "Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declaratio_6705", "Set the JavaScript language version for emitted JavaScript and include compatible library declarations."); }; + static shared_ptr Log_paths_used_during_the_moduleResolution_process(){ return diag(6706, DiagnosticCategory::Message, "Log_paths_used_during_the_moduleResolution_process_6706", "Log paths used during the `moduleResolution` process."); }; + static shared_ptr Specify_the_folder_for_tsbuildinfo_incremental_compilation_files(){ return diag(6707, DiagnosticCategory::Message, "Specify_the_folder_for_tsbuildinfo_incremental_compilation_files_6707", "Specify the folder for .tsbuildinfo incremental compilation files."); }; + static shared_ptr Specify_options_for_automatic_acquisition_of_declaration_files(){ return diag(6709, DiagnosticCategory::Message, "Specify_options_for_automatic_acquisition_of_declaration_files_6709", "Specify options for automatic acquisition of declaration files."); }; + static shared_ptr Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types(){ return diag(6710, DiagnosticCategory::Message, "Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types_6710", "Specify multiple folders that act like `./node_modules/@types`."); }; + static shared_ptr Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file(){ return diag(6711, DiagnosticCategory::Message, "Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file_6711", "Specify type package names to be included without being referenced in a source file."); }; + static shared_ptr Emit_ECMAScript_standard_compliant_class_fields(){ return diag(6712, DiagnosticCategory::Message, "Emit_ECMAScript_standard_compliant_class_fields_6712", "Emit ECMAScript-standard-compliant class fields."); }; + static shared_ptr Enable_verbose_logging(){ return diag(6713, DiagnosticCategory::Message, "Enable_verbose_logging_6713", "Enable verbose logging"); }; + static shared_ptr Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality(){ return diag(6714, DiagnosticCategory::Message, "Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality_6714", "Specify how directories are watched on systems that lack recursive file-watching functionality."); }; + static shared_ptr Specify_how_the_TypeScript_watch_mode_works(){ return diag(6715, DiagnosticCategory::Message, "Specify_how_the_TypeScript_watch_mode_works_6715", "Specify how the TypeScript watch mode works."); }; + static shared_ptr Include_undefined_in_index_signature_results(){ return diag(6716, DiagnosticCategory::Message, "Include_undefined_in_index_signature_results_6716", "Include 'undefined' in index signature results"); }; + static shared_ptr Require_undeclared_properties_from_index_signatures_to_use_element_accesses(){ return diag(6717, DiagnosticCategory::Message, "Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6717", "Require undeclared properties from index signatures to use element accesses."); }; + static shared_ptr Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types(){ return diag(6718, DiagnosticCategory::Message, "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718", "Specify emit/checking behavior for imports that are only used for types"); }; + static shared_ptr Type_catch_clause_variables_as_unknown_instead_of_any(){ return diag(6803, DiagnosticCategory::Message, "Type_catch_clause_variables_as_unknown_instead_of_any_6803", "Type catch clause variables as 'unknown' instead of 'any'."); }; + static shared_ptr one_of_Colon(){ return diag(6900, DiagnosticCategory::Message, "one_of_Colon_6900", "one of:"); }; + static shared_ptr one_or_more_Colon(){ return diag(6901, DiagnosticCategory::Message, "one_or_more_Colon_6901", "one or more:"); }; + static shared_ptr type_Colon(){ return diag(6902, DiagnosticCategory::Message, "type_Colon_6902", "type:"); }; + static shared_ptr default_Colon(){ return diag(6903, DiagnosticCategory::Message, "default_Colon_6903", "default:"); }; + static shared_ptr module_system_or_esModuleInterop(){ return diag(6904, DiagnosticCategory::Message, "module_system_or_esModuleInterop_6904", "module === \"system\" or esModuleInterop"); }; + static shared_ptr false_unless_strict_is_set(){ return diag(6905, DiagnosticCategory::Message, "false_unless_strict_is_set_6905", "`false`, unless `strict` is set"); }; + static shared_ptr false_unless_composite_is_set(){ return diag(6906, DiagnosticCategory::Message, "false_unless_composite_is_set_6906", "`false`, unless `composite` is set"); }; + static shared_ptr node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified(){ return diag(6907, DiagnosticCategory::Message, "node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified_6907", "`[\"node_modules\", \"bower_components\", \"jspm_packages\"]`, plus the value of `outDir` if one is specified."); }; + static shared_ptr if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk(){ return diag(6908, DiagnosticCategory::Message, "if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk_6908", "`[]` if `files` is specified, otherwise `[\"**/*\"]`"); }; + static shared_ptr true_if_composite_false_otherwise(){ return diag(6909, DiagnosticCategory::Message, "true_if_composite_false_otherwise_6909", "`true` if `composite`, `false` otherwise"); }; + static shared_ptr module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node(){ return diag(69010, DiagnosticCategory::Message, "module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node_69010", "module === `AMD` or `UMD` or `System` or `ES6`, then `Classic`, Otherwise `Node`"); }; + static shared_ptr Computed_from_the_list_of_input_files(){ return diag(6911, DiagnosticCategory::Message, "Computed_from_the_list_of_input_files_6911", "Computed from the list of input files"); }; + static shared_ptr Platform_specific(){ return diag(6912, DiagnosticCategory::Message, "Platform_specific_6912", "Platform specific"); }; + static shared_ptr You_can_learn_about_all_of_the_compiler_options_at_0(){ return diag(6913, DiagnosticCategory::Message, "You_can_learn_about_all_of_the_compiler_options_at_0_6913", "You can learn about all of the compiler options at {0}"); }; + static shared_ptr Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon(){ return diag(6914, DiagnosticCategory::Message, "Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914", "Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:"); }; + static shared_ptr Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0(){ return diag(6915, DiagnosticCategory::Message, "Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_tr_6915", "Using --build, -b will make tsc behave more like a build orchestrator than a compiler. This is used to trigger building composite projects which you can learn more about at {0}"); }; - static shared COMMON_COMMANDS(){ return diag(6916, DiagnosticCategory::Message, "COMMON_COMMANDS_6916", "COMMON COMMANDS"); }; - static shared ALL_COMPILER_OPTIONS(){ return diag(6917, DiagnosticCategory::Message, "ALL_COMPILER_OPTIONS_6917", "ALL COMPILER OPTIONS"); }; - static shared WATCH_OPTIONS(){ return diag(6918, DiagnosticCategory::Message, "WATCH_OPTIONS_6918", "WATCH OPTIONS"); }; - static shared BUILD_OPTIONS(){ return diag(6919, DiagnosticCategory::Message, "BUILD_OPTIONS_6919", "BUILD OPTIONS"); }; - static shared COMMON_COMPILER_OPTIONS(){ return diag(6920, DiagnosticCategory::Message, "COMMON_COMPILER_OPTIONS_6920", "COMMON COMPILER OPTIONS"); }; - static shared COMMAND_LINE_FLAGS(){ return diag(6921, DiagnosticCategory::Message, "COMMAND_LINE_FLAGS_6921", "COMMAND LINE FLAGS"); }; - static shared tsc_Colon_The_TypeScript_Compiler(){ return diag(6922, DiagnosticCategory::Message, "tsc_Colon_The_TypeScript_Compiler_6922", "tsc: The TypeScript Compiler"); }; - static shared Compiles_the_current_project_tsconfig_json_in_the_working_directory(){ return diag(6923, DiagnosticCategory::Message, "Compiles_the_current_project_tsconfig_json_in_the_working_directory_6923", "Compiles the current project (tsconfig.json in the working directory.)"); }; - static shared Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options(){ return diag(6924, DiagnosticCategory::Message, "Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options_6924", "Ignoring tsconfig.json, compiles the specified files with default compiler options."); }; - static shared Build_a_composite_project_in_the_working_directory(){ return diag(6925, DiagnosticCategory::Message, "Build_a_composite_project_in_the_working_directory_6925", "Build a composite project in the working directory."); }; - static shared Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory(){ return diag(6926, DiagnosticCategory::Message, "Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory_6926", "Creates a tsconfig.json with the recommended settings in the working directory."); }; - static shared Compiles_the_TypeScript_project_located_at_the_specified_path(){ return diag(6927, DiagnosticCategory::Message, "Compiles_the_TypeScript_project_located_at_the_specified_path_6927", "Compiles the TypeScript project located at the specified path."); }; - static shared An_expanded_version_of_this_information_showing_all_possible_compiler_options(){ return diag(6928, DiagnosticCategory::Message, "An_expanded_version_of_this_information_showing_all_possible_compiler_options_6928", "An expanded version of this information, showing all possible compiler options"); }; - static shared Compiles_the_current_project_with_additional_settings(){ return diag(6929, DiagnosticCategory::Message, "Compiles_the_current_project_with_additional_settings_6929", "Compiles the current project, with additional settings."); }; - static shared true_for_ES2022_and_above_including_ESNext(){ return diag(6930, DiagnosticCategory::Message, "true_for_ES2022_and_above_including_ESNext_6930", "`true` for ES2022 and above, including ESNext."); }; - static shared Variable_0_implicitly_has_an_1_type(){ return diag(7005, DiagnosticCategory::Error, "Variable_0_implicitly_has_an_1_type_7005", "Variable '{0}' implicitly has an '{1}' type."); }; - static shared Parameter_0_implicitly_has_an_1_type(){ return diag(7006, DiagnosticCategory::Error, "Parameter_0_implicitly_has_an_1_type_7006", "Parameter '{0}' implicitly has an '{1}' type."); }; - static shared Member_0_implicitly_has_an_1_type(){ return diag(7008, DiagnosticCategory::Error, "Member_0_implicitly_has_an_1_type_7008", "Member '{0}' implicitly has an '{1}' type."); }; - static shared new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type(){ return diag(7009, DiagnosticCategory::Error, "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009", "'new' expression, whose target lacks a construct signature, implicitly has an 'any' type."); }; - static shared _0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type(){ return diag(7010, DiagnosticCategory::Error, "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010", "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type."); }; - static shared Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type(){ return diag(7011, DiagnosticCategory::Error, "Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011", "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type."); }; - static shared Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type(){ return diag(7013, DiagnosticCategory::Error, "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013", "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type."); }; - static shared Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type(){ return diag(7014, DiagnosticCategory::Error, "Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014", "Function type, which lacks return-type annotation, implicitly has an '{0}' return type."); }; - static shared Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number(){ return diag(7015, DiagnosticCategory::Error, "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015", "Element implicitly has an 'any' type because index expression is not of type 'number'."); }; - static shared Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type(){ return diag(7016, DiagnosticCategory::Error, "Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016", "Could not find a declaration file for module '{0}'. '{1}' implicitly has an 'any' type."); }; - static shared Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature(){ return diag(7017, DiagnosticCategory::Error, "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017", "Element implicitly has an 'any' type because type '{0}' has no index signature."); }; - static shared Object_literal_s_property_0_implicitly_has_an_1_type(){ return diag(7018, DiagnosticCategory::Error, "Object_literal_s_property_0_implicitly_has_an_1_type_7018", "Object literal's property '{0}' implicitly has an '{1}' type."); }; - static shared Rest_parameter_0_implicitly_has_an_any_type(){ return diag(7019, DiagnosticCategory::Error, "Rest_parameter_0_implicitly_has_an_any_type_7019", "Rest parameter '{0}' implicitly has an 'any[]' type."); }; - static shared Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type(){ return diag(7020, DiagnosticCategory::Error, "Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020", "Call signature, which lacks return-type annotation, implicitly has an 'any' return type."); }; - static shared _0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer(){ return diag(7022, DiagnosticCategory::Error, "_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022", "'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer."); }; - static shared _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(){ return diag(7023, DiagnosticCategory::Error, "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023", + static shared_ptr COMMON_COMMANDS(){ return diag(6916, DiagnosticCategory::Message, "COMMON_COMMANDS_6916", "COMMON COMMANDS"); }; + static shared_ptr ALL_COMPILER_OPTIONS(){ return diag(6917, DiagnosticCategory::Message, "ALL_COMPILER_OPTIONS_6917", "ALL COMPILER OPTIONS"); }; + static shared_ptr WATCH_OPTIONS(){ return diag(6918, DiagnosticCategory::Message, "WATCH_OPTIONS_6918", "WATCH OPTIONS"); }; + static shared_ptr BUILD_OPTIONS(){ return diag(6919, DiagnosticCategory::Message, "BUILD_OPTIONS_6919", "BUILD OPTIONS"); }; + static shared_ptr COMMON_COMPILER_OPTIONS(){ return diag(6920, DiagnosticCategory::Message, "COMMON_COMPILER_OPTIONS_6920", "COMMON COMPILER OPTIONS"); }; + static shared_ptr COMMAND_LINE_FLAGS(){ return diag(6921, DiagnosticCategory::Message, "COMMAND_LINE_FLAGS_6921", "COMMAND LINE FLAGS"); }; + static shared_ptr tsc_Colon_The_TypeScript_Compiler(){ return diag(6922, DiagnosticCategory::Message, "tsc_Colon_The_TypeScript_Compiler_6922", "tsc: The TypeScript Compiler"); }; + static shared_ptr Compiles_the_current_project_tsconfig_json_in_the_working_directory(){ return diag(6923, DiagnosticCategory::Message, "Compiles_the_current_project_tsconfig_json_in_the_working_directory_6923", "Compiles the current project (tsconfig.json in the working directory.)"); }; + static shared_ptr Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options(){ return diag(6924, DiagnosticCategory::Message, "Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options_6924", "Ignoring tsconfig.json, compiles the specified files with default compiler options."); }; + static shared_ptr Build_a_composite_project_in_the_working_directory(){ return diag(6925, DiagnosticCategory::Message, "Build_a_composite_project_in_the_working_directory_6925", "Build a composite project in the working directory."); }; + static shared_ptr Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory(){ return diag(6926, DiagnosticCategory::Message, "Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory_6926", "Creates a tsconfig.json with the recommended settings in the working directory."); }; + static shared_ptr Compiles_the_TypeScript_project_located_at_the_specified_path(){ return diag(6927, DiagnosticCategory::Message, "Compiles_the_TypeScript_project_located_at_the_specified_path_6927", "Compiles the TypeScript project located at the specified path."); }; + static shared_ptr An_expanded_version_of_this_information_showing_all_possible_compiler_options(){ return diag(6928, DiagnosticCategory::Message, "An_expanded_version_of_this_information_showing_all_possible_compiler_options_6928", "An expanded version of this information, showing all possible compiler options"); }; + static shared_ptr Compiles_the_current_project_with_additional_settings(){ return diag(6929, DiagnosticCategory::Message, "Compiles_the_current_project_with_additional_settings_6929", "Compiles the current project, with additional settings."); }; + static shared_ptr true_for_ES2022_and_above_including_ESNext(){ return diag(6930, DiagnosticCategory::Message, "true_for_ES2022_and_above_including_ESNext_6930", "`true` for ES2022 and above, including ESNext."); }; + static shared_ptr Variable_0_implicitly_has_an_1_type(){ return diag(7005, DiagnosticCategory::Error, "Variable_0_implicitly_has_an_1_type_7005", "Variable '{0}' implicitly has an '{1}' type."); }; + static shared_ptr Parameter_0_implicitly_has_an_1_type(){ return diag(7006, DiagnosticCategory::Error, "Parameter_0_implicitly_has_an_1_type_7006", "Parameter '{0}' implicitly has an '{1}' type."); }; + static shared_ptr Member_0_implicitly_has_an_1_type(){ return diag(7008, DiagnosticCategory::Error, "Member_0_implicitly_has_an_1_type_7008", "Member '{0}' implicitly has an '{1}' type."); }; + static shared_ptr new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type(){ return diag(7009, DiagnosticCategory::Error, "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009", "'new' expression, whose target lacks a construct signature, implicitly has an 'any' type."); }; + static shared_ptr _0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type(){ return diag(7010, DiagnosticCategory::Error, "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010", "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type."); }; + static shared_ptr Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type(){ return diag(7011, DiagnosticCategory::Error, "Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011", "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type."); }; + static shared_ptr Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type(){ return diag(7013, DiagnosticCategory::Error, "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013", "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type."); }; + static shared_ptr Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type(){ return diag(7014, DiagnosticCategory::Error, "Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014", "Function type, which lacks return-type annotation, implicitly has an '{0}' return type."); }; + static shared_ptr Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number(){ return diag(7015, DiagnosticCategory::Error, "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015", "Element implicitly has an 'any' type because index expression is not of type 'number'."); }; + static shared_ptr Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type(){ return diag(7016, DiagnosticCategory::Error, "Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016", "Could not find a declaration file for module '{0}'. '{1}' implicitly has an 'any' type."); }; + static shared_ptr Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature(){ return diag(7017, DiagnosticCategory::Error, "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017", "Element implicitly has an 'any' type because type '{0}' has no index signature."); }; + static shared_ptr Object_literal_s_property_0_implicitly_has_an_1_type(){ return diag(7018, DiagnosticCategory::Error, "Object_literal_s_property_0_implicitly_has_an_1_type_7018", "Object literal's property '{0}' implicitly has an '{1}' type."); }; + static shared_ptr Rest_parameter_0_implicitly_has_an_any_type(){ return diag(7019, DiagnosticCategory::Error, "Rest_parameter_0_implicitly_has_an_any_type_7019", "Rest parameter '{0}' implicitly has an 'any[]' type."); }; + static shared_ptr Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type(){ return diag(7020, DiagnosticCategory::Error, "Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020", "Call signature, which lacks return-type annotation, implicitly has an 'any' return type."); }; + static shared_ptr _0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer(){ return diag(7022, DiagnosticCategory::Error, "_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022", "'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer."); }; + static shared_ptr _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(){ return diag(7023, DiagnosticCategory::Error, "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023", "'{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."); }; - static shared 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(){ return diag(7024, DiagnosticCategory::Error, "Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024", + static shared_ptr 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(){ return diag(7024, DiagnosticCategory::Error, "Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024", "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."); }; - static shared Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation(){ return diag(7025, DiagnosticCategory::Error, "Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025", "Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation."); }; - static shared JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists(){ return diag(7026, DiagnosticCategory::Error, "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026", "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists."); }; - static shared Unreachable_code_detected(){ return diag(7027, DiagnosticCategory::Error, "Unreachable_code_detected_7027", "Unreachable code detected.", /*reportsUnnecessary*/ true); }; - static shared Unused_label(){ return diag(7028, DiagnosticCategory::Error, "Unused_label_7028", "Unused label.", /*reportsUnnecessary*/ true); }; - static shared Fallthrough_case_in_switch(){ return diag(7029, DiagnosticCategory::Error, "Fallthrough_case_in_switch_7029", "Fallthrough case in switch."); }; - static shared Not_all_code_paths_return_a_value(){ return diag(7030, DiagnosticCategory::Error, "Not_all_code_paths_return_a_value_7030", "Not all code paths return a value."); }; - static shared Binding_element_0_implicitly_has_an_1_type(){ return diag(7031, DiagnosticCategory::Error, "Binding_element_0_implicitly_has_an_1_type_7031", "Binding element '{0}' implicitly has an '{1}' type."); }; - static shared Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation(){ return diag(7032, DiagnosticCategory::Error, "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032", "Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation."); }; - static shared Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation(){ return diag(7033, DiagnosticCategory::Error, "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033", "Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation."); }; - static shared Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined(){ return diag(7034, DiagnosticCategory::Error, "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034", "Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined."); }; - static shared Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0(){ return diag(7035, DiagnosticCategory::Error, "Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare__7035", "Try `npm i --save-dev @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`"); }; - static shared Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0(){ return diag(7036, DiagnosticCategory::Error, "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036", "Dynamic import's specifier must be of type 'string', but here has type '{0}'."); }; - static shared Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports(){ return diag(7037, DiagnosticCategory::Message, "Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037", "Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'."); }; - static shared Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead(){ return diag(7038, DiagnosticCategory::Message, "Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038", + static shared_ptr Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation(){ return diag(7025, DiagnosticCategory::Error, "Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025", "Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation."); }; + static shared_ptr JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists(){ return diag(7026, DiagnosticCategory::Error, "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026", "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists."); }; + static shared_ptr Unreachable_code_detected(){ return diag(7027, DiagnosticCategory::Error, "Unreachable_code_detected_7027", "Unreachable code detected.", /*reportsUnnecessary*/ true); }; + static shared_ptr Unused_label(){ return diag(7028, DiagnosticCategory::Error, "Unused_label_7028", "Unused label.", /*reportsUnnecessary*/ true); }; + static shared_ptr Fallthrough_case_in_switch(){ return diag(7029, DiagnosticCategory::Error, "Fallthrough_case_in_switch_7029", "Fallthrough case in switch."); }; + static shared_ptr Not_all_code_paths_return_a_value(){ return diag(7030, DiagnosticCategory::Error, "Not_all_code_paths_return_a_value_7030", "Not all code paths return a value."); }; + static shared_ptr Binding_element_0_implicitly_has_an_1_type(){ return diag(7031, DiagnosticCategory::Error, "Binding_element_0_implicitly_has_an_1_type_7031", "Binding element '{0}' implicitly has an '{1}' type."); }; + static shared_ptr Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation(){ return diag(7032, DiagnosticCategory::Error, "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032", "Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation."); }; + static shared_ptr Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation(){ return diag(7033, DiagnosticCategory::Error, "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033", "Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation."); }; + static shared_ptr Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined(){ return diag(7034, DiagnosticCategory::Error, "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034", "Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined."); }; + static shared_ptr Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0(){ return diag(7035, DiagnosticCategory::Error, "Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare__7035", "Try `npm i --save-dev @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`"); }; + static shared_ptr Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0(){ return diag(7036, DiagnosticCategory::Error, "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036", "Dynamic import's specifier must be of type 'string', but here has type '{0}'."); }; + static shared_ptr Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports(){ return diag(7037, DiagnosticCategory::Message, "Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037", "Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'."); }; + static shared_ptr Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead(){ return diag(7038, DiagnosticCategory::Message, "Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038", "Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead."); }; - static shared Mapped_object_type_implicitly_has_an_any_template_type(){ return diag(7039, DiagnosticCategory::Error, "Mapped_object_type_implicitly_has_an_any_template_type_7039", "Mapped object type implicitly has an 'any' template type."); }; - static shared If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1(){ return diag(7040, DiagnosticCategory::Error, "If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040", + static shared_ptr Mapped_object_type_implicitly_has_an_any_template_type(){ return diag(7039, DiagnosticCategory::Error, "Mapped_object_type_implicitly_has_an_any_template_type_7039", "Mapped object type implicitly has an 'any' template type."); }; + static shared_ptr If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1(){ return diag(7040, DiagnosticCategory::Error, "If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040", "If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}'"); }; - static shared The_containing_arrow_function_captures_the_global_value_of_this(){ return diag(7041, DiagnosticCategory::Error, "The_containing_arrow_function_captures_the_global_value_of_this_7041", "The containing arrow function captures the global value of 'this'."); }; - static shared Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used(){ return diag(7042, DiagnosticCategory::Error, "Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042", "Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used."); }; - static shared Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage(){ return diag(7043, DiagnosticCategory::Suggestion, "Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043", "Variable '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."); }; - static shared Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage(){ return diag(7044, DiagnosticCategory::Suggestion, "Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044", "Parameter '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."); }; - static shared Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage(){ return diag(7045, DiagnosticCategory::Suggestion, "Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045", "Member '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."); }; - static shared Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage(){ return diag(7046, DiagnosticCategory::Suggestion, "Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046", "Variable '{0}' implicitly has type '{1}' in some locations, but a better type may be inferred from usage."); }; - static shared Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage(){ return diag(7047, DiagnosticCategory::Suggestion, "Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047", "Rest parameter '{0}' implicitly has an 'any[]' type, but a better type may be inferred from usage."); }; - static shared Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage(){ return diag(7048, DiagnosticCategory::Suggestion, "Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048", "Property '{0}' implicitly has type 'any', but a better type for its get accessor may be inferred from usage."); }; - static shared Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage(){ return diag(7049, DiagnosticCategory::Suggestion, "Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049", "Property '{0}' implicitly has type 'any', but a better type for its set accessor may be inferred from usage."); }; - static shared _0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage(){ return diag(7050, DiagnosticCategory::Suggestion, "_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050", "'{0}' implicitly has an '{1}' return type, but a better type may be inferred from usage."); }; - static shared Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1(){ return diag(7051, DiagnosticCategory::Error, "Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051", "Parameter has a name but no type. Did you mean '{0}: {1}'?"); }; - static shared Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1(){ return diag(7052, DiagnosticCategory::Error, "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052", "Element implicitly has an 'any' type because type '{0}' has no index signature. Did you mean to call '{1}'?"); }; - static shared Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1(){ return diag(7053, DiagnosticCategory::Error, "Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053", "Element implicitly has an 'any' type because expression of type '{0}' can't be used to index type '{1}'."); }; - static shared No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1(){ return diag(7054, DiagnosticCategory::Error, "No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054", "No index signature with a parameter of type '{0}' was found on type '{1}'."); }; - static shared _0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type(){ return diag(7055, DiagnosticCategory::Error, "_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055", "'{0}', which lacks return-type annotation, implicitly has an '{1}' yield type."); }; - static shared The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed(){ return diag(7056, DiagnosticCategory::Error, "The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_ty_7056", "The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed."); }; - static shared yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation(){ return diag(7057, DiagnosticCategory::Error, "yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_t_7057", "'yield' expression implicitly results in an 'any' type because its containing generator lacks a return-type annotation."); }; - static shared If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1(){ return diag(7058, DiagnosticCategory::Error, "If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_decl_7058", "If the '{0}' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '{1}';`"); }; - static shared This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead(){ return diag(7059, DiagnosticCategory::Error, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059", "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."); }; - static shared This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint(){ return diag(7060, DiagnosticCategory::Error, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060", "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint."); }; - static shared A_mapped_type_may_not_declare_properties_or_methods(){ return diag(7061, DiagnosticCategory::Error, "A_mapped_type_may_not_declare_properties_or_methods_7061", "A mapped type may not declare properties or methods."); }; - static shared JSON_imports_are_experimental_in_ES_module_mode_imports(){ return diag(7062, DiagnosticCategory::Error, "JSON_imports_are_experimental_in_ES_module_mode_imports_7062", "JSON imports are experimental in ES module mode imports."); }; - static shared You_cannot_rename_this_element(){ return diag(8000, DiagnosticCategory::Error, "You_cannot_rename_this_element_8000", "You cannot rename this element."); }; - static shared You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library(){ return diag(8001, DiagnosticCategory::Error, "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", "You cannot rename elements that are defined in the standard TypeScript library."); }; - static shared import_can_only_be_used_in_TypeScript_files(){ return diag(8002, DiagnosticCategory::Error, "import_can_only_be_used_in_TypeScript_files_8002", "'import ... =' can only be used in TypeScript files."); }; - static shared export_can_only_be_used_in_TypeScript_files(){ return diag(8003, DiagnosticCategory::Error, "export_can_only_be_used_in_TypeScript_files_8003", "'export =' can only be used in TypeScript files."); }; - static shared Type_parameter_declarations_can_only_be_used_in_TypeScript_files(){ return diag(8004, DiagnosticCategory::Error, "Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004", "Type parameter declarations can only be used in TypeScript files."); }; - static shared implements_clauses_can_only_be_used_in_TypeScript_files(){ return diag(8005, DiagnosticCategory::Error, "implements_clauses_can_only_be_used_in_TypeScript_files_8005", "'implements' clauses can only be used in TypeScript files."); }; - static shared _0_declarations_can_only_be_used_in_TypeScript_files(){ return diag(8006, DiagnosticCategory::Error, "_0_declarations_can_only_be_used_in_TypeScript_files_8006", "'{0}' declarations can only be used in TypeScript files."); }; - static shared Type_aliases_can_only_be_used_in_TypeScript_files(){ return diag(8008, DiagnosticCategory::Error, "Type_aliases_can_only_be_used_in_TypeScript_files_8008", "Type aliases can only be used in TypeScript files."); }; - static shared The_0_modifier_can_only_be_used_in_TypeScript_files(){ return diag(8009, DiagnosticCategory::Error, "The_0_modifier_can_only_be_used_in_TypeScript_files_8009", "The '{0}' modifier can only be used in TypeScript files."); }; - static shared Type_annotations_can_only_be_used_in_TypeScript_files(){ return diag(8010, DiagnosticCategory::Error, "Type_annotations_can_only_be_used_in_TypeScript_files_8010", "Type annotations can only be used in TypeScript files."); }; - static shared Type_arguments_can_only_be_used_in_TypeScript_files(){ return diag(8011, DiagnosticCategory::Error, "Type_arguments_can_only_be_used_in_TypeScript_files_8011", "Type arguments can only be used in TypeScript files."); }; - static shared Parameter_modifiers_can_only_be_used_in_TypeScript_files(){ return diag(8012, DiagnosticCategory::Error, "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012", "Parameter modifiers can only be used in TypeScript files."); }; - static shared Non_null_assertions_can_only_be_used_in_TypeScript_files(){ return diag(8013, DiagnosticCategory::Error, "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013", "Non-null assertions can only be used in TypeScript files."); }; - static shared Type_assertion_expressions_can_only_be_used_in_TypeScript_files(){ return diag(8016, DiagnosticCategory::Error, "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016", "Type assertion expressions can only be used in TypeScript files."); }; - static shared Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0(){ return diag(8017, DiagnosticCategory::Error, "Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0_8017", "Octal literal types must use ES2015 syntax. Use the syntax '{0}'."); }; - static shared Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0(){ return diag(8018, DiagnosticCategory::Error, "Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018", "Octal literals are not allowed in enums members initializer. Use the syntax '{0}'."); }; - static shared Report_errors_in_js_files(){ return diag(8019, DiagnosticCategory::Message, "Report_errors_in_js_files_8019", "Report errors in .js files."); }; - static shared JSDoc_types_can_only_be_used_inside_documentation_comments(){ return diag(8020, DiagnosticCategory::Error, "JSDoc_types_can_only_be_used_inside_documentation_comments_8020", "JSDoc types can only be used inside documentation comments."); }; - static shared JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags(){ return diag(8021, DiagnosticCategory::Error, "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021", "JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."); }; - static shared JSDoc_0_is_not_attached_to_a_class(){ return diag(8022, DiagnosticCategory::Error, "JSDoc_0_is_not_attached_to_a_class_8022", "JSDoc '@{0}' is not attached to a class."); }; - static shared JSDoc_0_1_does_not_match_the_extends_2_clause(){ return diag(8023, DiagnosticCategory::Error, "JSDoc_0_1_does_not_match_the_extends_2_clause_8023", "JSDoc '@{0} {1}' does not match the 'extends {2}' clause."); }; - static shared JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name(){ return diag(8024, DiagnosticCategory::Error, "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024", "JSDoc '@param' tag has name '{0}', but there is no parameter with that name."); }; - static shared Class_declarations_cannot_have_more_than_one_augments_or_extends_tag(){ return diag(8025, DiagnosticCategory::Error, "Class_declarations_cannot_have_more_than_one_augments_or_extends_tag_8025", "Class declarations cannot have more than one '@augments' or '@extends' tag."); }; - static shared Expected_0_type_arguments_provide_these_with_an_extends_tag(){ return diag(8026, DiagnosticCategory::Error, "Expected_0_type_arguments_provide_these_with_an_extends_tag_8026", "Expected {0} type arguments; provide these with an '@extends' tag."); }; - static shared Expected_0_1_type_arguments_provide_these_with_an_extends_tag(){ return diag(8027, DiagnosticCategory::Error, "Expected_0_1_type_arguments_provide_these_with_an_extends_tag_8027", "Expected {0}-{1} type arguments; provide these with an '@extends' tag."); }; - static shared JSDoc_may_only_appear_in_the_last_parameter_of_a_signature(){ return diag(8028, DiagnosticCategory::Error, "JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028", "JSDoc '...' may only appear in the last parameter of a signature."); }; - static shared JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type(){ return diag(8029, DiagnosticCategory::Error, "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029", "JSDoc '@param' tag has name '{0}', but there is no parameter with that name. It would match 'arguments' if it had an array type."); }; - static shared The_type_of_a_function_declaration_must_match_the_function_s_signature(){ return diag(8030, DiagnosticCategory::Error, "The_type_of_a_function_declaration_must_match_the_function_s_signature_8030", "The type of a function declaration must match the function's signature."); }; - static shared You_cannot_rename_a_module_via_a_global_import(){ return diag(8031, DiagnosticCategory::Error, "You_cannot_rename_a_module_via_a_global_import_8031", "You cannot rename a module via a global import."); }; - static shared Qualified_name_0_is_not_allowed_without_a_leading_param_object_1(){ return diag(8032, DiagnosticCategory::Error, "Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032", "Qualified name '{0}' is not allowed without a leading '@param {object} {1}'."); }; - static shared A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags(){ return diag(8033, DiagnosticCategory::Error, "A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags_8033", "A JSDoc '@typedef' comment may not contain multiple '@type' tags."); }; - static shared The_tag_was_first_specified_here(){ return diag(8034, DiagnosticCategory::Error, "The_tag_was_first_specified_here_8034", "The tag was first specified here."); }; - static shared Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit(){ return diag(9005, DiagnosticCategory::Error, "Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005", "Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit."); }; - static shared Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit(){ return diag(9006, DiagnosticCategory::Error, "Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006", "Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit."); }; - static shared JSX_attributes_must_only_be_assigned_a_non_empty_expression(){ return diag(17000, DiagnosticCategory::Error, "JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000", "JSX attributes must only be assigned a non-empty 'expression'."); }; - static shared JSX_elements_cannot_have_multiple_attributes_with_the_same_name(){ return diag(17001, DiagnosticCategory::Error, "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001", "JSX elements cannot have multiple attributes with the same name."); }; - static shared Expected_corresponding_JSX_closing_tag_for_0(){ return diag(17002, DiagnosticCategory::Error, "Expected_corresponding_JSX_closing_tag_for_0_17002", "Expected corresponding JSX closing tag for '{0}'."); }; - static shared Cannot_use_JSX_unless_the_jsx_flag_is_provided(){ return diag(17004, DiagnosticCategory::Error, "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004", "Cannot use JSX unless the '--jsx' flag is provided."); }; - static shared A_constructor_cannot_contain_a_super_call_when_its_class_extends_null(){ return diag(17005, DiagnosticCategory::Error, "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005", "A constructor cannot contain a 'super' call when its class extends 'null'."); }; - static shared 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(){ return diag(17006, DiagnosticCategory::Error, "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006", + static shared_ptr The_containing_arrow_function_captures_the_global_value_of_this(){ return diag(7041, DiagnosticCategory::Error, "The_containing_arrow_function_captures_the_global_value_of_this_7041", "The containing arrow function captures the global value of 'this'."); }; + static shared_ptr Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used(){ return diag(7042, DiagnosticCategory::Error, "Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042", "Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used."); }; + static shared_ptr Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage(){ return diag(7043, DiagnosticCategory::Suggestion, "Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043", "Variable '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."); }; + static shared_ptr Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage(){ return diag(7044, DiagnosticCategory::Suggestion, "Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044", "Parameter '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."); }; + static shared_ptr Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage(){ return diag(7045, DiagnosticCategory::Suggestion, "Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045", "Member '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."); }; + static shared_ptr Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage(){ return diag(7046, DiagnosticCategory::Suggestion, "Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046", "Variable '{0}' implicitly has type '{1}' in some locations, but a better type may be inferred from usage."); }; + static shared_ptr Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage(){ return diag(7047, DiagnosticCategory::Suggestion, "Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047", "Rest parameter '{0}' implicitly has an 'any[]' type, but a better type may be inferred from usage."); }; + static shared_ptr Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage(){ return diag(7048, DiagnosticCategory::Suggestion, "Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048", "Property '{0}' implicitly has type 'any', but a better type for its get accessor may be inferred from usage."); }; + static shared_ptr Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage(){ return diag(7049, DiagnosticCategory::Suggestion, "Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049", "Property '{0}' implicitly has type 'any', but a better type for its set accessor may be inferred from usage."); }; + static shared_ptr _0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage(){ return diag(7050, DiagnosticCategory::Suggestion, "_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050", "'{0}' implicitly has an '{1}' return type, but a better type may be inferred from usage."); }; + static shared_ptr Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1(){ return diag(7051, DiagnosticCategory::Error, "Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051", "Parameter has a name but no type. Did you mean '{0}: {1}'?"); }; + static shared_ptr Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1(){ return diag(7052, DiagnosticCategory::Error, "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052", "Element implicitly has an 'any' type because type '{0}' has no index signature. Did you mean to call '{1}'?"); }; + static shared_ptr Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1(){ return diag(7053, DiagnosticCategory::Error, "Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053", "Element implicitly has an 'any' type because expression of type '{0}' can't be used to index type '{1}'."); }; + static shared_ptr No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1(){ return diag(7054, DiagnosticCategory::Error, "No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054", "No index signature with a parameter of type '{0}' was found on type '{1}'."); }; + static shared_ptr _0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type(){ return diag(7055, DiagnosticCategory::Error, "_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055", "'{0}', which lacks return-type annotation, implicitly has an '{1}' yield type."); }; + static shared_ptr The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed(){ return diag(7056, DiagnosticCategory::Error, "The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_ty_7056", "The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed."); }; + static shared_ptr yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation(){ return diag(7057, DiagnosticCategory::Error, "yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_t_7057", "'yield' expression implicitly results in an 'any' type because its containing generator lacks a return-type annotation."); }; + static shared_ptr If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1(){ return diag(7058, DiagnosticCategory::Error, "If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_decl_7058", "If the '{0}' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '{1}';`"); }; + static shared_ptr This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead(){ return diag(7059, DiagnosticCategory::Error, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059", "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."); }; + static shared_ptr This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint(){ return diag(7060, DiagnosticCategory::Error, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060", "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint."); }; + static shared_ptr A_mapped_type_may_not_declare_properties_or_methods(){ return diag(7061, DiagnosticCategory::Error, "A_mapped_type_may_not_declare_properties_or_methods_7061", "A mapped type may not declare properties or methods."); }; + static shared_ptr JSON_imports_are_experimental_in_ES_module_mode_imports(){ return diag(7062, DiagnosticCategory::Error, "JSON_imports_are_experimental_in_ES_module_mode_imports_7062", "JSON imports are experimental in ES module mode imports."); }; + static shared_ptr You_cannot_rename_this_element(){ return diag(8000, DiagnosticCategory::Error, "You_cannot_rename_this_element_8000", "You cannot rename this element."); }; + static shared_ptr You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library(){ return diag(8001, DiagnosticCategory::Error, "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", "You cannot rename elements that are defined in the standard TypeScript library."); }; + static shared_ptr import_can_only_be_used_in_TypeScript_files(){ return diag(8002, DiagnosticCategory::Error, "import_can_only_be_used_in_TypeScript_files_8002", "'import ... =' can only be used in TypeScript files."); }; + static shared_ptr export_can_only_be_used_in_TypeScript_files(){ return diag(8003, DiagnosticCategory::Error, "export_can_only_be_used_in_TypeScript_files_8003", "'export =' can only be used in TypeScript files."); }; + static shared_ptr Type_parameter_declarations_can_only_be_used_in_TypeScript_files(){ return diag(8004, DiagnosticCategory::Error, "Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004", "Type parameter declarations can only be used in TypeScript files."); }; + static shared_ptr implements_clauses_can_only_be_used_in_TypeScript_files(){ return diag(8005, DiagnosticCategory::Error, "implements_clauses_can_only_be_used_in_TypeScript_files_8005", "'implements' clauses can only be used in TypeScript files."); }; + static shared_ptr _0_declarations_can_only_be_used_in_TypeScript_files(){ return diag(8006, DiagnosticCategory::Error, "_0_declarations_can_only_be_used_in_TypeScript_files_8006", "'{0}' declarations can only be used in TypeScript files."); }; + static shared_ptr Type_aliases_can_only_be_used_in_TypeScript_files(){ return diag(8008, DiagnosticCategory::Error, "Type_aliases_can_only_be_used_in_TypeScript_files_8008", "Type aliases can only be used in TypeScript files."); }; + static shared_ptr The_0_modifier_can_only_be_used_in_TypeScript_files(){ return diag(8009, DiagnosticCategory::Error, "The_0_modifier_can_only_be_used_in_TypeScript_files_8009", "The '{0}' modifier can only be used in TypeScript files."); }; + static shared_ptr Type_annotations_can_only_be_used_in_TypeScript_files(){ return diag(8010, DiagnosticCategory::Error, "Type_annotations_can_only_be_used_in_TypeScript_files_8010", "Type annotations can only be used in TypeScript files."); }; + static shared_ptr Type_arguments_can_only_be_used_in_TypeScript_files(){ return diag(8011, DiagnosticCategory::Error, "Type_arguments_can_only_be_used_in_TypeScript_files_8011", "Type arguments can only be used in TypeScript files."); }; + static shared_ptr Parameter_modifiers_can_only_be_used_in_TypeScript_files(){ return diag(8012, DiagnosticCategory::Error, "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012", "Parameter modifiers can only be used in TypeScript files."); }; + static shared_ptr Non_null_assertions_can_only_be_used_in_TypeScript_files(){ return diag(8013, DiagnosticCategory::Error, "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013", "Non-null assertions can only be used in TypeScript files."); }; + static shared_ptr Type_assertion_expressions_can_only_be_used_in_TypeScript_files(){ return diag(8016, DiagnosticCategory::Error, "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016", "Type assertion expressions can only be used in TypeScript files."); }; + static shared_ptr Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0(){ return diag(8017, DiagnosticCategory::Error, "Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0_8017", "Octal literal types must use ES2015 syntax. Use the syntax '{0}'."); }; + static shared_ptr Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0(){ return diag(8018, DiagnosticCategory::Error, "Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018", "Octal literals are not allowed in enums members initializer. Use the syntax '{0}'."); }; + static shared_ptr Report_errors_in_js_files(){ return diag(8019, DiagnosticCategory::Message, "Report_errors_in_js_files_8019", "Report errors in .js files."); }; + static shared_ptr JSDoc_types_can_only_be_used_inside_documentation_comments(){ return diag(8020, DiagnosticCategory::Error, "JSDoc_types_can_only_be_used_inside_documentation_comments_8020", "JSDoc types can only be used inside documentation comments."); }; + static shared_ptr JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags(){ return diag(8021, DiagnosticCategory::Error, "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021", "JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."); }; + static shared_ptr JSDoc_0_is_not_attached_to_a_class(){ return diag(8022, DiagnosticCategory::Error, "JSDoc_0_is_not_attached_to_a_class_8022", "JSDoc '@{0}' is not attached to a class."); }; + static shared_ptr JSDoc_0_1_does_not_match_the_extends_2_clause(){ return diag(8023, DiagnosticCategory::Error, "JSDoc_0_1_does_not_match_the_extends_2_clause_8023", "JSDoc '@{0} {1}' does not match the 'extends {2}' clause."); }; + static shared_ptr JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name(){ return diag(8024, DiagnosticCategory::Error, "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024", "JSDoc '@param' tag has name '{0}', but there is no parameter with that name."); }; + static shared_ptr Class_declarations_cannot_have_more_than_one_augments_or_extends_tag(){ return diag(8025, DiagnosticCategory::Error, "Class_declarations_cannot_have_more_than_one_augments_or_extends_tag_8025", "Class declarations cannot have more than one '@augments' or '@extends' tag."); }; + static shared_ptr Expected_0_type_arguments_provide_these_with_an_extends_tag(){ return diag(8026, DiagnosticCategory::Error, "Expected_0_type_arguments_provide_these_with_an_extends_tag_8026", "Expected {0} type arguments; provide these with an '@extends' tag."); }; + static shared_ptr Expected_0_1_type_arguments_provide_these_with_an_extends_tag(){ return diag(8027, DiagnosticCategory::Error, "Expected_0_1_type_arguments_provide_these_with_an_extends_tag_8027", "Expected {0}-{1} type arguments; provide these with an '@extends' tag."); }; + static shared_ptr JSDoc_may_only_appear_in_the_last_parameter_of_a_signature(){ return diag(8028, DiagnosticCategory::Error, "JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028", "JSDoc '...' may only appear in the last parameter of a signature."); }; + static shared_ptr JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type(){ return diag(8029, DiagnosticCategory::Error, "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029", "JSDoc '@param' tag has name '{0}', but there is no parameter with that name. It would match 'arguments' if it had an array type."); }; + static shared_ptr The_type_of_a_function_declaration_must_match_the_function_s_signature(){ return diag(8030, DiagnosticCategory::Error, "The_type_of_a_function_declaration_must_match_the_function_s_signature_8030", "The type of a function declaration must match the function's signature."); }; + static shared_ptr You_cannot_rename_a_module_via_a_global_import(){ return diag(8031, DiagnosticCategory::Error, "You_cannot_rename_a_module_via_a_global_import_8031", "You cannot rename a module via a global import."); }; + static shared_ptr Qualified_name_0_is_not_allowed_without_a_leading_param_object_1(){ return diag(8032, DiagnosticCategory::Error, "Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032", "Qualified name '{0}' is not allowed without a leading '@param {object} {1}'."); }; + static shared_ptr A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags(){ return diag(8033, DiagnosticCategory::Error, "A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags_8033", "A JSDoc '@typedef' comment may not contain multiple '@type' tags."); }; + static shared_ptr The_tag_was_first_specified_here(){ return diag(8034, DiagnosticCategory::Error, "The_tag_was_first_specified_here_8034", "The tag was first specified here."); }; + static shared_ptr Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit(){ return diag(9005, DiagnosticCategory::Error, "Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005", "Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit."); }; + static shared_ptr Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit(){ return diag(9006, DiagnosticCategory::Error, "Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006", "Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit."); }; + static shared_ptr JSX_attributes_must_only_be_assigned_a_non_empty_expression(){ return diag(17000, DiagnosticCategory::Error, "JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000", "JSX attributes must only be assigned a non-empty 'expression'."); }; + static shared_ptr JSX_elements_cannot_have_multiple_attributes_with_the_same_name(){ return diag(17001, DiagnosticCategory::Error, "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001", "JSX elements cannot have multiple attributes with the same name."); }; + static shared_ptr Expected_corresponding_JSX_closing_tag_for_0(){ return diag(17002, DiagnosticCategory::Error, "Expected_corresponding_JSX_closing_tag_for_0_17002", "Expected corresponding JSX closing tag for '{0}'."); }; + static shared_ptr Cannot_use_JSX_unless_the_jsx_flag_is_provided(){ return diag(17004, DiagnosticCategory::Error, "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004", "Cannot use JSX unless the '--jsx' flag is provided."); }; + static shared_ptr A_constructor_cannot_contain_a_super_call_when_its_class_extends_null(){ return diag(17005, DiagnosticCategory::Error, "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005", "A constructor cannot contain a 'super' call when its class extends 'null'."); }; + static shared_ptr 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(){ return diag(17006, DiagnosticCategory::Error, "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006", "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."); }; - static shared A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses(){ return diag(17007, DiagnosticCategory::Error, "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007", "A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."); }; - static shared JSX_element_0_has_no_corresponding_closing_tag(){ return diag(17008, DiagnosticCategory::Error, "JSX_element_0_has_no_corresponding_closing_tag_17008", "JSX element '{0}' has no corresponding closing tag."); }; - static shared super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class(){ return diag(17009, DiagnosticCategory::Error, "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009", "'super' must be called before accessing 'this' in the constructor of a derived class."); }; - static shared Unknown_type_acquisition_option_0(){ return diag(17010, DiagnosticCategory::Error, "Unknown_type_acquisition_option_0_17010", "Unknown type acquisition option '{0}'."); }; - static shared super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class(){ return diag(17011, DiagnosticCategory::Error, "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011", "'super' must be called before accessing a property of 'super' in the constructor of a derived class."); }; - static shared _0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2(){ return diag(17012, DiagnosticCategory::Error, "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012", "'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?"); }; - static shared Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor(){ return diag(17013, DiagnosticCategory::Error, "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013", "Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor."); }; - static shared JSX_fragment_has_no_corresponding_closing_tag(){ return diag(17014, DiagnosticCategory::Error, "JSX_fragment_has_no_corresponding_closing_tag_17014", "JSX fragment has no corresponding closing tag."); }; - static shared Expected_corresponding_closing_tag_for_JSX_fragment(){ return diag(17015, DiagnosticCategory::Error, "Expected_corresponding_closing_tag_for_JSX_fragment_17015", "Expected corresponding closing tag for JSX fragment."); }; - static shared The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option(){ return diag(17016, DiagnosticCategory::Error, "The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_com_17016", "The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option."); }; - static shared An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments(){ return diag(17017, DiagnosticCategory::Error, "An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments_17017", "An @jsxFrag pragma is required when using an @jsx pragma with JSX fragments."); }; - static shared Unknown_type_acquisition_option_0_Did_you_mean_1(){ return diag(17018, DiagnosticCategory::Error, "Unknown_type_acquisition_option_0_Did_you_mean_1_17018", "Unknown type acquisition option '{0}'. Did you mean '{1}'?"); }; - static shared Circularity_detected_while_resolving_configuration_Colon_0(){ return diag(18000, DiagnosticCategory::Error, "Circularity_detected_while_resolving_configuration_Colon_0_18000", "Circularity detected while resolving configuration: {0}"); }; - static shared The_files_list_in_config_file_0_is_empty(){ return diag(18002, DiagnosticCategory::Error, "The_files_list_in_config_file_0_is_empty_18002", "The 'files' list in config file '{0}' is empty."); }; - static shared No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2(){ return diag(18003, DiagnosticCategory::Error, "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003", "No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'."); }; - static shared File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module(){ return diag(80001, DiagnosticCategory::Suggestion, "File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module_80001", "File is a CommonJS module; it may be converted to an ES module."); }; - static shared This_constructor_function_may_be_converted_to_a_class_declaration(){ return diag(80002, DiagnosticCategory::Suggestion, "This_constructor_function_may_be_converted_to_a_class_declaration_80002", "This constructor function may be converted to a class declaration."); }; - static shared Import_may_be_converted_to_a_default_import(){ return diag(80003, DiagnosticCategory::Suggestion, "Import_may_be_converted_to_a_default_import_80003", "Import may be converted to a default import."); }; - static shared JSDoc_types_may_be_moved_to_TypeScript_types(){ return diag(80004, DiagnosticCategory::Suggestion, "JSDoc_types_may_be_moved_to_TypeScript_types_80004", "JSDoc types may be moved to TypeScript types."); }; - static shared require_call_may_be_converted_to_an_import(){ return diag(80005, DiagnosticCategory::Suggestion, "require_call_may_be_converted_to_an_import_80005", "'require' call may be converted to an import."); }; - static shared This_may_be_converted_to_an_async_function(){ return diag(80006, DiagnosticCategory::Suggestion, "This_may_be_converted_to_an_async_function_80006", "This may be converted to an async function."); }; - static shared await_has_no_effect_on_the_type_of_this_expression(){ return diag(80007, DiagnosticCategory::Suggestion, "await_has_no_effect_on_the_type_of_this_expression_80007", "'await' has no effect on the type of this expression."); }; - static shared Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers(){ return diag(80008, DiagnosticCategory::Suggestion, "Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008", "Numeric literals with absolute values equal to 2^53 or greater are too large to be represented accurately as integers."); }; - static shared Add_missing_super_call(){ return diag(90001, DiagnosticCategory::Message, "Add_missing_super_call_90001", "Add missing 'super()' call"); }; - static shared Make_super_call_the_first_statement_in_the_constructor(){ return diag(90002, DiagnosticCategory::Message, "Make_super_call_the_first_statement_in_the_constructor_90002", "Make 'super()' call the first statement in the constructor"); }; - static shared Change_extends_to_implements(){ return diag(90003, DiagnosticCategory::Message, "Change_extends_to_implements_90003", "Change 'extends' to 'implements'"); }; - static shared Remove_unused_declaration_for_Colon_0(){ return diag(90004, DiagnosticCategory::Message, "Remove_unused_declaration_for_Colon_0_90004", "Remove unused declaration for: '{0}'"); }; - static shared Remove_import_from_0(){ return diag(90005, DiagnosticCategory::Message, "Remove_import_from_0_90005", "Remove import from '{0}'"); }; - static shared Implement_interface_0(){ return diag(90006, DiagnosticCategory::Message, "Implement_interface_0_90006", "Implement interface '{0}'"); }; - static shared Implement_inherited_abstract_class(){ return diag(90007, DiagnosticCategory::Message, "Implement_inherited_abstract_class_90007", "Implement inherited abstract class"); }; - static shared Add_0_to_unresolved_variable(){ return diag(90008, DiagnosticCategory::Message, "Add_0_to_unresolved_variable_90008", "Add '{0}.' to unresolved variable"); }; - static shared Remove_variable_statement(){ return diag(90010, DiagnosticCategory::Message, "Remove_variable_statement_90010", "Remove variable statement"); }; - static shared Remove_template_tag(){ return diag(90011, DiagnosticCategory::Message, "Remove_template_tag_90011", "Remove template tag"); }; - static shared Remove_type_parameters(){ return diag(90012, DiagnosticCategory::Message, "Remove_type_parameters_90012", "Remove type parameters"); }; - static shared Import_0_from_module_1(){ return diag(90013, DiagnosticCategory::Message, "Import_0_from_module_1_90013", "Import '{0}' from module \"{1}\""); }; - static shared Change_0_to_1(){ return diag(90014, DiagnosticCategory::Message, "Change_0_to_1_90014", "Change '{0}' to '{1}'"); }; - static shared Add_0_to_existing_import_declaration_from_1(){ return diag(90015, DiagnosticCategory::Message, "Add_0_to_existing_import_declaration_from_1_90015", "Add '{0}' to existing import declaration from \"{1}\""); }; - static shared Declare_property_0(){ return diag(90016, DiagnosticCategory::Message, "Declare_property_0_90016", "Declare property '{0}'"); }; - static shared Add_index_signature_for_property_0(){ return diag(90017, DiagnosticCategory::Message, "Add_index_signature_for_property_0_90017", "Add index signature for property '{0}'"); }; - static shared Disable_checking_for_this_file(){ return diag(90018, DiagnosticCategory::Message, "Disable_checking_for_this_file_90018", "Disable checking for this file"); }; - static shared Ignore_this_error_message(){ return diag(90019, DiagnosticCategory::Message, "Ignore_this_error_message_90019", "Ignore this error message"); }; - static shared Initialize_property_0_in_the_constructor(){ return diag(90020, DiagnosticCategory::Message, "Initialize_property_0_in_the_constructor_90020", "Initialize property '{0}' in the constructor"); }; - static shared Initialize_static_property_0(){ return diag(90021, DiagnosticCategory::Message, "Initialize_static_property_0_90021", "Initialize static property '{0}'"); }; - static shared Change_spelling_to_0(){ return diag(90022, DiagnosticCategory::Message, "Change_spelling_to_0_90022", "Change spelling to '{0}'"); }; - static shared Declare_method_0(){ return diag(90023, DiagnosticCategory::Message, "Declare_method_0_90023", "Declare method '{0}'"); }; - static shared Declare_static_method_0(){ return diag(90024, DiagnosticCategory::Message, "Declare_static_method_0_90024", "Declare static method '{0}'"); }; - static shared Prefix_0_with_an_underscore(){ return diag(90025, DiagnosticCategory::Message, "Prefix_0_with_an_underscore_90025", "Prefix '{0}' with an underscore"); }; - static shared Rewrite_as_the_indexed_access_type_0(){ return diag(90026, DiagnosticCategory::Message, "Rewrite_as_the_indexed_access_type_0_90026", "Rewrite as the indexed access type '{0}'"); }; - static shared Declare_static_property_0(){ return diag(90027, DiagnosticCategory::Message, "Declare_static_property_0_90027", "Declare static property '{0}'"); }; - static shared Call_decorator_expression(){ return diag(90028, DiagnosticCategory::Message, "Call_decorator_expression_90028", "Call decorator expression"); }; - static shared Add_async_modifier_to_containing_function(){ return diag(90029, DiagnosticCategory::Message, "Add_async_modifier_to_containing_function_90029", "Add async modifier to containing function"); }; - static shared Replace_infer_0_with_unknown(){ return diag(90030, DiagnosticCategory::Message, "Replace_infer_0_with_unknown_90030", "Replace 'infer {0}' with 'unknown'"); }; - static shared Replace_all_unused_infer_with_unknown(){ return diag(90031, DiagnosticCategory::Message, "Replace_all_unused_infer_with_unknown_90031", "Replace all unused 'infer' with 'unknown'"); }; - static shared Import_default_0_from_module_1(){ return diag(90032, DiagnosticCategory::Message, "Import_default_0_from_module_1_90032", "Import default '{0}' from module \"{1}\""); }; - static shared Add_default_import_0_to_existing_import_declaration_from_1(){ return diag(90033, DiagnosticCategory::Message, "Add_default_import_0_to_existing_import_declaration_from_1_90033", "Add default import '{0}' to existing import declaration from \"{1}\""); }; - static shared Add_parameter_name(){ return diag(90034, DiagnosticCategory::Message, "Add_parameter_name_90034", "Add parameter name"); }; - static shared Declare_private_property_0(){ return diag(90035, DiagnosticCategory::Message, "Declare_private_property_0_90035", "Declare private property '{0}'"); }; - static shared Replace_0_with_Promise_1(){ return diag(90036, DiagnosticCategory::Message, "Replace_0_with_Promise_1_90036", "Replace '{0}' with 'Promise<{1}>'"); }; - static shared Fix_all_incorrect_return_type_of_an_async_functions(){ return diag(90037, DiagnosticCategory::Message, "Fix_all_incorrect_return_type_of_an_async_functions_90037", "Fix all incorrect return type of an async functions"); }; - static shared Declare_private_method_0(){ return diag(90038, DiagnosticCategory::Message, "Declare_private_method_0_90038", "Declare private method '{0}'"); }; - static shared Remove_unused_destructuring_declaration(){ return diag(90039, DiagnosticCategory::Message, "Remove_unused_destructuring_declaration_90039", "Remove unused destructuring declaration"); }; - static shared Remove_unused_declarations_for_Colon_0(){ return diag(90041, DiagnosticCategory::Message, "Remove_unused_declarations_for_Colon_0_90041", "Remove unused declarations for: '{0}'"); }; - static shared Declare_a_private_field_named_0(){ return diag(90053, DiagnosticCategory::Message, "Declare_a_private_field_named_0_90053", "Declare a private field named '{0}'."); }; - static shared Includes_imports_of_types_referenced_by_0(){ return diag(90054, DiagnosticCategory::Message, "Includes_imports_of_types_referenced_by_0_90054", "Includes imports of types referenced by '{0}'"); }; - static shared Convert_function_to_an_ES2015_class(){ return diag(95001, DiagnosticCategory::Message, "Convert_function_to_an_ES2015_class_95001", "Convert function to an ES2015 class"); }; - static shared Convert_0_to_1_in_0(){ return diag(95003, DiagnosticCategory::Message, "Convert_0_to_1_in_0_95003", "Convert '{0}' to '{1} in {0}'"); }; - static shared Extract_to_0_in_1(){ return diag(95004, DiagnosticCategory::Message, "Extract_to_0_in_1_95004", "Extract to {0} in {1}"); }; - static shared Extract_function(){ return diag(95005, DiagnosticCategory::Message, "Extract_function_95005", "Extract function"); }; - static shared Extract_constant(){ return diag(95006, DiagnosticCategory::Message, "Extract_constant_95006", "Extract constant"); }; - static shared Extract_to_0_in_enclosing_scope(){ return diag(95007, DiagnosticCategory::Message, "Extract_to_0_in_enclosing_scope_95007", "Extract to {0} in enclosing scope"); }; - static shared Extract_to_0_in_1_scope(){ return diag(95008, DiagnosticCategory::Message, "Extract_to_0_in_1_scope_95008", "Extract to {0} in {1} scope"); }; - static shared Annotate_with_type_from_JSDoc(){ return diag(95009, DiagnosticCategory::Message, "Annotate_with_type_from_JSDoc_95009", "Annotate with type from JSDoc"); }; - static shared Infer_type_of_0_from_usage(){ return diag(95011, DiagnosticCategory::Message, "Infer_type_of_0_from_usage_95011", "Infer type of '{0}' from usage"); }; - static shared Infer_parameter_types_from_usage(){ return diag(95012, DiagnosticCategory::Message, "Infer_parameter_types_from_usage_95012", "Infer parameter types from usage"); }; - static shared Convert_to_default_import(){ return diag(95013, DiagnosticCategory::Message, "Convert_to_default_import_95013", "Convert to default import"); }; - static shared Install_0(){ return diag(95014, DiagnosticCategory::Message, "Install_0_95014", "Install '{0}'"); }; - static shared Replace_import_with_0(){ return diag(95015, DiagnosticCategory::Message, "Replace_import_with_0_95015", "Replace import with '{0}'."); }; - static shared Use_synthetic_default_member(){ return diag(95016, DiagnosticCategory::Message, "Use_synthetic_default_member_95016", "Use synthetic 'default' member."); }; - static shared Convert_to_ES_module(){ return diag(95017, DiagnosticCategory::Message, "Convert_to_ES_module_95017", "Convert to ES module"); }; - static shared Add_undefined_type_to_property_0(){ return diag(95018, DiagnosticCategory::Message, "Add_undefined_type_to_property_0_95018", "Add 'undefined' type to property '{0}'"); }; - static shared Add_initializer_to_property_0(){ return diag(95019, DiagnosticCategory::Message, "Add_initializer_to_property_0_95019", "Add initializer to property '{0}'"); }; - static shared Add_definite_assignment_assertion_to_property_0(){ return diag(95020, DiagnosticCategory::Message, "Add_definite_assignment_assertion_to_property_0_95020", "Add definite assignment assertion to property '{0}'"); }; - static shared Convert_all_type_literals_to_mapped_type(){ return diag(95021, DiagnosticCategory::Message, "Convert_all_type_literals_to_mapped_type_95021", "Convert all type literals to mapped type"); }; - static shared Add_all_missing_members(){ return diag(95022, DiagnosticCategory::Message, "Add_all_missing_members_95022", "Add all missing members"); }; - static shared Infer_all_types_from_usage(){ return diag(95023, DiagnosticCategory::Message, "Infer_all_types_from_usage_95023", "Infer all types from usage"); }; - static shared Delete_all_unused_declarations(){ return diag(95024, DiagnosticCategory::Message, "Delete_all_unused_declarations_95024", "Delete all unused declarations"); }; - static shared Prefix_all_unused_declarations_with_where_possible(){ return diag(95025, DiagnosticCategory::Message, "Prefix_all_unused_declarations_with_where_possible_95025", "Prefix all unused declarations with '_' where possible"); }; - static shared Fix_all_detected_spelling_errors(){ return diag(95026, DiagnosticCategory::Message, "Fix_all_detected_spelling_errors_95026", "Fix all detected spelling errors"); }; - static shared Add_initializers_to_all_uninitialized_properties(){ return diag(95027, DiagnosticCategory::Message, "Add_initializers_to_all_uninitialized_properties_95027", "Add initializers to all uninitialized properties"); }; - static shared Add_definite_assignment_assertions_to_all_uninitialized_properties(){ return diag(95028, DiagnosticCategory::Message, "Add_definite_assignment_assertions_to_all_uninitialized_properties_95028", "Add definite assignment assertions to all uninitialized properties"); }; - static shared Add_undefined_type_to_all_uninitialized_properties(){ return diag(95029, DiagnosticCategory::Message, "Add_undefined_type_to_all_uninitialized_properties_95029", "Add undefined type to all uninitialized properties"); }; - static shared Change_all_jsdoc_style_types_to_TypeScript(){ return diag(95030, DiagnosticCategory::Message, "Change_all_jsdoc_style_types_to_TypeScript_95030", "Change all jsdoc-style types to TypeScript"); }; - static shared Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types(){ return diag(95031, DiagnosticCategory::Message, "Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types_95031", "Change all jsdoc-style types to TypeScript (and add '| undefined' to nullable types)"); }; - static shared Implement_all_unimplemented_interfaces(){ return diag(95032, DiagnosticCategory::Message, "Implement_all_unimplemented_interfaces_95032", "Implement all unimplemented interfaces"); }; - static shared Install_all_missing_types_packages(){ return diag(95033, DiagnosticCategory::Message, "Install_all_missing_types_packages_95033", "Install all missing types packages"); }; - static shared Rewrite_all_as_indexed_access_types(){ return diag(95034, DiagnosticCategory::Message, "Rewrite_all_as_indexed_access_types_95034", "Rewrite all as indexed access types"); }; - static shared Convert_all_to_default_imports(){ return diag(95035, DiagnosticCategory::Message, "Convert_all_to_default_imports_95035", "Convert all to default imports"); }; - static shared Make_all_super_calls_the_first_statement_in_their_constructor(){ return diag(95036, DiagnosticCategory::Message, "Make_all_super_calls_the_first_statement_in_their_constructor_95036", "Make all 'super()' calls the first statement in their constructor"); }; - static shared Add_qualifier_to_all_unresolved_variables_matching_a_member_name(){ return diag(95037, DiagnosticCategory::Message, "Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037", "Add qualifier to all unresolved variables matching a member name"); }; - static shared Change_all_extended_interfaces_to_implements(){ return diag(95038, DiagnosticCategory::Message, "Change_all_extended_interfaces_to_implements_95038", "Change all extended interfaces to 'implements'"); }; - static shared Add_all_missing_super_calls(){ return diag(95039, DiagnosticCategory::Message, "Add_all_missing_super_calls_95039", "Add all missing super calls"); }; - static shared Implement_all_inherited_abstract_classes(){ return diag(95040, DiagnosticCategory::Message, "Implement_all_inherited_abstract_classes_95040", "Implement all inherited abstract classes"); }; - static shared Add_all_missing_async_modifiers(){ return diag(95041, DiagnosticCategory::Message, "Add_all_missing_async_modifiers_95041", "Add all missing 'async' modifiers"); }; - static shared Add_ts_ignore_to_all_error_messages(){ return diag(95042, DiagnosticCategory::Message, "Add_ts_ignore_to_all_error_messages_95042", "Add '@ts-ignore' to all error messages"); }; - static shared Annotate_everything_with_types_from_JSDoc(){ return diag(95043, DiagnosticCategory::Message, "Annotate_everything_with_types_from_JSDoc_95043", "Annotate everything with types from JSDoc"); }; - static shared Add_to_all_uncalled_decorators(){ return diag(95044, DiagnosticCategory::Message, "Add_to_all_uncalled_decorators_95044", "Add '()' to all uncalled decorators"); }; - static shared Convert_all_constructor_functions_to_classes(){ return diag(95045, DiagnosticCategory::Message, "Convert_all_constructor_functions_to_classes_95045", "Convert all constructor functions to classes"); }; - static shared Generate_get_and_set_accessors(){ return diag(95046, DiagnosticCategory::Message, "Generate_get_and_set_accessors_95046", "Generate 'get' and 'set' accessors"); }; - static shared Convert_require_to_import(){ return diag(95047, DiagnosticCategory::Message, "Convert_require_to_import_95047", "Convert 'require' to 'import'"); }; - static shared Convert_all_require_to_import(){ return diag(95048, DiagnosticCategory::Message, "Convert_all_require_to_import_95048", "Convert all 'require' to 'import'"); }; - static shared Move_to_a_new_file(){ return diag(95049, DiagnosticCategory::Message, "Move_to_a_new_file_95049", "Move to a new file"); }; - static shared Remove_unreachable_code(){ return diag(95050, DiagnosticCategory::Message, "Remove_unreachable_code_95050", "Remove unreachable code"); }; - static shared Remove_all_unreachable_code(){ return diag(95051, DiagnosticCategory::Message, "Remove_all_unreachable_code_95051", "Remove all unreachable code"); }; - static shared Add_missing_typeof(){ return diag(95052, DiagnosticCategory::Message, "Add_missing_typeof_95052", "Add missing 'typeof'"); }; - static shared Remove_unused_label(){ return diag(95053, DiagnosticCategory::Message, "Remove_unused_label_95053", "Remove unused label"); }; - static shared Remove_all_unused_labels(){ return diag(95054, DiagnosticCategory::Message, "Remove_all_unused_labels_95054", "Remove all unused labels"); }; - static shared Convert_0_to_mapped_object_type(){ return diag(95055, DiagnosticCategory::Message, "Convert_0_to_mapped_object_type_95055", "Convert '{0}' to mapped object type"); }; - static shared Convert_namespace_import_to_named_imports(){ return diag(95056, DiagnosticCategory::Message, "Convert_namespace_import_to_named_imports_95056", "Convert namespace import to named imports"); }; - static shared Convert_named_imports_to_namespace_import(){ return diag(95057, DiagnosticCategory::Message, "Convert_named_imports_to_namespace_import_95057", "Convert named imports to namespace import"); }; - static shared Add_or_remove_braces_in_an_arrow_function(){ return diag(95058, DiagnosticCategory::Message, "Add_or_remove_braces_in_an_arrow_function_95058", "Add or remove braces in an arrow function"); }; - static shared Add_braces_to_arrow_function(){ return diag(95059, DiagnosticCategory::Message, "Add_braces_to_arrow_function_95059", "Add braces to arrow function"); }; - static shared Remove_braces_from_arrow_function(){ return diag(95060, DiagnosticCategory::Message, "Remove_braces_from_arrow_function_95060", "Remove braces from arrow function"); }; - static shared Convert_default_export_to_named_export(){ return diag(95061, DiagnosticCategory::Message, "Convert_default_export_to_named_export_95061", "Convert default export to named export"); }; - static shared Convert_named_export_to_default_export(){ return diag(95062, DiagnosticCategory::Message, "Convert_named_export_to_default_export_95062", "Convert named export to default export"); }; - static shared Add_missing_enum_member_0(){ return diag(95063, DiagnosticCategory::Message, "Add_missing_enum_member_0_95063", "Add missing enum member '{0}'"); }; - static shared Add_all_missing_imports(){ return diag(95064, DiagnosticCategory::Message, "Add_all_missing_imports_95064", "Add all missing imports"); }; - static shared Convert_to_async_function(){ return diag(95065, DiagnosticCategory::Message, "Convert_to_async_function_95065", "Convert to async function"); }; - static shared Convert_all_to_async_functions(){ return diag(95066, DiagnosticCategory::Message, "Convert_all_to_async_functions_95066", "Convert all to async functions"); }; - static shared Add_missing_call_parentheses(){ return diag(95067, DiagnosticCategory::Message, "Add_missing_call_parentheses_95067", "Add missing call parentheses"); }; - static shared Add_all_missing_call_parentheses(){ return diag(95068, DiagnosticCategory::Message, "Add_all_missing_call_parentheses_95068", "Add all missing call parentheses"); }; - static shared Add_unknown_conversion_for_non_overlapping_types(){ return diag(95069, DiagnosticCategory::Message, "Add_unknown_conversion_for_non_overlapping_types_95069", "Add 'unknown' conversion for non-overlapping types"); }; - static shared Add_unknown_to_all_conversions_of_non_overlapping_types(){ return diag(95070, DiagnosticCategory::Message, "Add_unknown_to_all_conversions_of_non_overlapping_types_95070", "Add 'unknown' to all conversions of non-overlapping types"); }; - static shared Add_missing_new_operator_to_call(){ return diag(95071, DiagnosticCategory::Message, "Add_missing_new_operator_to_call_95071", "Add missing 'new' operator to call"); }; - static shared Add_missing_new_operator_to_all_calls(){ return diag(95072, DiagnosticCategory::Message, "Add_missing_new_operator_to_all_calls_95072", "Add missing 'new' operator to all calls"); }; - static shared Add_names_to_all_parameters_without_names(){ return diag(95073, DiagnosticCategory::Message, "Add_names_to_all_parameters_without_names_95073", "Add names to all parameters without names"); }; - static shared Enable_the_experimentalDecorators_option_in_your_configuration_file(){ return diag(95074, DiagnosticCategory::Message, "Enable_the_experimentalDecorators_option_in_your_configuration_file_95074", "Enable the 'experimentalDecorators' option in your configuration file"); }; - static shared Convert_parameters_to_destructured_object(){ return diag(95075, DiagnosticCategory::Message, "Convert_parameters_to_destructured_object_95075", "Convert parameters to destructured object"); }; - static shared Extract_type(){ return diag(95077, DiagnosticCategory::Message, "Extract_type_95077", "Extract type"); }; - static shared Extract_to_type_alias(){ return diag(95078, DiagnosticCategory::Message, "Extract_to_type_alias_95078", "Extract to type alias"); }; - static shared Extract_to_typedef(){ return diag(95079, DiagnosticCategory::Message, "Extract_to_typedef_95079", "Extract to typedef"); }; - static shared Infer_this_type_of_0_from_usage(){ return diag(95080, DiagnosticCategory::Message, "Infer_this_type_of_0_from_usage_95080", "Infer 'this' type of '{0}' from usage"); }; - static shared Add_const_to_unresolved_variable(){ return diag(95081, DiagnosticCategory::Message, "Add_const_to_unresolved_variable_95081", "Add 'const' to unresolved variable"); }; - static shared Add_const_to_all_unresolved_variables(){ return diag(95082, DiagnosticCategory::Message, "Add_const_to_all_unresolved_variables_95082", "Add 'const' to all unresolved variables"); }; - static shared Add_await(){ return diag(95083, DiagnosticCategory::Message, "Add_await_95083", "Add 'await'"); }; - static shared Add_await_to_initializer_for_0(){ return diag(95084, DiagnosticCategory::Message, "Add_await_to_initializer_for_0_95084", "Add 'await' to initializer for '{0}'"); }; - static shared Fix_all_expressions_possibly_missing_await(){ return diag(95085, DiagnosticCategory::Message, "Fix_all_expressions_possibly_missing_await_95085", "Fix all expressions possibly missing 'await'"); }; - static shared Remove_unnecessary_await(){ return diag(95086, DiagnosticCategory::Message, "Remove_unnecessary_await_95086", "Remove unnecessary 'await'"); }; - static shared Remove_all_unnecessary_uses_of_await(){ return diag(95087, DiagnosticCategory::Message, "Remove_all_unnecessary_uses_of_await_95087", "Remove all unnecessary uses of 'await'"); }; - static shared Enable_the_jsx_flag_in_your_configuration_file(){ return diag(95088, DiagnosticCategory::Message, "Enable_the_jsx_flag_in_your_configuration_file_95088", "Enable the '--jsx' flag in your configuration file"); }; - static shared Add_await_to_initializers(){ return diag(95089, DiagnosticCategory::Message, "Add_await_to_initializers_95089", "Add 'await' to initializers"); }; - static shared Extract_to_interface(){ return diag(95090, DiagnosticCategory::Message, "Extract_to_interface_95090", "Extract to interface"); }; - static shared Convert_to_a_bigint_numeric_literal(){ return diag(95091, DiagnosticCategory::Message, "Convert_to_a_bigint_numeric_literal_95091", "Convert to a bigint numeric literal"); }; - static shared Convert_all_to_bigint_numeric_literals(){ return diag(95092, DiagnosticCategory::Message, "Convert_all_to_bigint_numeric_literals_95092", "Convert all to bigint numeric literals"); }; - static shared Convert_const_to_let(){ return diag(95093, DiagnosticCategory::Message, "Convert_const_to_let_95093", "Convert 'const' to 'let'"); }; - static shared Prefix_with_declare(){ return diag(95094, DiagnosticCategory::Message, "Prefix_with_declare_95094", "Prefix with 'declare'"); }; - static shared Prefix_all_incorrect_property_declarations_with_declare(){ return diag(95095, DiagnosticCategory::Message, "Prefix_all_incorrect_property_declarations_with_declare_95095", "Prefix all incorrect property declarations with 'declare'"); }; - static shared Convert_to_template_string(){ return diag(95096, DiagnosticCategory::Message, "Convert_to_template_string_95096", "Convert to template string"); }; - static shared Add_export_to_make_this_file_into_a_module(){ return diag(95097, DiagnosticCategory::Message, "Add_export_to_make_this_file_into_a_module_95097", "Add 'export {}' to make this file into a module"); }; - static shared Set_the_target_option_in_your_configuration_file_to_0(){ return diag(95098, DiagnosticCategory::Message, "Set_the_target_option_in_your_configuration_file_to_0_95098", "Set the 'target' option in your configuration file to '{0}'"); }; - static shared Set_the_module_option_in_your_configuration_file_to_0(){ return diag(95099, DiagnosticCategory::Message, "Set_the_module_option_in_your_configuration_file_to_0_95099", "Set the 'module' option in your configuration file to '{0}'"); }; - static shared Convert_invalid_character_to_its_html_entity_code(){ return diag(95100, DiagnosticCategory::Message, "Convert_invalid_character_to_its_html_entity_code_95100", "Convert invalid character to its html entity code"); }; - static shared Convert_all_invalid_characters_to_HTML_entity_code(){ return diag(95101, DiagnosticCategory::Message, "Convert_all_invalid_characters_to_HTML_entity_code_95101", "Convert all invalid characters to HTML entity code"); }; - static shared Convert_function_expression_0_to_arrow_function(){ return diag(95105, DiagnosticCategory::Message, "Convert_function_expression_0_to_arrow_function_95105", "Convert function expression '{0}' to arrow function"); }; - static shared Convert_function_declaration_0_to_arrow_function(){ return diag(95106, DiagnosticCategory::Message, "Convert_function_declaration_0_to_arrow_function_95106", "Convert function declaration '{0}' to arrow function"); }; - static shared Fix_all_implicit_this_errors(){ return diag(95107, DiagnosticCategory::Message, "Fix_all_implicit_this_errors_95107", "Fix all implicit-'this' errors"); }; - static shared Wrap_invalid_character_in_an_expression_container(){ return diag(95108, DiagnosticCategory::Message, "Wrap_invalid_character_in_an_expression_container_95108", "Wrap invalid character in an expression container"); }; - static shared Wrap_all_invalid_characters_in_an_expression_container(){ return diag(95109, DiagnosticCategory::Message, "Wrap_all_invalid_characters_in_an_expression_container_95109", "Wrap all invalid characters in an expression container"); }; - static shared Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_json_to_read_more_about_this_file(){ return diag(95110, DiagnosticCategory::Message, "Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_json_to_read_more_about_this_file_95110", "Visit https://aka.ms/tsconfig.json to read more about this file"); }; - static shared Add_a_return_statement(){ return diag(95111, DiagnosticCategory::Message, "Add_a_return_statement_95111", "Add a return statement"); }; - static shared Remove_braces_from_arrow_function_body(){ return diag(95112, DiagnosticCategory::Message, "Remove_braces_from_arrow_function_body_95112", "Remove braces from arrow function body"); }; - static shared Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal(){ return diag(95113, DiagnosticCategory::Message, "Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113", "Wrap the following body with parentheses which should be an object literal"); }; - static shared Add_all_missing_return_statement(){ return diag(95114, DiagnosticCategory::Message, "Add_all_missing_return_statement_95114", "Add all missing return statement"); }; - static shared Remove_braces_from_all_arrow_function_bodies_with_relevant_issues(){ return diag(95115, DiagnosticCategory::Message, "Remove_braces_from_all_arrow_function_bodies_with_relevant_issues_95115", "Remove braces from all arrow function bodies with relevant issues"); }; - static shared Wrap_all_object_literal_with_parentheses(){ return diag(95116, DiagnosticCategory::Message, "Wrap_all_object_literal_with_parentheses_95116", "Wrap all object literal with parentheses"); }; - static shared Move_labeled_tuple_element_modifiers_to_labels(){ return diag(95117, DiagnosticCategory::Message, "Move_labeled_tuple_element_modifiers_to_labels_95117", "Move labeled tuple element modifiers to labels"); }; - static shared Convert_overload_list_to_single_signature(){ return diag(95118, DiagnosticCategory::Message, "Convert_overload_list_to_single_signature_95118", "Convert overload list to single signature"); }; - static shared Generate_get_and_set_accessors_for_all_overriding_properties(){ return diag(95119, DiagnosticCategory::Message, "Generate_get_and_set_accessors_for_all_overriding_properties_95119", "Generate 'get' and 'set' accessors for all overriding properties"); }; - static shared Wrap_in_JSX_fragment(){ return diag(95120, DiagnosticCategory::Message, "Wrap_in_JSX_fragment_95120", "Wrap in JSX fragment"); }; - static shared Wrap_all_unparented_JSX_in_JSX_fragment(){ return diag(95121, DiagnosticCategory::Message, "Wrap_all_unparented_JSX_in_JSX_fragment_95121", "Wrap all unparented JSX in JSX fragment"); }; - static shared Convert_arrow_function_or_function_expression(){ return diag(95122, DiagnosticCategory::Message, "Convert_arrow_function_or_function_expression_95122", "Convert arrow function or function expression"); }; - static shared Convert_to_anonymous_function(){ return diag(95123, DiagnosticCategory::Message, "Convert_to_anonymous_function_95123", "Convert to anonymous function"); }; - static shared Convert_to_named_function(){ return diag(95124, DiagnosticCategory::Message, "Convert_to_named_function_95124", "Convert to named function"); }; - static shared Convert_to_arrow_function(){ return diag(95125, DiagnosticCategory::Message, "Convert_to_arrow_function_95125", "Convert to arrow function"); }; - static shared Remove_parentheses(){ return diag(95126, DiagnosticCategory::Message, "Remove_parentheses_95126", "Remove parentheses"); }; - static shared Could_not_find_a_containing_arrow_function(){ return diag(95127, DiagnosticCategory::Message, "Could_not_find_a_containing_arrow_function_95127", "Could not find a containing arrow function"); }; - static shared Containing_function_is_not_an_arrow_function(){ return diag(95128, DiagnosticCategory::Message, "Containing_function_is_not_an_arrow_function_95128", "Containing function is not an arrow function"); }; - static shared Could_not_find_export_statement(){ return diag(95129, DiagnosticCategory::Message, "Could_not_find_export_statement_95129", "Could not find export statement"); }; - static shared This_file_already_has_a_default_export(){ return diag(95130, DiagnosticCategory::Message, "This_file_already_has_a_default_export_95130", "This file already has a default export"); }; - static shared Could_not_find_import_clause(){ return diag(95131, DiagnosticCategory::Message, "Could_not_find_import_clause_95131", "Could not find import clause"); }; - static shared Could_not_find_namespace_import_or_named_imports(){ return diag(95132, DiagnosticCategory::Message, "Could_not_find_namespace_import_or_named_imports_95132", "Could not find namespace import or named imports"); }; - static shared Selection_is_not_a_valid_type_node(){ return diag(95133, DiagnosticCategory::Message, "Selection_is_not_a_valid_type_node_95133", "Selection is not a valid type node"); }; - static shared No_type_could_be_extracted_from_this_type_node(){ return diag(95134, DiagnosticCategory::Message, "No_type_could_be_extracted_from_this_type_node_95134", "No type could be extracted from this type node"); }; - static shared Could_not_find_property_for_which_to_generate_accessor(){ return diag(95135, DiagnosticCategory::Message, "Could_not_find_property_for_which_to_generate_accessor_95135", "Could not find property for which to generate accessor"); }; - static shared Name_is_not_valid(){ return diag(95136, DiagnosticCategory::Message, "Name_is_not_valid_95136", "Name is not valid"); }; - static shared Can_only_convert_property_with_modifier(){ return diag(95137, DiagnosticCategory::Message, "Can_only_convert_property_with_modifier_95137", "Can only convert property with modifier"); }; - static shared Switch_each_misused_0_to_1(){ return diag(95138, DiagnosticCategory::Message, "Switch_each_misused_0_to_1_95138", "Switch each misused '{0}' to '{1}'"); }; - static shared Convert_to_optional_chain_expression(){ return diag(95139, DiagnosticCategory::Message, "Convert_to_optional_chain_expression_95139", "Convert to optional chain expression"); }; - static shared Could_not_find_convertible_access_expression(){ return diag(95140, DiagnosticCategory::Message, "Could_not_find_convertible_access_expression_95140", "Could not find convertible access expression"); }; - static shared Could_not_find_matching_access_expressions(){ return diag(95141, DiagnosticCategory::Message, "Could_not_find_matching_access_expressions_95141", "Could not find matching access expressions"); }; - static shared Can_only_convert_logical_AND_access_chains(){ return diag(95142, DiagnosticCategory::Message, "Can_only_convert_logical_AND_access_chains_95142", "Can only convert logical AND access chains"); }; - static shared Add_void_to_Promise_resolved_without_a_value(){ return diag(95143, DiagnosticCategory::Message, "Add_void_to_Promise_resolved_without_a_value_95143", "Add 'void' to Promise resolved without a value"); }; - static shared Add_void_to_all_Promises_resolved_without_a_value(){ return diag(95144, DiagnosticCategory::Message, "Add_void_to_all_Promises_resolved_without_a_value_95144", "Add 'void' to all Promises resolved without a value"); }; - static shared Use_element_access_for_0(){ return diag(95145, DiagnosticCategory::Message, "Use_element_access_for_0_95145", "Use element access for '{0}'"); }; - static shared Use_element_access_for_all_undeclared_properties(){ return diag(95146, DiagnosticCategory::Message, "Use_element_access_for_all_undeclared_properties_95146", "Use element access for all undeclared properties."); }; - static shared Delete_all_unused_imports(){ return diag(95147, DiagnosticCategory::Message, "Delete_all_unused_imports_95147", "Delete all unused imports"); }; - static shared Infer_function_return_type(){ return diag(95148, DiagnosticCategory::Message, "Infer_function_return_type_95148", "Infer function return type"); }; - static shared Return_type_must_be_inferred_from_a_function(){ return diag(95149, DiagnosticCategory::Message, "Return_type_must_be_inferred_from_a_function_95149", "Return type must be inferred from a function"); }; - static shared Could_not_determine_function_return_type(){ return diag(95150, DiagnosticCategory::Message, "Could_not_determine_function_return_type_95150", "Could not determine function return type"); }; - static shared Could_not_convert_to_arrow_function(){ return diag(95151, DiagnosticCategory::Message, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"); }; - static shared Could_not_convert_to_named_function(){ return diag(95152, DiagnosticCategory::Message, "Could_not_convert_to_named_function_95152", "Could not convert to named function"); }; - static shared Could_not_convert_to_anonymous_function(){ return diag(95153, DiagnosticCategory::Message, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"); }; - static shared Can_only_convert_string_concatenation(){ return diag(95154, DiagnosticCategory::Message, "Can_only_convert_string_concatenation_95154", "Can only convert string concatenation"); }; - static shared Selection_is_not_a_valid_statement_or_statements(){ return diag(95155, DiagnosticCategory::Message, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"); }; - static shared Add_missing_function_declaration_0(){ return diag(95156, DiagnosticCategory::Message, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"); }; - static shared Add_all_missing_function_declarations(){ return diag(95157, DiagnosticCategory::Message, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"); }; - static shared Method_not_implemented(){ return diag(95158, DiagnosticCategory::Message, "Method_not_implemented_95158", "Method not implemented."); }; - static shared Function_not_implemented(){ return diag(95159, DiagnosticCategory::Message, "Function_not_implemented_95159", "Function not implemented."); }; - static shared Add_override_modifier(){ return diag(95160, DiagnosticCategory::Message, "Add_override_modifier_95160", "Add 'override' modifier"); }; - static shared Remove_override_modifier(){ return diag(95161, DiagnosticCategory::Message, "Remove_override_modifier_95161", "Remove 'override' modifier"); }; - static shared Add_all_missing_override_modifiers(){ return diag(95162, DiagnosticCategory::Message, "Add_all_missing_override_modifiers_95162", "Add all missing 'override' modifiers"); }; - static shared Remove_all_unnecessary_override_modifiers(){ return diag(95163, DiagnosticCategory::Message, "Remove_all_unnecessary_override_modifiers_95163", "Remove all unnecessary 'override' modifiers"); }; - static shared Can_only_convert_named_export(){ return diag(95164, DiagnosticCategory::Message, "Can_only_convert_named_export_95164", "Can only convert named export"); }; - static shared Add_missing_properties(){ return diag(95165, DiagnosticCategory::Message, "Add_missing_properties_95165", "Add missing properties"); }; - static shared Add_all_missing_properties(){ return diag(95166, DiagnosticCategory::Message, "Add_all_missing_properties_95166", "Add all missing properties"); }; - static shared Add_missing_attributes(){ return diag(95167, DiagnosticCategory::Message, "Add_missing_attributes_95167", "Add missing attributes"); }; - static shared Add_all_missing_attributes(){ return diag(95168, DiagnosticCategory::Message, "Add_all_missing_attributes_95168", "Add all missing attributes"); }; - static shared Add_undefined_to_optional_property_type(){ return diag(95169, DiagnosticCategory::Message, "Add_undefined_to_optional_property_type_95169", "Add 'undefined' to optional property type"); }; - static shared No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer(){ return diag(18004, DiagnosticCategory::Error, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."); }; - static shared Classes_may_not_have_a_field_named_constructor(){ return diag(18006, DiagnosticCategory::Error, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."); }; - static shared JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array(){ return diag(18007, DiagnosticCategory::Error, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"); }; - static shared Private_identifiers_cannot_be_used_as_parameters(){ return diag(18009, DiagnosticCategory::Error, "Private_identifiers_cannot_be_used_as_parameters_18009", "Private identifiers cannot be used as parameters."); }; - static shared An_accessibility_modifier_cannot_be_used_with_a_private_identifier(){ return diag(18010, DiagnosticCategory::Error, "An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010", "An accessibility modifier cannot be used with a private identifier."); }; - static shared The_operand_of_a_delete_operator_cannot_be_a_private_identifier(){ return diag(18011, DiagnosticCategory::Error, "The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011", "The operand of a 'delete' operator cannot be a private identifier."); }; - static shared constructor_is_a_reserved_word(){ return diag(18012, DiagnosticCategory::Error, "constructor_is_a_reserved_word_18012", "'#constructor' is a reserved word."); }; - static shared Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier(){ return diag(18013, DiagnosticCategory::Error, "Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013", "Property '{0}' is not accessible outside class '{1}' because it has a private identifier."); }; - static shared The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling(){ return diag(18014, DiagnosticCategory::Error, "The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014", "The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling."); }; - static shared Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2(){ return diag(18015, DiagnosticCategory::Error, "Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015", "Property '{0}' in type '{1}' refers to a different member that cannot be accessed from within type '{2}'."); }; - static shared Private_identifiers_are_not_allowed_outside_class_bodies(){ return diag(18016, DiagnosticCategory::Error, "Private_identifiers_are_not_allowed_outside_class_bodies_18016", "Private identifiers are not allowed outside class bodies."); }; - static shared The_shadowing_declaration_of_0_is_defined_here(){ return diag(18017, DiagnosticCategory::Error, "The_shadowing_declaration_of_0_is_defined_here_18017", "The shadowing declaration of '{0}' is defined here"); }; - static shared The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here(){ return diag(18018, DiagnosticCategory::Error, "The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018", "The declaration of '{0}' that you probably intended to use is defined here"); }; - static shared _0_modifier_cannot_be_used_with_a_private_identifier(){ return diag(18019, DiagnosticCategory::Error, "_0_modifier_cannot_be_used_with_a_private_identifier_18019", "'{0}' modifier cannot be used with a private identifier."); }; - static shared An_enum_member_cannot_be_named_with_a_private_identifier(){ return diag(18024, DiagnosticCategory::Error, "An_enum_member_cannot_be_named_with_a_private_identifier_18024", "An enum member cannot be named with a private identifier."); }; - static shared can_only_be_used_at_the_start_of_a_file(){ return diag(18026, DiagnosticCategory::Error, "can_only_be_used_at_the_start_of_a_file_18026", "'#!' can only be used at the start of a file."); }; - static shared Compiler_reserves_name_0_when_emitting_private_identifier_downlevel(){ return diag(18027, DiagnosticCategory::Error, "Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027", "Compiler reserves name '{0}' when emitting private identifier downlevel."); }; - static shared Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher(){ return diag(18028, DiagnosticCategory::Error, "Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028", "Private identifiers are only available when targeting ECMAScript 2015 and higher."); }; - static shared Private_identifiers_are_not_allowed_in_variable_declarations(){ return diag(18029, DiagnosticCategory::Error, "Private_identifiers_are_not_allowed_in_variable_declarations_18029", "Private identifiers are not allowed in variable declarations."); }; - static shared An_optional_chain_cannot_contain_private_identifiers(){ return diag(18030, DiagnosticCategory::Error, "An_optional_chain_cannot_contain_private_identifiers_18030", "An optional chain cannot contain private identifiers."); }; - static shared The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents(){ return diag(18031, DiagnosticCategory::Error, "The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031", "The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents."); }; - static shared The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some(){ return diag(18032, DiagnosticCategory::Error, "The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032", "The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some."); }; - static shared Only_numeric_enums_can_have_computed_members_but_this_expression_has_type_0_If_you_do_not_need_exhaustiveness_checks_consider_using_an_object_literal_instead(){ return diag(18033, DiagnosticCategory::Error, "Only_numeric_enums_can_have_computed_members_but_this_expression_has_type_0_If_you_do_not_need_exhau_18033", + static shared_ptr A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses(){ return diag(17007, DiagnosticCategory::Error, "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007", "A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."); }; + static shared_ptr JSX_element_0_has_no_corresponding_closing_tag(){ return diag(17008, DiagnosticCategory::Error, "JSX_element_0_has_no_corresponding_closing_tag_17008", "JSX element '{0}' has no corresponding closing tag."); }; + static shared_ptr super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class(){ return diag(17009, DiagnosticCategory::Error, "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009", "'super' must be called before accessing 'this' in the constructor of a derived class."); }; + static shared_ptr Unknown_type_acquisition_option_0(){ return diag(17010, DiagnosticCategory::Error, "Unknown_type_acquisition_option_0_17010", "Unknown type acquisition option '{0}'."); }; + static shared_ptr super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class(){ return diag(17011, DiagnosticCategory::Error, "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011", "'super' must be called before accessing a property of 'super' in the constructor of a derived class."); }; + static shared_ptr _0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2(){ return diag(17012, DiagnosticCategory::Error, "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012", "'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?"); }; + static shared_ptr Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor(){ return diag(17013, DiagnosticCategory::Error, "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013", "Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor."); }; + static shared_ptr JSX_fragment_has_no_corresponding_closing_tag(){ return diag(17014, DiagnosticCategory::Error, "JSX_fragment_has_no_corresponding_closing_tag_17014", "JSX fragment has no corresponding closing tag."); }; + static shared_ptr Expected_corresponding_closing_tag_for_JSX_fragment(){ return diag(17015, DiagnosticCategory::Error, "Expected_corresponding_closing_tag_for_JSX_fragment_17015", "Expected corresponding closing tag for JSX fragment."); }; + static shared_ptr The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option(){ return diag(17016, DiagnosticCategory::Error, "The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_com_17016", "The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option."); }; + static shared_ptr An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments(){ return diag(17017, DiagnosticCategory::Error, "An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments_17017", "An @jsxFrag pragma is required when using an @jsx pragma with JSX fragments."); }; + static shared_ptr Unknown_type_acquisition_option_0_Did_you_mean_1(){ return diag(17018, DiagnosticCategory::Error, "Unknown_type_acquisition_option_0_Did_you_mean_1_17018", "Unknown type acquisition option '{0}'. Did you mean '{1}'?"); }; + static shared_ptr Circularity_detected_while_resolving_configuration_Colon_0(){ return diag(18000, DiagnosticCategory::Error, "Circularity_detected_while_resolving_configuration_Colon_0_18000", "Circularity detected while resolving configuration: {0}"); }; + static shared_ptr The_files_list_in_config_file_0_is_empty(){ return diag(18002, DiagnosticCategory::Error, "The_files_list_in_config_file_0_is_empty_18002", "The 'files' list in config file '{0}' is empty."); }; + static shared_ptr No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2(){ return diag(18003, DiagnosticCategory::Error, "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003", "No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'."); }; + static shared_ptr File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module(){ return diag(80001, DiagnosticCategory::Suggestion, "File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module_80001", "File is a CommonJS module; it may be converted to an ES module."); }; + static shared_ptr This_constructor_function_may_be_converted_to_a_class_declaration(){ return diag(80002, DiagnosticCategory::Suggestion, "This_constructor_function_may_be_converted_to_a_class_declaration_80002", "This constructor function may be converted to a class declaration."); }; + static shared_ptr Import_may_be_converted_to_a_default_import(){ return diag(80003, DiagnosticCategory::Suggestion, "Import_may_be_converted_to_a_default_import_80003", "Import may be converted to a default import."); }; + static shared_ptr JSDoc_types_may_be_moved_to_TypeScript_types(){ return diag(80004, DiagnosticCategory::Suggestion, "JSDoc_types_may_be_moved_to_TypeScript_types_80004", "JSDoc types may be moved to TypeScript types."); }; + static shared_ptr require_call_may_be_converted_to_an_import(){ return diag(80005, DiagnosticCategory::Suggestion, "require_call_may_be_converted_to_an_import_80005", "'require' call may be converted to an import."); }; + static shared_ptr This_may_be_converted_to_an_async_function(){ return diag(80006, DiagnosticCategory::Suggestion, "This_may_be_converted_to_an_async_function_80006", "This may be converted to an async function."); }; + static shared_ptr await_has_no_effect_on_the_type_of_this_expression(){ return diag(80007, DiagnosticCategory::Suggestion, "await_has_no_effect_on_the_type_of_this_expression_80007", "'await' has no effect on the type of this expression."); }; + static shared_ptr Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers(){ return diag(80008, DiagnosticCategory::Suggestion, "Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008", "Numeric literals with absolute values equal to 2^53 or greater are too large to be represented accurately as integers."); }; + static shared_ptr Add_missing_super_call(){ return diag(90001, DiagnosticCategory::Message, "Add_missing_super_call_90001", "Add missing 'super()' call"); }; + static shared_ptr Make_super_call_the_first_statement_in_the_constructor(){ return diag(90002, DiagnosticCategory::Message, "Make_super_call_the_first_statement_in_the_constructor_90002", "Make 'super()' call the first statement in the constructor"); }; + static shared_ptr Change_extends_to_implements(){ return diag(90003, DiagnosticCategory::Message, "Change_extends_to_implements_90003", "Change 'extends' to 'implements'"); }; + static shared_ptr Remove_unused_declaration_for_Colon_0(){ return diag(90004, DiagnosticCategory::Message, "Remove_unused_declaration_for_Colon_0_90004", "Remove unused declaration for: '{0}'"); }; + static shared_ptr Remove_import_from_0(){ return diag(90005, DiagnosticCategory::Message, "Remove_import_from_0_90005", "Remove import from '{0}'"); }; + static shared_ptr Implement_interface_0(){ return diag(90006, DiagnosticCategory::Message, "Implement_interface_0_90006", "Implement interface '{0}'"); }; + static shared_ptr Implement_inherited_abstract_class(){ return diag(90007, DiagnosticCategory::Message, "Implement_inherited_abstract_class_90007", "Implement inherited abstract class"); }; + static shared_ptr Add_0_to_unresolved_variable(){ return diag(90008, DiagnosticCategory::Message, "Add_0_to_unresolved_variable_90008", "Add '{0}.' to unresolved variable"); }; + static shared_ptr Remove_variable_statement(){ return diag(90010, DiagnosticCategory::Message, "Remove_variable_statement_90010", "Remove variable statement"); }; + static shared_ptr Remove_template_tag(){ return diag(90011, DiagnosticCategory::Message, "Remove_template_tag_90011", "Remove template tag"); }; + static shared_ptr Remove_type_parameters(){ return diag(90012, DiagnosticCategory::Message, "Remove_type_parameters_90012", "Remove type parameters"); }; + static shared_ptr Import_0_from_module_1(){ return diag(90013, DiagnosticCategory::Message, "Import_0_from_module_1_90013", "Import '{0}' from module \"{1}\""); }; + static shared_ptr Change_0_to_1(){ return diag(90014, DiagnosticCategory::Message, "Change_0_to_1_90014", "Change '{0}' to '{1}'"); }; + static shared_ptr Add_0_to_existing_import_declaration_from_1(){ return diag(90015, DiagnosticCategory::Message, "Add_0_to_existing_import_declaration_from_1_90015", "Add '{0}' to existing import declaration from \"{1}\""); }; + static shared_ptr Declare_property_0(){ return diag(90016, DiagnosticCategory::Message, "Declare_property_0_90016", "Declare property '{0}'"); }; + static shared_ptr Add_index_signature_for_property_0(){ return diag(90017, DiagnosticCategory::Message, "Add_index_signature_for_property_0_90017", "Add index signature for property '{0}'"); }; + static shared_ptr Disable_checking_for_this_file(){ return diag(90018, DiagnosticCategory::Message, "Disable_checking_for_this_file_90018", "Disable checking for this file"); }; + static shared_ptr Ignore_this_error_message(){ return diag(90019, DiagnosticCategory::Message, "Ignore_this_error_message_90019", "Ignore this error message"); }; + static shared_ptr Initialize_property_0_in_the_constructor(){ return diag(90020, DiagnosticCategory::Message, "Initialize_property_0_in_the_constructor_90020", "Initialize property '{0}' in the constructor"); }; + static shared_ptr Initialize_static_property_0(){ return diag(90021, DiagnosticCategory::Message, "Initialize_static_property_0_90021", "Initialize static property '{0}'"); }; + static shared_ptr Change_spelling_to_0(){ return diag(90022, DiagnosticCategory::Message, "Change_spelling_to_0_90022", "Change spelling to '{0}'"); }; + static shared_ptr Declare_method_0(){ return diag(90023, DiagnosticCategory::Message, "Declare_method_0_90023", "Declare method '{0}'"); }; + static shared_ptr Declare_static_method_0(){ return diag(90024, DiagnosticCategory::Message, "Declare_static_method_0_90024", "Declare static method '{0}'"); }; + static shared_ptr Prefix_0_with_an_underscore(){ return diag(90025, DiagnosticCategory::Message, "Prefix_0_with_an_underscore_90025", "Prefix '{0}' with an underscore"); }; + static shared_ptr Rewrite_as_the_indexed_access_type_0(){ return diag(90026, DiagnosticCategory::Message, "Rewrite_as_the_indexed_access_type_0_90026", "Rewrite as the indexed access type '{0}'"); }; + static shared_ptr Declare_static_property_0(){ return diag(90027, DiagnosticCategory::Message, "Declare_static_property_0_90027", "Declare static property '{0}'"); }; + static shared_ptr Call_decorator_expression(){ return diag(90028, DiagnosticCategory::Message, "Call_decorator_expression_90028", "Call decorator expression"); }; + static shared_ptr Add_async_modifier_to_containing_function(){ return diag(90029, DiagnosticCategory::Message, "Add_async_modifier_to_containing_function_90029", "Add async modifier to containing function"); }; + static shared_ptr Replace_infer_0_with_unknown(){ return diag(90030, DiagnosticCategory::Message, "Replace_infer_0_with_unknown_90030", "Replace 'infer {0}' with 'unknown'"); }; + static shared_ptr Replace_all_unused_infer_with_unknown(){ return diag(90031, DiagnosticCategory::Message, "Replace_all_unused_infer_with_unknown_90031", "Replace all unused 'infer' with 'unknown'"); }; + static shared_ptr Import_default_0_from_module_1(){ return diag(90032, DiagnosticCategory::Message, "Import_default_0_from_module_1_90032", "Import default '{0}' from module \"{1}\""); }; + static shared_ptr Add_default_import_0_to_existing_import_declaration_from_1(){ return diag(90033, DiagnosticCategory::Message, "Add_default_import_0_to_existing_import_declaration_from_1_90033", "Add default import '{0}' to existing import declaration from \"{1}\""); }; + static shared_ptr Add_parameter_name(){ return diag(90034, DiagnosticCategory::Message, "Add_parameter_name_90034", "Add parameter name"); }; + static shared_ptr Declare_private_property_0(){ return diag(90035, DiagnosticCategory::Message, "Declare_private_property_0_90035", "Declare private property '{0}'"); }; + static shared_ptr Replace_0_with_Promise_1(){ return diag(90036, DiagnosticCategory::Message, "Replace_0_with_Promise_1_90036", "Replace '{0}' with 'Promise<{1}>'"); }; + static shared_ptr Fix_all_incorrect_return_type_of_an_async_functions(){ return diag(90037, DiagnosticCategory::Message, "Fix_all_incorrect_return_type_of_an_async_functions_90037", "Fix all incorrect return type of an async functions"); }; + static shared_ptr Declare_private_method_0(){ return diag(90038, DiagnosticCategory::Message, "Declare_private_method_0_90038", "Declare private method '{0}'"); }; + static shared_ptr Remove_unused_destructuring_declaration(){ return diag(90039, DiagnosticCategory::Message, "Remove_unused_destructuring_declaration_90039", "Remove unused destructuring declaration"); }; + static shared_ptr Remove_unused_declarations_for_Colon_0(){ return diag(90041, DiagnosticCategory::Message, "Remove_unused_declarations_for_Colon_0_90041", "Remove unused declarations for: '{0}'"); }; + static shared_ptr Declare_a_private_field_named_0(){ return diag(90053, DiagnosticCategory::Message, "Declare_a_private_field_named_0_90053", "Declare a private field named '{0}'."); }; + static shared_ptr Includes_imports_of_types_referenced_by_0(){ return diag(90054, DiagnosticCategory::Message, "Includes_imports_of_types_referenced_by_0_90054", "Includes imports of types referenced by '{0}'"); }; + static shared_ptr Convert_function_to_an_ES2015_class(){ return diag(95001, DiagnosticCategory::Message, "Convert_function_to_an_ES2015_class_95001", "Convert function to an ES2015 class"); }; + static shared_ptr Convert_0_to_1_in_0(){ return diag(95003, DiagnosticCategory::Message, "Convert_0_to_1_in_0_95003", "Convert '{0}' to '{1} in {0}'"); }; + static shared_ptr Extract_to_0_in_1(){ return diag(95004, DiagnosticCategory::Message, "Extract_to_0_in_1_95004", "Extract to {0} in {1}"); }; + static shared_ptr Extract_function(){ return diag(95005, DiagnosticCategory::Message, "Extract_function_95005", "Extract function"); }; + static shared_ptr Extract_constant(){ return diag(95006, DiagnosticCategory::Message, "Extract_constant_95006", "Extract constant"); }; + static shared_ptr Extract_to_0_in_enclosing_scope(){ return diag(95007, DiagnosticCategory::Message, "Extract_to_0_in_enclosing_scope_95007", "Extract to {0} in enclosing scope"); }; + static shared_ptr Extract_to_0_in_1_scope(){ return diag(95008, DiagnosticCategory::Message, "Extract_to_0_in_1_scope_95008", "Extract to {0} in {1} scope"); }; + static shared_ptr Annotate_with_type_from_JSDoc(){ return diag(95009, DiagnosticCategory::Message, "Annotate_with_type_from_JSDoc_95009", "Annotate with type from JSDoc"); }; + static shared_ptr Infer_type_of_0_from_usage(){ return diag(95011, DiagnosticCategory::Message, "Infer_type_of_0_from_usage_95011", "Infer type of '{0}' from usage"); }; + static shared_ptr Infer_parameter_types_from_usage(){ return diag(95012, DiagnosticCategory::Message, "Infer_parameter_types_from_usage_95012", "Infer parameter types from usage"); }; + static shared_ptr Convert_to_default_import(){ return diag(95013, DiagnosticCategory::Message, "Convert_to_default_import_95013", "Convert to default import"); }; + static shared_ptr Install_0(){ return diag(95014, DiagnosticCategory::Message, "Install_0_95014", "Install '{0}'"); }; + static shared_ptr Replace_import_with_0(){ return diag(95015, DiagnosticCategory::Message, "Replace_import_with_0_95015", "Replace import with '{0}'."); }; + static shared_ptr Use_synthetic_default_member(){ return diag(95016, DiagnosticCategory::Message, "Use_synthetic_default_member_95016", "Use synthetic 'default' member."); }; + static shared_ptr Convert_to_ES_module(){ return diag(95017, DiagnosticCategory::Message, "Convert_to_ES_module_95017", "Convert to ES module"); }; + static shared_ptr Add_undefined_type_to_property_0(){ return diag(95018, DiagnosticCategory::Message, "Add_undefined_type_to_property_0_95018", "Add 'undefined' type to property '{0}'"); }; + static shared_ptr Add_initializer_to_property_0(){ return diag(95019, DiagnosticCategory::Message, "Add_initializer_to_property_0_95019", "Add initializer to property '{0}'"); }; + static shared_ptr Add_definite_assignment_assertion_to_property_0(){ return diag(95020, DiagnosticCategory::Message, "Add_definite_assignment_assertion_to_property_0_95020", "Add definite assignment assertion to property '{0}'"); }; + static shared_ptr Convert_all_type_literals_to_mapped_type(){ return diag(95021, DiagnosticCategory::Message, "Convert_all_type_literals_to_mapped_type_95021", "Convert all type literals to mapped type"); }; + static shared_ptr Add_all_missing_members(){ return diag(95022, DiagnosticCategory::Message, "Add_all_missing_members_95022", "Add all missing members"); }; + static shared_ptr Infer_all_types_from_usage(){ return diag(95023, DiagnosticCategory::Message, "Infer_all_types_from_usage_95023", "Infer all types from usage"); }; + static shared_ptr Delete_all_unused_declarations(){ return diag(95024, DiagnosticCategory::Message, "Delete_all_unused_declarations_95024", "Delete all unused declarations"); }; + static shared_ptr Prefix_all_unused_declarations_with_where_possible(){ return diag(95025, DiagnosticCategory::Message, "Prefix_all_unused_declarations_with_where_possible_95025", "Prefix all unused declarations with '_' where possible"); }; + static shared_ptr Fix_all_detected_spelling_errors(){ return diag(95026, DiagnosticCategory::Message, "Fix_all_detected_spelling_errors_95026", "Fix all detected spelling errors"); }; + static shared_ptr Add_initializers_to_all_uninitialized_properties(){ return diag(95027, DiagnosticCategory::Message, "Add_initializers_to_all_uninitialized_properties_95027", "Add initializers to all uninitialized properties"); }; + static shared_ptr Add_definite_assignment_assertions_to_all_uninitialized_properties(){ return diag(95028, DiagnosticCategory::Message, "Add_definite_assignment_assertions_to_all_uninitialized_properties_95028", "Add definite assignment assertions to all uninitialized properties"); }; + static shared_ptr Add_undefined_type_to_all_uninitialized_properties(){ return diag(95029, DiagnosticCategory::Message, "Add_undefined_type_to_all_uninitialized_properties_95029", "Add undefined type to all uninitialized properties"); }; + static shared_ptr Change_all_jsdoc_style_types_to_TypeScript(){ return diag(95030, DiagnosticCategory::Message, "Change_all_jsdoc_style_types_to_TypeScript_95030", "Change all jsdoc-style types to TypeScript"); }; + static shared_ptr Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types(){ return diag(95031, DiagnosticCategory::Message, "Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types_95031", "Change all jsdoc-style types to TypeScript (and add '| undefined' to nullable types)"); }; + static shared_ptr Implement_all_unimplemented_interfaces(){ return diag(95032, DiagnosticCategory::Message, "Implement_all_unimplemented_interfaces_95032", "Implement all unimplemented interfaces"); }; + static shared_ptr Install_all_missing_types_packages(){ return diag(95033, DiagnosticCategory::Message, "Install_all_missing_types_packages_95033", "Install all missing types packages"); }; + static shared_ptr Rewrite_all_as_indexed_access_types(){ return diag(95034, DiagnosticCategory::Message, "Rewrite_all_as_indexed_access_types_95034", "Rewrite all as indexed access types"); }; + static shared_ptr Convert_all_to_default_imports(){ return diag(95035, DiagnosticCategory::Message, "Convert_all_to_default_imports_95035", "Convert all to default imports"); }; + static shared_ptr Make_all_super_calls_the_first_statement_in_their_constructor(){ return diag(95036, DiagnosticCategory::Message, "Make_all_super_calls_the_first_statement_in_their_constructor_95036", "Make all 'super()' calls the first statement in their constructor"); }; + static shared_ptr Add_qualifier_to_all_unresolved_variables_matching_a_member_name(){ return diag(95037, DiagnosticCategory::Message, "Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037", "Add qualifier to all unresolved variables matching a member name"); }; + static shared_ptr Change_all_extended_interfaces_to_implements(){ return diag(95038, DiagnosticCategory::Message, "Change_all_extended_interfaces_to_implements_95038", "Change all extended interfaces to 'implements'"); }; + static shared_ptr Add_all_missing_super_calls(){ return diag(95039, DiagnosticCategory::Message, "Add_all_missing_super_calls_95039", "Add all missing super calls"); }; + static shared_ptr Implement_all_inherited_abstract_classes(){ return diag(95040, DiagnosticCategory::Message, "Implement_all_inherited_abstract_classes_95040", "Implement all inherited abstract classes"); }; + static shared_ptr Add_all_missing_async_modifiers(){ return diag(95041, DiagnosticCategory::Message, "Add_all_missing_async_modifiers_95041", "Add all missing 'async' modifiers"); }; + static shared_ptr Add_ts_ignore_to_all_error_messages(){ return diag(95042, DiagnosticCategory::Message, "Add_ts_ignore_to_all_error_messages_95042", "Add '@ts-ignore' to all error messages"); }; + static shared_ptr Annotate_everything_with_types_from_JSDoc(){ return diag(95043, DiagnosticCategory::Message, "Annotate_everything_with_types_from_JSDoc_95043", "Annotate everything with types from JSDoc"); }; + static shared_ptr Add_to_all_uncalled_decorators(){ return diag(95044, DiagnosticCategory::Message, "Add_to_all_uncalled_decorators_95044", "Add '()' to all uncalled decorators"); }; + static shared_ptr Convert_all_constructor_functions_to_classes(){ return diag(95045, DiagnosticCategory::Message, "Convert_all_constructor_functions_to_classes_95045", "Convert all constructor functions to classes"); }; + static shared_ptr Generate_get_and_set_accessors(){ return diag(95046, DiagnosticCategory::Message, "Generate_get_and_set_accessors_95046", "Generate 'get' and 'set' accessors"); }; + static shared_ptr Convert_require_to_import(){ return diag(95047, DiagnosticCategory::Message, "Convert_require_to_import_95047", "Convert 'require' to 'import'"); }; + static shared_ptr Convert_all_require_to_import(){ return diag(95048, DiagnosticCategory::Message, "Convert_all_require_to_import_95048", "Convert all 'require' to 'import'"); }; + static shared_ptr Move_to_a_new_file(){ return diag(95049, DiagnosticCategory::Message, "Move_to_a_new_file_95049", "Move to a new file"); }; + static shared_ptr Remove_unreachable_code(){ return diag(95050, DiagnosticCategory::Message, "Remove_unreachable_code_95050", "Remove unreachable code"); }; + static shared_ptr Remove_all_unreachable_code(){ return diag(95051, DiagnosticCategory::Message, "Remove_all_unreachable_code_95051", "Remove all unreachable code"); }; + static shared_ptr Add_missing_typeof(){ return diag(95052, DiagnosticCategory::Message, "Add_missing_typeof_95052", "Add missing 'typeof'"); }; + static shared_ptr Remove_unused_label(){ return diag(95053, DiagnosticCategory::Message, "Remove_unused_label_95053", "Remove unused label"); }; + static shared_ptr Remove_all_unused_labels(){ return diag(95054, DiagnosticCategory::Message, "Remove_all_unused_labels_95054", "Remove all unused labels"); }; + static shared_ptr Convert_0_to_mapped_object_type(){ return diag(95055, DiagnosticCategory::Message, "Convert_0_to_mapped_object_type_95055", "Convert '{0}' to mapped object type"); }; + static shared_ptr Convert_namespace_import_to_named_imports(){ return diag(95056, DiagnosticCategory::Message, "Convert_namespace_import_to_named_imports_95056", "Convert namespace import to named imports"); }; + static shared_ptr Convert_named_imports_to_namespace_import(){ return diag(95057, DiagnosticCategory::Message, "Convert_named_imports_to_namespace_import_95057", "Convert named imports to namespace import"); }; + static shared_ptr Add_or_remove_braces_in_an_arrow_function(){ return diag(95058, DiagnosticCategory::Message, "Add_or_remove_braces_in_an_arrow_function_95058", "Add or remove braces in an arrow function"); }; + static shared_ptr Add_braces_to_arrow_function(){ return diag(95059, DiagnosticCategory::Message, "Add_braces_to_arrow_function_95059", "Add braces to arrow function"); }; + static shared_ptr Remove_braces_from_arrow_function(){ return diag(95060, DiagnosticCategory::Message, "Remove_braces_from_arrow_function_95060", "Remove braces from arrow function"); }; + static shared_ptr Convert_default_export_to_named_export(){ return diag(95061, DiagnosticCategory::Message, "Convert_default_export_to_named_export_95061", "Convert default export to named export"); }; + static shared_ptr Convert_named_export_to_default_export(){ return diag(95062, DiagnosticCategory::Message, "Convert_named_export_to_default_export_95062", "Convert named export to default export"); }; + static shared_ptr Add_missing_enum_member_0(){ return diag(95063, DiagnosticCategory::Message, "Add_missing_enum_member_0_95063", "Add missing enum member '{0}'"); }; + static shared_ptr Add_all_missing_imports(){ return diag(95064, DiagnosticCategory::Message, "Add_all_missing_imports_95064", "Add all missing imports"); }; + static shared_ptr Convert_to_async_function(){ return diag(95065, DiagnosticCategory::Message, "Convert_to_async_function_95065", "Convert to async function"); }; + static shared_ptr Convert_all_to_async_functions(){ return diag(95066, DiagnosticCategory::Message, "Convert_all_to_async_functions_95066", "Convert all to async functions"); }; + static shared_ptr Add_missing_call_parentheses(){ return diag(95067, DiagnosticCategory::Message, "Add_missing_call_parentheses_95067", "Add missing call parentheses"); }; + static shared_ptr Add_all_missing_call_parentheses(){ return diag(95068, DiagnosticCategory::Message, "Add_all_missing_call_parentheses_95068", "Add all missing call parentheses"); }; + static shared_ptr Add_unknown_conversion_for_non_overlapping_types(){ return diag(95069, DiagnosticCategory::Message, "Add_unknown_conversion_for_non_overlapping_types_95069", "Add 'unknown' conversion for non-overlapping types"); }; + static shared_ptr Add_unknown_to_all_conversions_of_non_overlapping_types(){ return diag(95070, DiagnosticCategory::Message, "Add_unknown_to_all_conversions_of_non_overlapping_types_95070", "Add 'unknown' to all conversions of non-overlapping types"); }; + static shared_ptr Add_missing_new_operator_to_call(){ return diag(95071, DiagnosticCategory::Message, "Add_missing_new_operator_to_call_95071", "Add missing 'new' operator to call"); }; + static shared_ptr Add_missing_new_operator_to_all_calls(){ return diag(95072, DiagnosticCategory::Message, "Add_missing_new_operator_to_all_calls_95072", "Add missing 'new' operator to all calls"); }; + static shared_ptr Add_names_to_all_parameters_without_names(){ return diag(95073, DiagnosticCategory::Message, "Add_names_to_all_parameters_without_names_95073", "Add names to all parameters without names"); }; + static shared_ptr Enable_the_experimentalDecorators_option_in_your_configuration_file(){ return diag(95074, DiagnosticCategory::Message, "Enable_the_experimentalDecorators_option_in_your_configuration_file_95074", "Enable the 'experimentalDecorators' option in your configuration file"); }; + static shared_ptr Convert_parameters_to_destructured_object(){ return diag(95075, DiagnosticCategory::Message, "Convert_parameters_to_destructured_object_95075", "Convert parameters to destructured object"); }; + static shared_ptr Extract_type(){ return diag(95077, DiagnosticCategory::Message, "Extract_type_95077", "Extract type"); }; + static shared_ptr Extract_to_type_alias(){ return diag(95078, DiagnosticCategory::Message, "Extract_to_type_alias_95078", "Extract to type alias"); }; + static shared_ptr Extract_to_typedef(){ return diag(95079, DiagnosticCategory::Message, "Extract_to_typedef_95079", "Extract to typedef"); }; + static shared_ptr Infer_this_type_of_0_from_usage(){ return diag(95080, DiagnosticCategory::Message, "Infer_this_type_of_0_from_usage_95080", "Infer 'this' type of '{0}' from usage"); }; + static shared_ptr Add_const_to_unresolved_variable(){ return diag(95081, DiagnosticCategory::Message, "Add_const_to_unresolved_variable_95081", "Add 'const' to unresolved variable"); }; + static shared_ptr Add_const_to_all_unresolved_variables(){ return diag(95082, DiagnosticCategory::Message, "Add_const_to_all_unresolved_variables_95082", "Add 'const' to all unresolved variables"); }; + static shared_ptr Add_await(){ return diag(95083, DiagnosticCategory::Message, "Add_await_95083", "Add 'await'"); }; + static shared_ptr Add_await_to_initializer_for_0(){ return diag(95084, DiagnosticCategory::Message, "Add_await_to_initializer_for_0_95084", "Add 'await' to initializer for '{0}'"); }; + static shared_ptr Fix_all_expressions_possibly_missing_await(){ return diag(95085, DiagnosticCategory::Message, "Fix_all_expressions_possibly_missing_await_95085", "Fix all expressions possibly missing 'await'"); }; + static shared_ptr Remove_unnecessary_await(){ return diag(95086, DiagnosticCategory::Message, "Remove_unnecessary_await_95086", "Remove unnecessary 'await'"); }; + static shared_ptr Remove_all_unnecessary_uses_of_await(){ return diag(95087, DiagnosticCategory::Message, "Remove_all_unnecessary_uses_of_await_95087", "Remove all unnecessary uses of 'await'"); }; + static shared_ptr Enable_the_jsx_flag_in_your_configuration_file(){ return diag(95088, DiagnosticCategory::Message, "Enable_the_jsx_flag_in_your_configuration_file_95088", "Enable the '--jsx' flag in your configuration file"); }; + static shared_ptr Add_await_to_initializers(){ return diag(95089, DiagnosticCategory::Message, "Add_await_to_initializers_95089", "Add 'await' to initializers"); }; + static shared_ptr Extract_to_interface(){ return diag(95090, DiagnosticCategory::Message, "Extract_to_interface_95090", "Extract to interface"); }; + static shared_ptr Convert_to_a_bigint_numeric_literal(){ return diag(95091, DiagnosticCategory::Message, "Convert_to_a_bigint_numeric_literal_95091", "Convert to a bigint numeric literal"); }; + static shared_ptr Convert_all_to_bigint_numeric_literals(){ return diag(95092, DiagnosticCategory::Message, "Convert_all_to_bigint_numeric_literals_95092", "Convert all to bigint numeric literals"); }; + static shared_ptr Convert_const_to_let(){ return diag(95093, DiagnosticCategory::Message, "Convert_const_to_let_95093", "Convert 'const' to 'let'"); }; + static shared_ptr Prefix_with_declare(){ return diag(95094, DiagnosticCategory::Message, "Prefix_with_declare_95094", "Prefix with 'declare'"); }; + static shared_ptr Prefix_all_incorrect_property_declarations_with_declare(){ return diag(95095, DiagnosticCategory::Message, "Prefix_all_incorrect_property_declarations_with_declare_95095", "Prefix all incorrect property declarations with 'declare'"); }; + static shared_ptr Convert_to_template_string(){ return diag(95096, DiagnosticCategory::Message, "Convert_to_template_string_95096", "Convert to template string"); }; + static shared_ptr Add_export_to_make_this_file_into_a_module(){ return diag(95097, DiagnosticCategory::Message, "Add_export_to_make_this_file_into_a_module_95097", "Add 'export {}' to make this file into a module"); }; + static shared_ptr Set_the_target_option_in_your_configuration_file_to_0(){ return diag(95098, DiagnosticCategory::Message, "Set_the_target_option_in_your_configuration_file_to_0_95098", "Set the 'target' option in your configuration file to '{0}'"); }; + static shared_ptr Set_the_module_option_in_your_configuration_file_to_0(){ return diag(95099, DiagnosticCategory::Message, "Set_the_module_option_in_your_configuration_file_to_0_95099", "Set the 'module' option in your configuration file to '{0}'"); }; + static shared_ptr Convert_invalid_character_to_its_html_entity_code(){ return diag(95100, DiagnosticCategory::Message, "Convert_invalid_character_to_its_html_entity_code_95100", "Convert invalid character to its html entity code"); }; + static shared_ptr Convert_all_invalid_characters_to_HTML_entity_code(){ return diag(95101, DiagnosticCategory::Message, "Convert_all_invalid_characters_to_HTML_entity_code_95101", "Convert all invalid characters to HTML entity code"); }; + static shared_ptr Convert_function_expression_0_to_arrow_function(){ return diag(95105, DiagnosticCategory::Message, "Convert_function_expression_0_to_arrow_function_95105", "Convert function expression '{0}' to arrow function"); }; + static shared_ptr Convert_function_declaration_0_to_arrow_function(){ return diag(95106, DiagnosticCategory::Message, "Convert_function_declaration_0_to_arrow_function_95106", "Convert function declaration '{0}' to arrow function"); }; + static shared_ptr Fix_all_implicit_this_errors(){ return diag(95107, DiagnosticCategory::Message, "Fix_all_implicit_this_errors_95107", "Fix all implicit-'this' errors"); }; + static shared_ptr Wrap_invalid_character_in_an_expression_container(){ return diag(95108, DiagnosticCategory::Message, "Wrap_invalid_character_in_an_expression_container_95108", "Wrap invalid character in an expression container"); }; + static shared_ptr Wrap_all_invalid_characters_in_an_expression_container(){ return diag(95109, DiagnosticCategory::Message, "Wrap_all_invalid_characters_in_an_expression_container_95109", "Wrap all invalid characters in an expression container"); }; + static shared_ptr Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_json_to_read_more_about_this_file(){ return diag(95110, DiagnosticCategory::Message, "Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_json_to_read_more_about_this_file_95110", "Visit https://aka.ms/tsconfig.json to read more about this file"); }; + static shared_ptr Add_a_return_statement(){ return diag(95111, DiagnosticCategory::Message, "Add_a_return_statement_95111", "Add a return statement"); }; + static shared_ptr Remove_braces_from_arrow_function_body(){ return diag(95112, DiagnosticCategory::Message, "Remove_braces_from_arrow_function_body_95112", "Remove braces from arrow function body"); }; + static shared_ptr Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal(){ return diag(95113, DiagnosticCategory::Message, "Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113", "Wrap the following body with parentheses which should be an object literal"); }; + static shared_ptr Add_all_missing_return_statement(){ return diag(95114, DiagnosticCategory::Message, "Add_all_missing_return_statement_95114", "Add all missing return statement"); }; + static shared_ptr Remove_braces_from_all_arrow_function_bodies_with_relevant_issues(){ return diag(95115, DiagnosticCategory::Message, "Remove_braces_from_all_arrow_function_bodies_with_relevant_issues_95115", "Remove braces from all arrow function bodies with relevant issues"); }; + static shared_ptr Wrap_all_object_literal_with_parentheses(){ return diag(95116, DiagnosticCategory::Message, "Wrap_all_object_literal_with_parentheses_95116", "Wrap all object literal with parentheses"); }; + static shared_ptr Move_labeled_tuple_element_modifiers_to_labels(){ return diag(95117, DiagnosticCategory::Message, "Move_labeled_tuple_element_modifiers_to_labels_95117", "Move labeled tuple element modifiers to labels"); }; + static shared_ptr Convert_overload_list_to_single_signature(){ return diag(95118, DiagnosticCategory::Message, "Convert_overload_list_to_single_signature_95118", "Convert overload list to single signature"); }; + static shared_ptr Generate_get_and_set_accessors_for_all_overriding_properties(){ return diag(95119, DiagnosticCategory::Message, "Generate_get_and_set_accessors_for_all_overriding_properties_95119", "Generate 'get' and 'set' accessors for all overriding properties"); }; + static shared_ptr Wrap_in_JSX_fragment(){ return diag(95120, DiagnosticCategory::Message, "Wrap_in_JSX_fragment_95120", "Wrap in JSX fragment"); }; + static shared_ptr Wrap_all_unparented_JSX_in_JSX_fragment(){ return diag(95121, DiagnosticCategory::Message, "Wrap_all_unparented_JSX_in_JSX_fragment_95121", "Wrap all unparented JSX in JSX fragment"); }; + static shared_ptr Convert_arrow_function_or_function_expression(){ return diag(95122, DiagnosticCategory::Message, "Convert_arrow_function_or_function_expression_95122", "Convert arrow function or function expression"); }; + static shared_ptr Convert_to_anonymous_function(){ return diag(95123, DiagnosticCategory::Message, "Convert_to_anonymous_function_95123", "Convert to anonymous function"); }; + static shared_ptr Convert_to_named_function(){ return diag(95124, DiagnosticCategory::Message, "Convert_to_named_function_95124", "Convert to named function"); }; + static shared_ptr Convert_to_arrow_function(){ return diag(95125, DiagnosticCategory::Message, "Convert_to_arrow_function_95125", "Convert to arrow function"); }; + static shared_ptr Remove_parentheses(){ return diag(95126, DiagnosticCategory::Message, "Remove_parentheses_95126", "Remove parentheses"); }; + static shared_ptr Could_not_find_a_containing_arrow_function(){ return diag(95127, DiagnosticCategory::Message, "Could_not_find_a_containing_arrow_function_95127", "Could not find a containing arrow function"); }; + static shared_ptr Containing_function_is_not_an_arrow_function(){ return diag(95128, DiagnosticCategory::Message, "Containing_function_is_not_an_arrow_function_95128", "Containing function is not an arrow function"); }; + static shared_ptr Could_not_find_export_statement(){ return diag(95129, DiagnosticCategory::Message, "Could_not_find_export_statement_95129", "Could not find export statement"); }; + static shared_ptr This_file_already_has_a_default_export(){ return diag(95130, DiagnosticCategory::Message, "This_file_already_has_a_default_export_95130", "This file already has a default export"); }; + static shared_ptr Could_not_find_import_clause(){ return diag(95131, DiagnosticCategory::Message, "Could_not_find_import_clause_95131", "Could not find import clause"); }; + static shared_ptr Could_not_find_namespace_import_or_named_imports(){ return diag(95132, DiagnosticCategory::Message, "Could_not_find_namespace_import_or_named_imports_95132", "Could not find namespace import or named imports"); }; + static shared_ptr Selection_is_not_a_valid_type_node(){ return diag(95133, DiagnosticCategory::Message, "Selection_is_not_a_valid_type_node_95133", "Selection is not a valid type node"); }; + static shared_ptr No_type_could_be_extracted_from_this_type_node(){ return diag(95134, DiagnosticCategory::Message, "No_type_could_be_extracted_from_this_type_node_95134", "No type could be extracted from this type node"); }; + static shared_ptr Could_not_find_property_for_which_to_generate_accessor(){ return diag(95135, DiagnosticCategory::Message, "Could_not_find_property_for_which_to_generate_accessor_95135", "Could not find property for which to generate accessor"); }; + static shared_ptr Name_is_not_valid(){ return diag(95136, DiagnosticCategory::Message, "Name_is_not_valid_95136", "Name is not valid"); }; + static shared_ptr Can_only_convert_property_with_modifier(){ return diag(95137, DiagnosticCategory::Message, "Can_only_convert_property_with_modifier_95137", "Can only convert property with modifier"); }; + static shared_ptr Switch_each_misused_0_to_1(){ return diag(95138, DiagnosticCategory::Message, "Switch_each_misused_0_to_1_95138", "Switch each misused '{0}' to '{1}'"); }; + static shared_ptr Convert_to_optional_chain_expression(){ return diag(95139, DiagnosticCategory::Message, "Convert_to_optional_chain_expression_95139", "Convert to optional chain expression"); }; + static shared_ptr Could_not_find_convertible_access_expression(){ return diag(95140, DiagnosticCategory::Message, "Could_not_find_convertible_access_expression_95140", "Could not find convertible access expression"); }; + static shared_ptr Could_not_find_matching_access_expressions(){ return diag(95141, DiagnosticCategory::Message, "Could_not_find_matching_access_expressions_95141", "Could not find matching access expressions"); }; + static shared_ptr Can_only_convert_logical_AND_access_chains(){ return diag(95142, DiagnosticCategory::Message, "Can_only_convert_logical_AND_access_chains_95142", "Can only convert logical AND access chains"); }; + static shared_ptr Add_void_to_Promise_resolved_without_a_value(){ return diag(95143, DiagnosticCategory::Message, "Add_void_to_Promise_resolved_without_a_value_95143", "Add 'void' to Promise resolved without a value"); }; + static shared_ptr Add_void_to_all_Promises_resolved_without_a_value(){ return diag(95144, DiagnosticCategory::Message, "Add_void_to_all_Promises_resolved_without_a_value_95144", "Add 'void' to all Promises resolved without a value"); }; + static shared_ptr Use_element_access_for_0(){ return diag(95145, DiagnosticCategory::Message, "Use_element_access_for_0_95145", "Use element access for '{0}'"); }; + static shared_ptr Use_element_access_for_all_undeclared_properties(){ return diag(95146, DiagnosticCategory::Message, "Use_element_access_for_all_undeclared_properties_95146", "Use element access for all undeclared properties."); }; + static shared_ptr Delete_all_unused_imports(){ return diag(95147, DiagnosticCategory::Message, "Delete_all_unused_imports_95147", "Delete all unused imports"); }; + static shared_ptr Infer_function_return_type(){ return diag(95148, DiagnosticCategory::Message, "Infer_function_return_type_95148", "Infer function return type"); }; + static shared_ptr Return_type_must_be_inferred_from_a_function(){ return diag(95149, DiagnosticCategory::Message, "Return_type_must_be_inferred_from_a_function_95149", "Return type must be inferred from a function"); }; + static shared_ptr Could_not_determine_function_return_type(){ return diag(95150, DiagnosticCategory::Message, "Could_not_determine_function_return_type_95150", "Could not determine function return type"); }; + static shared_ptr Could_not_convert_to_arrow_function(){ return diag(95151, DiagnosticCategory::Message, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"); }; + static shared_ptr Could_not_convert_to_named_function(){ return diag(95152, DiagnosticCategory::Message, "Could_not_convert_to_named_function_95152", "Could not convert to named function"); }; + static shared_ptr Could_not_convert_to_anonymous_function(){ return diag(95153, DiagnosticCategory::Message, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"); }; + static shared_ptr Can_only_convert_string_concatenation(){ return diag(95154, DiagnosticCategory::Message, "Can_only_convert_string_concatenation_95154", "Can only convert string concatenation"); }; + static shared_ptr Selection_is_not_a_valid_statement_or_statements(){ return diag(95155, DiagnosticCategory::Message, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"); }; + static shared_ptr Add_missing_function_declaration_0(){ return diag(95156, DiagnosticCategory::Message, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"); }; + static shared_ptr Add_all_missing_function_declarations(){ return diag(95157, DiagnosticCategory::Message, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"); }; + static shared_ptr Method_not_implemented(){ return diag(95158, DiagnosticCategory::Message, "Method_not_implemented_95158", "Method not implemented."); }; + static shared_ptr Function_not_implemented(){ return diag(95159, DiagnosticCategory::Message, "Function_not_implemented_95159", "Function not implemented."); }; + static shared_ptr Add_override_modifier(){ return diag(95160, DiagnosticCategory::Message, "Add_override_modifier_95160", "Add 'override' modifier"); }; + static shared_ptr Remove_override_modifier(){ return diag(95161, DiagnosticCategory::Message, "Remove_override_modifier_95161", "Remove 'override' modifier"); }; + static shared_ptr Add_all_missing_override_modifiers(){ return diag(95162, DiagnosticCategory::Message, "Add_all_missing_override_modifiers_95162", "Add all missing 'override' modifiers"); }; + static shared_ptr Remove_all_unnecessary_override_modifiers(){ return diag(95163, DiagnosticCategory::Message, "Remove_all_unnecessary_override_modifiers_95163", "Remove all unnecessary 'override' modifiers"); }; + static shared_ptr Can_only_convert_named_export(){ return diag(95164, DiagnosticCategory::Message, "Can_only_convert_named_export_95164", "Can only convert named export"); }; + static shared_ptr Add_missing_properties(){ return diag(95165, DiagnosticCategory::Message, "Add_missing_properties_95165", "Add missing properties"); }; + static shared_ptr Add_all_missing_properties(){ return diag(95166, DiagnosticCategory::Message, "Add_all_missing_properties_95166", "Add all missing properties"); }; + static shared_ptr Add_missing_attributes(){ return diag(95167, DiagnosticCategory::Message, "Add_missing_attributes_95167", "Add missing attributes"); }; + static shared_ptr Add_all_missing_attributes(){ return diag(95168, DiagnosticCategory::Message, "Add_all_missing_attributes_95168", "Add all missing attributes"); }; + static shared_ptr Add_undefined_to_optional_property_type(){ return diag(95169, DiagnosticCategory::Message, "Add_undefined_to_optional_property_type_95169", "Add 'undefined' to optional property type"); }; + static shared_ptr No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer(){ return diag(18004, DiagnosticCategory::Error, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."); }; + static shared_ptr Classes_may_not_have_a_field_named_constructor(){ return diag(18006, DiagnosticCategory::Error, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."); }; + static shared_ptr JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array(){ return diag(18007, DiagnosticCategory::Error, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"); }; + static shared_ptr Private_identifiers_cannot_be_used_as_parameters(){ return diag(18009, DiagnosticCategory::Error, "Private_identifiers_cannot_be_used_as_parameters_18009", "Private identifiers cannot be used as parameters."); }; + static shared_ptr An_accessibility_modifier_cannot_be_used_with_a_private_identifier(){ return diag(18010, DiagnosticCategory::Error, "An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010", "An accessibility modifier cannot be used with a private identifier."); }; + static shared_ptr The_operand_of_a_delete_operator_cannot_be_a_private_identifier(){ return diag(18011, DiagnosticCategory::Error, "The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011", "The operand of a 'delete' operator cannot be a private identifier."); }; + static shared_ptr constructor_is_a_reserved_word(){ return diag(18012, DiagnosticCategory::Error, "constructor_is_a_reserved_word_18012", "'#constructor' is a reserved word."); }; + static shared_ptr Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier(){ return diag(18013, DiagnosticCategory::Error, "Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013", "Property '{0}' is not accessible outside class '{1}' because it has a private identifier."); }; + static shared_ptr The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling(){ return diag(18014, DiagnosticCategory::Error, "The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014", "The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling."); }; + static shared_ptr Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2(){ return diag(18015, DiagnosticCategory::Error, "Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015", "Property '{0}' in type '{1}' refers to a different member that cannot be accessed from within type '{2}'."); }; + static shared_ptr Private_identifiers_are_not_allowed_outside_class_bodies(){ return diag(18016, DiagnosticCategory::Error, "Private_identifiers_are_not_allowed_outside_class_bodies_18016", "Private identifiers are not allowed outside class bodies."); }; + static shared_ptr The_shadowing_declaration_of_0_is_defined_here(){ return diag(18017, DiagnosticCategory::Error, "The_shadowing_declaration_of_0_is_defined_here_18017", "The shadowing declaration of '{0}' is defined here"); }; + static shared_ptr The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here(){ return diag(18018, DiagnosticCategory::Error, "The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018", "The declaration of '{0}' that you probably intended to use is defined here"); }; + static shared_ptr _0_modifier_cannot_be_used_with_a_private_identifier(){ return diag(18019, DiagnosticCategory::Error, "_0_modifier_cannot_be_used_with_a_private_identifier_18019", "'{0}' modifier cannot be used with a private identifier."); }; + static shared_ptr An_enum_member_cannot_be_named_with_a_private_identifier(){ return diag(18024, DiagnosticCategory::Error, "An_enum_member_cannot_be_named_with_a_private_identifier_18024", "An enum member cannot be named with a private identifier."); }; + static shared_ptr can_only_be_used_at_the_start_of_a_file(){ return diag(18026, DiagnosticCategory::Error, "can_only_be_used_at_the_start_of_a_file_18026", "'#!' can only be used at the start of a file."); }; + static shared_ptr Compiler_reserves_name_0_when_emitting_private_identifier_downlevel(){ return diag(18027, DiagnosticCategory::Error, "Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027", "Compiler reserves name '{0}' when emitting private identifier downlevel."); }; + static shared_ptr Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher(){ return diag(18028, DiagnosticCategory::Error, "Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028", "Private identifiers are only available when targeting ECMAScript 2015 and higher."); }; + static shared_ptr Private_identifiers_are_not_allowed_in_variable_declarations(){ return diag(18029, DiagnosticCategory::Error, "Private_identifiers_are_not_allowed_in_variable_declarations_18029", "Private identifiers are not allowed in variable declarations."); }; + static shared_ptr An_optional_chain_cannot_contain_private_identifiers(){ return diag(18030, DiagnosticCategory::Error, "An_optional_chain_cannot_contain_private_identifiers_18030", "An optional chain cannot contain private identifiers."); }; + static shared_ptr The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents(){ return diag(18031, DiagnosticCategory::Error, "The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031", "The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents."); }; + static shared_ptr The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some(){ return diag(18032, DiagnosticCategory::Error, "The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032", "The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some."); }; + static shared_ptr Only_numeric_enums_can_have_computed_members_but_this_expression_has_type_0_If_you_do_not_need_exhaustiveness_checks_consider_using_an_object_literal_instead(){ return diag(18033, DiagnosticCategory::Error, "Only_numeric_enums_can_have_computed_members_but_this_expression_has_type_0_If_you_do_not_need_exhau_18033", "Only numeric enums can have computed members, but this expression has type '{0}'. If you do not need exhaustiveness checks, consider using an object literal instead."); }; - static shared Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment(){ return diag(18034, DiagnosticCategory::Message, "Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compi_18034", "Specify the JSX fragment factory function to use when targeting 'react' JSX emit with 'jsxFactory' compiler option is specified, e.g. 'Fragment'."); }; - static shared Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name(){ return diag(18035, DiagnosticCategory::Error, "Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name_18035", "Invalid value for 'jsxFragmentFactory'. '{0}' is not a valid identifier or qualified-name."); }; - static shared Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator(){ return diag(18036, DiagnosticCategory::Error, "Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036", "Class decorators can't be used with static private identifier. Consider removing the experimental decorator."); }; - static shared Await_expression_cannot_be_used_inside_a_class_static_block(){ return diag(18037, DiagnosticCategory::Error, "Await_expression_cannot_be_used_inside_a_class_static_block_18037", "Await expression cannot be used inside a class static block."); }; - static shared For_await_loops_cannot_be_used_inside_a_class_static_block(){ return diag(18038, DiagnosticCategory::Error, "For_await_loops_cannot_be_used_inside_a_class_static_block_18038", "'For await' loops cannot be used inside a class static block."); }; - static shared Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block(){ return diag(18039, DiagnosticCategory::Error, "Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039", "Invalid use of '{0}'. It cannot be used inside a class static block."); }; - static shared A_return_statement_cannot_be_used_inside_a_class_static_block(){ return diag(18041, DiagnosticCategory::Error, "A_return_statement_cannot_be_used_inside_a_class_static_block_18041", "A 'return' statement cannot be used inside a class static block."); }; + static shared_ptr Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment(){ return diag(18034, DiagnosticCategory::Message, "Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compi_18034", "Specify the JSX fragment factory function to use when targeting 'react' JSX emit with 'jsxFactory' compiler option is specified, e.g. 'Fragment'."); }; + static shared_ptr Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name(){ return diag(18035, DiagnosticCategory::Error, "Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name_18035", "Invalid value for 'jsxFragmentFactory'. '{0}' is not a valid identifier or qualified-name."); }; + static shared_ptr Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator(){ return diag(18036, DiagnosticCategory::Error, "Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036", "Class decorators can't be used with static private identifier. Consider removing the experimental decorator."); }; + static shared_ptr Await_expression_cannot_be_used_inside_a_class_static_block(){ return diag(18037, DiagnosticCategory::Error, "Await_expression_cannot_be_used_inside_a_class_static_block_18037", "Await expression cannot be used inside a class static block."); }; + static shared_ptr For_await_loops_cannot_be_used_inside_a_class_static_block(){ return diag(18038, DiagnosticCategory::Error, "For_await_loops_cannot_be_used_inside_a_class_static_block_18038", "'For await' loops cannot be used inside a class static block."); }; + static shared_ptr Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block(){ return diag(18039, DiagnosticCategory::Error, "Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039", "Invalid use of '{0}'. It cannot be used inside a class static block."); }; + static shared_ptr A_return_statement_cannot_be_used_inside_a_class_static_block(){ return diag(18041, DiagnosticCategory::Error, "A_return_statement_cannot_be_used_inside_a_class_static_block_18041", "A 'return' statement cannot be used inside a class static block."); }; }; } \ No newline at end of file diff --git a/src/factory.cpp b/src/factory.cpp index 87b9385..de4d86d 100644 --- a/src/factory.cpp +++ b/src/factory.cpp @@ -2,11 +2,11 @@ #include namespace tr { - int Factory::propagatePropertyNameFlagsOfChild(shared &node, int transformFlags) { + int Factory::propagatePropertyNameFlagsOfChild(node &node, int transformFlags) { return transformFlags | (node->transformFlags & (int) TransformFlags::PropertyNamePropagatingFlags); } - int Factory::propagateChildFlags(sharedOpt child) { + int Factory::propagateChildFlags(optionalNode child) { if (!child) return (int) TransformFlags::None; auto childFlags = child->transformFlags & ~(int) getTransformFlagsSubtreeExclusions(child->kind); @@ -14,24 +14,24 @@ namespace tr { return name ? propagatePropertyNameFlagsOfChild(name, childFlags) : childFlags; } - int Factory::propagateIdentifierNameFlags(shared node) { + int Factory::propagateIdentifierNameFlags(node node) { // An IdentifierName is allowed to be `await` return propagateChildFlags(std::move(node)) & ~(int) TransformFlags::ContainsPossibleTopLevelAwait; } - int Factory::propagateChildrenFlags(const sharedOpt &children) { + int Factory::propagateChildrenFlags(const optionalNode &children) { return children ? children->transformFlags : (int) TransformFlags::None; } - void Factory::aggregateChildrenFlags(const shared &children) { + void Factory::aggregateChildrenFlags(const node &children) { int subtreeFlags = (int) TransformFlags::None; - for (auto &&child: children->list) { + for (auto child: *children) { subtreeFlags |= propagateChildFlags(child); } children->transformFlags = subtreeFlags; } - shared Factory::createNodeArray(const sharedOpt &elements, bool hasTrailingComma) { + node Factory::createNodeArray(const optionalNode &elements, bool hasTrailingComma) { ZoneScoped; if (elements && elements->hasTrailingComma == hasTrailingComma) { // Ensure the transform flags have been aggregated for this NodeArray @@ -56,37 +56,37 @@ namespace tr { // return array; } - sharedOpt Factory::asNodeArray(sharedOpt elements) { + optionalNode Factory::asNodeArray(optionalNode elements) { return elements; } // @api - shared Factory::createNumericLiteral(string value, int numericLiteralFlags) { + node Factory::createNumericLiteral(string value, int numericLiteralFlags) { auto node = createBaseLiteral(SyntaxKind::NumericLiteral, std::move(value)); node->numericLiteralFlags = numericLiteralFlags; if (numericLiteralFlags & TokenFlags::BinaryOrOctalSpecifier) node->transformFlags |= (int) TransformFlags::ContainsES2015; return node; } - shared Factory::createNumericLiteral(double value, types::TokenFlags numericLiteralFlags) { + node Factory::createNumericLiteral(double value, types::TokenFlags numericLiteralFlags) { return createNumericLiteral(std::to_string(value), numericLiteralFlags); } // @api - shared Factory::createBigIntLiteral(variant value) { + node Factory::createBigIntLiteral(variant value) { string v = holds_alternative(value) ? get(value) : pseudoBigIntToString(get(value)) + "n"; auto node = createBaseLiteral(SyntaxKind::BigIntLiteral, v); node->transformFlags |= (int) TransformFlags::ContainsESNext; return node; } - shared Factory::createBaseStringLiteral(string text, optional isSingleQuote) { + node Factory::createBaseStringLiteral(string text, optional isSingleQuote) { auto node = createBaseLiteral(SyntaxKind::StringLiteral, std::move(text)); node->singleQuote = isSingleQuote; return node; } // @api - shared Factory::createStringLiteral(string text, optional isSingleQuote, optional hasExtendedUnicodeEscape) { + node Factory::createStringLiteral(string text, optional isSingleQuote, optional hasExtendedUnicodeEscape) { auto node = createBaseStringLiteral(std::move(text), isSingleQuote); node->hasExtendedUnicodeEscape = hasExtendedUnicodeEscape; if (hasExtendedUnicodeEscape) node->transformFlags |= (int) TransformFlags::ContainsES2015; @@ -98,51 +98,51 @@ namespace tr { // // @api - shared Factory::createSuper() { + node Factory::createSuper() { return createToken(SyntaxKind::SuperKeyword); } // @api - shared Factory::createThis() { + node Factory::createThis() { return createToken(SyntaxKind::ThisKeyword); } // @api - shared Factory::createNull() { + node Factory::createNull() { return createToken(SyntaxKind::NullKeyword); } // @api - shared Factory::createTrue() { + node Factory::createTrue() { return createToken(SyntaxKind::TrueKeyword); } // @api - shared Factory::createFalse() { + node Factory::createFalse() { return createToken(SyntaxKind::FalseKeyword); } - shared Factory::createBooleanLiteral(bool v) { + node Factory::createBooleanLiteral(bool v) { if (v) return createTrue(); return createFalse(); } - using NameType = variant>; + using NameType = variant>; - shared Factory::asName(NameType name) { + node Factory::asName(NameType name) { if (holds_alternative(name)) return createIdentifier(get(name)); - return get>(name); + return get>(name); } - sharedOpt Factory::asName(optional name) { + optionalNode Factory::asName(optional name) { if (!name) return nullptr; return asName(*name); } - using ExpressionType = variant>; + using ExpressionType = variant>; - sharedOpt Factory::asExpression(ExpressionType value) { - if (holds_alternative>(value)) return get>(value); + optionalNode Factory::asExpression(ExpressionType value) { + if (holds_alternative>(value)) return get>(value); if (holds_alternative(value)) return createStringLiteral(get(value)); if (holds_alternative(value)) return createNumericLiteral(get(value)); if (holds_alternative(value)) return createBooleanLiteral(get(value)); @@ -154,15 +154,15 @@ namespace tr { // return basefactory::createBaseNode(kind) as Mutable; // } - void Factory::setName(shared &lName, shared rName) { - lName = reinterpret_pointer_cast(rName); + void Factory::setName(node &lName, tr::node rName) { + lName = reinterpret_node(rName); } - void Factory::setName(shared &lName, shared rName) { - lName = reinterpret_pointer_cast(rName); + void Factory::setName(node &lName, tr::node rName) { + lName = reinterpret_node(rName); } - void Factory::setName(shared &lName, shared rName) { + void Factory::setName(node &lName, tr::node rName) { lName = rName; } @@ -174,13 +174,13 @@ namespace tr { // } // // @api - shared Factory::createRegularExpressionLiteral(string text) { + node Factory::createRegularExpressionLiteral(string text) { auto node = createBaseLiteral(SyntaxKind::RegularExpressionLiteral, text); return node; } // @api - shared Factory::createJsxText(string text, optional containsOnlyTriviaWhiteSpaces) { + node Factory::createJsxText(string text, optional containsOnlyTriviaWhiteSpaces) { auto node = createBaseNode(SyntaxKind::JsxText); node->text = text; node->containsOnlyTriviaWhiteSpaces = containsOnlyTriviaWhiteSpaces ? *containsOnlyTriviaWhiteSpaces : false; @@ -189,7 +189,7 @@ namespace tr { } // @api - shared Factory::createTemplateLiteralLikeNode(SyntaxKind kind, string text, optional rawText, optional templateFlags) { + node Factory::createTemplateLiteralLikeNode(SyntaxKind kind, string text, optional rawText, optional templateFlags) { auto node = createBaseToken(kind); node->text = std::move(text); node->rawText = std::move(rawText); @@ -202,7 +202,7 @@ namespace tr { } // @api - shared Factory::createLiteralLikeNode(SyntaxKind kind, string text) { + node Factory::createLiteralLikeNode(SyntaxKind kind, string text) { switch (kind) { case SyntaxKind::NumericLiteral:return createNumericLiteral(text, /*numericLiteralFlags*/ 0); case SyntaxKind::BigIntLiteral:return createBigIntLiteral(text); @@ -212,13 +212,14 @@ namespace tr { case SyntaxKind::RegularExpressionLiteral:return createRegularExpressionLiteral(text); case SyntaxKind::NoSubstitutionTemplateLiteral:return createTemplateLiteralLikeNode(kind, text, /*rawText*/ {}, /*templateFlags*/ 0); } + throw std::runtime_error("createLiteralLikeNode invalid kind"); } // // // // Identifiers // // - shared Factory::createBaseIdentifier(string text, optional originalKeywordKind) { + node Factory::createBaseIdentifier(string text, optional originalKeywordKind) { if (!originalKeywordKind && !text.empty()) { originalKeywordKind = stringToToken(text); } @@ -231,7 +232,7 @@ namespace tr { return node; } - shared Factory::createBaseGeneratedIdentifier(string text, GeneratedIdentifierFlags autoGenerateFlags) { + node Factory::createBaseGeneratedIdentifier(string text, GeneratedIdentifierFlags autoGenerateFlags) { auto node = createBaseIdentifier(text, /*originalKeywordKind*/ {}); node->autoGenerateFlags = (int) autoGenerateFlags; node->autoGenerateId = nextAutoGenerateId; @@ -240,7 +241,7 @@ namespace tr { } // @api - shared Factory::createIdentifier(string text, sharedOpt typeArguments, optional originalKeywordKind) { + node Factory::createIdentifier(string text, optionalNode typeArguments, optional originalKeywordKind) { ZoneScoped; auto node = createBaseIdentifier(std::move(text), originalKeywordKind); if (typeArguments) { @@ -297,7 +298,7 @@ namespace tr { // } // // @api - shared Factory::createPrivateIdentifier(string text) { + node Factory::createPrivateIdentifier(string text) { if (!startsWith(text, "#")) throw runtime_error("First character of private identifier must be #: " + text); auto node = createBaseNode(SyntaxKind::PrivateIdentifier); node->escapedText = escapeLeadingUnderscores(text); @@ -344,10 +345,10 @@ namespace tr { // // // // @api - shared Factory::createQualifiedName(shared left, NameType right) { + node Factory::createQualifiedName(node left, NameType right) { auto node = createBaseNode(SyntaxKind::QualifiedName); node->left = left; - node->right = reinterpret_pointer_cast(asName(right)); + node->right = reinterpret_node(asName(right)); node->transformFlags |= propagateChildFlags(node->left) | propagateIdentifierNameFlags(node->right); @@ -363,7 +364,7 @@ namespace tr { // } // // @api - shared Factory::createComputedPropertyName(shared expression) { + node Factory::createComputedPropertyName(node expression) { auto node = createBaseNode(SyntaxKind::ComputedPropertyName); node->expression = parenthesizer.parenthesizeExpressionOfComputedPropertyName(expression); node->transformFlags |= @@ -374,7 +375,7 @@ namespace tr { } // // @api -// function updateComputedPropertyName(node: ComputedPropertyName, shared expression) { +// function updateComputedPropertyName(node: ComputedPropertyName, tr::node expression) { // return node->expression != expression // ? update(createComputedPropertyName(expression), node) // : node; @@ -385,34 +386,34 @@ namespace tr { // // // // // @api -// function createTypeParameterDeclaration(sharedOpt modifiers, name: string | Identifier, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration; +// function createTypeParameterDeclaration(optionalNode modifiers, name: string | Identifier, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration; // /** @deprecated */ // function createTypeParameterDeclaration(name: string | Identifier, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration; - shared Factory::createTypeParameterDeclaration( - optional, shared, string>> modifiersOrName, - optional, shared, string>> nameOrConstraint, - sharedOpt constraintOrDefault, - sharedOpt defaultType + node Factory::createTypeParameterDeclaration( + optional, tr::node, string>> modifiersOrName, + optional, tr::node, string>> nameOrConstraint, + optionalNode constraintOrDefault, + optionalNode defaultType ) { NameType name = ""; - sharedOpt modifiers; - sharedOpt constraint = constraintOrDefault; + optionalNode modifiers; + optionalNode constraint = constraintOrDefault; if (modifiersOrName) { - if (holds_alternative>(*modifiersOrName)) { - modifiers = get>(*modifiersOrName); + if (holds_alternative>(*modifiersOrName)) { + modifiers = get>(*modifiersOrName); } else if (holds_alternative(*modifiersOrName)) { name = get(*modifiersOrName); - } else if (holds_alternative>(*modifiersOrName)) { - name = get>(*modifiersOrName); + } else if (holds_alternative>(*modifiersOrName)) { + name = get>(*modifiersOrName); } } if (nameOrConstraint) { - if (holds_alternative>(*nameOrConstraint)) { - constraint = get>(*nameOrConstraint); - } else if (holds_alternative>(*nameOrConstraint)) { - name = get>(*nameOrConstraint); + if (holds_alternative>(*nameOrConstraint)) { + constraint = get>(*nameOrConstraint); + } else if (holds_alternative>(*nameOrConstraint)) { + name = get>(*nameOrConstraint); } else if (holds_alternative(*nameOrConstraint)) { name = get(*nameOrConstraint); } @@ -441,7 +442,7 @@ namespace tr { } // // @api -// function updateTypeParameterDeclaration(node: TypeParameterDeclaration, sharedOpt modifiers, name: Identifier, constraint: TypeNode | undefined, defaultsharedOpt type): TypeParameterDeclaration; +// function updateTypeParameterDeclaration(node: TypeParameterDeclaration, optionalNode modifiers, name: Identifier, constraint: TypeNode | undefined, defaultsharedOpt type): TypeParameterDeclaration; // /** @deprecated */ // function updateTypeParameterDeclaration(node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultsharedOpt type): TypeParameterDeclaration; // function updateTypeParameterDeclaration(node: TypeParameterDeclaration, modifiersOrName: readonly Modifier[] | Identifier | undefined, nameOrConstraint: Identifier | TypeNode | undefined, constraintOrDefault: TypeNode | undefined, defaultType?: TypeNode | undefined) { @@ -467,14 +468,14 @@ namespace tr { // } // @api - shared Factory::createParameterDeclaration( - sharedOpt decorators, - sharedOpt modifiers, - sharedOpt dotDotDotToken, + node Factory::createParameterDeclaration( + optionalNode decorators, + optionalNode modifiers, + optionalNode dotDotDotToken, NameType name, - sharedOpt questionToken, - sharedOpt type, - sharedOpt initializer + optionalNode questionToken, + optionalNode type, + optionalNode initializer ) { auto node = createBaseVariableLikeDeclaration( SyntaxKind::Parameter, @@ -502,13 +503,13 @@ namespace tr { // // @api // function updateParameterDeclaration( // node: ParameterDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // dotDotDotToken: DotDotDotToken | undefined, // name: string | BindingName, -// sharedOpt questionToken, -// sharedOpt type, -// sharedOpt initializer +// optionalNode questionToken, +// optionalNode type, +// optionalNode initializer // ) { // return node->decorators != decorators // || node->modifiers != modifiers @@ -522,7 +523,7 @@ namespace tr { // } // // @api - shared Factory::createDecorator(shared expression) { + node Factory::createDecorator(node expression) { auto node = createBaseNode(SyntaxKind::Decorator); node->expression = parenthesizer.parenthesizeLeftSideOfAccess(expression); node->transformFlags |= @@ -533,7 +534,7 @@ namespace tr { } // // @api -// function updateDecorator(node: Decorator, shared expression) { +// function updateDecorator(node: Decorator, tr::node expression) { // return node->expression != expression // ? update(createDecorator(expression), node) // : node; @@ -544,11 +545,11 @@ namespace tr { // // // @api - shared Factory::createPropertySignature( - sharedOpt modifiers, + node Factory::createPropertySignature( + optionalNode modifiers, NameType name, - sharedOpt questionToken, - sharedOpt type + optionalNode questionToken, + optionalNode type ) { auto node = createBaseNamedDeclaration( SyntaxKind::PropertySignature, @@ -565,10 +566,10 @@ namespace tr { // // @api // function updatePropertySignature( // node: PropertySignature, -// sharedOpt modifiers, +// optionalNode modifiers, // name: PropertyName, -// sharedOpt questionToken, -// sharedOpt type +// optionalNode questionToken, +// optionalNode type // ) { // return node->modifiers != modifiers // || node->name != name @@ -579,13 +580,13 @@ namespace tr { // } // @api - shared Factory::createPropertyDeclaration( - sharedOpt decorators, - sharedOpt modifiers, + node Factory::createPropertyDeclaration( + optionalNode decorators, + optionalNode modifiers, NameType name, - sharedOpt questionOrExclamationToken, - sharedOpt type, - sharedOpt initializer + optionalNode questionOrExclamationToken, + optionalNode type, + optionalNode initializer ) { auto node = createBaseVariableLikeDeclaration( SyntaxKind::PropertyDeclaration, @@ -595,8 +596,8 @@ namespace tr { type, initializer ); - node->questionToken = questionOrExclamationToken && isQuestionToken(questionOrExclamationToken) ? reinterpret_pointer_cast(questionOrExclamationToken) : nullptr; - node->exclamationToken = questionOrExclamationToken && isExclamationToken(questionOrExclamationToken) ? reinterpret_pointer_cast(questionOrExclamationToken) : nullptr; + node->questionToken = questionOrExclamationToken && isQuestionToken(questionOrExclamationToken) ? reinterpret_node(questionOrExclamationToken) : nullptr; + node->exclamationToken = questionOrExclamationToken && isExclamationToken(questionOrExclamationToken) ? reinterpret_node(questionOrExclamationToken) : nullptr; node->transformFlags |= propagateChildFlags(node->questionToken) | propagateChildFlags(node->exclamationToken) | @@ -613,12 +614,12 @@ namespace tr { // // @api // function updatePropertyDeclaration( // node: PropertyDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // NameType name, // questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, -// sharedOpt type, -// sharedOpt initializer +// optionalNode type, +// optionalNode initializer // ) { // return node->decorators != decorators // || node->modifiers != modifiers @@ -632,13 +633,13 @@ namespace tr { // } // // @api - shared Factory::createMethodSignature( - sharedOpt modifiers, + node Factory::createMethodSignature( + optionalNode modifiers, NameType name, - sharedOpt questionToken, - sharedOpt typeParameters, - shared parameters, - sharedOpt type + optionalNode questionToken, + optionalNode typeParameters, + node parameters, + optionalNode type ) { auto node = createBaseSignatureDeclaration( SyntaxKind::MethodSignature, @@ -657,12 +658,12 @@ namespace tr { // // @api // function updateMethodSignature( // node: MethodSignature, -// sharedOpt modifiers, +// optionalNode modifiers, // name: PropertyName, -// sharedOpt questionToken, +// optionalNode questionToken, // typeParameters: NodeArray | undefined, // parameters: NodeArray, -// sharedOpt type +// optionalNode type // ) { // return node->modifiers != modifiers // || node->name != name @@ -675,16 +676,16 @@ namespace tr { // } // // @api - shared Factory::createMethodDeclaration( - sharedOpt decorators, - sharedOpt modifiers, - sharedOpt asteriskToken, + node Factory::createMethodDeclaration( + optionalNode decorators, + optionalNode modifiers, + optionalNode asteriskToken, NameType name, - sharedOpt questionToken, - sharedOpt typeParameters, - shared parameters, - sharedOpt type, - sharedOpt body + optionalNode questionToken, + optionalNode typeParameters, + node parameters, + optionalNode type, + optionalNode body ) { auto node = createBaseFunctionLikeDeclaration( SyntaxKind::MethodDeclaration, @@ -720,15 +721,15 @@ namespace tr { // // @api // function updateMethodDeclaration( // node: MethodDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, -// sharedOpt asteriskToken, +// optionalNode decorators, +// optionalNode modifiers, +// optionalNode asteriskToken, // name: PropertyName, -// sharedOpt questionToken, -// sharedOpt typeParameters, -// shared parameters, -// sharedOpt type, -// sharedOpt body +// optionalNode questionToken, +// optionalNode typeParameters, +// node parameters, +// optionalNode type, +// optionalNode body // ) { // return node->decorators != decorators // || node->modifiers != modifiers @@ -744,10 +745,10 @@ namespace tr { // } // // @api - shared Factory::createClassStaticBlockDeclaration( - sharedOpt decorators, - sharedOpt modifiers, - shared body + node Factory::createClassStaticBlockDeclaration( + optionalNode decorators, + optionalNode modifiers, + node body ) { auto node = createBaseNamedDeclaration( SyntaxKind::ClassStaticBlockDeclaration, @@ -763,9 +764,9 @@ namespace tr { // // @api // function updateClassStaticBlockDeclaration( // node: ClassStaticBlockDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, -// shared block +// optionalNode decorators, +// optionalNode modifiers, +// node block // ): ClassStaticBlockDeclaration { // return node->decorators != decorators // || node->modifier != modifiers @@ -775,11 +776,11 @@ namespace tr { // } // @api - shared Factory::createConstructorDeclaration( - sharedOpt decorators, - sharedOpt modifiers, - shared parameters, - sharedOpt body + node Factory::createConstructorDeclaration( + optionalNode decorators, + optionalNode modifiers, + node parameters, + optionalNode body ) { auto node = createBaseFunctionLikeDeclaration( SyntaxKind::Constructor, @@ -798,10 +799,10 @@ namespace tr { // // @api // function updateConstructorDeclaration( // node: ConstructorDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, -// shared parameters, -// sharedOpt body +// optionalNode decorators, +// optionalNode modifiers, +// node parameters, +// optionalNode body // ) { // return node->decorators != decorators // || node->modifiers != modifiers @@ -812,13 +813,13 @@ namespace tr { // } // // @api - shared Factory::createGetAccessorDeclaration( - sharedOpt decorators, - sharedOpt modifiers, + node Factory::createGetAccessorDeclaration( + optionalNode decorators, + optionalNode modifiers, NameType name, - shared parameters, - sharedOpt type, - sharedOpt body + node parameters, + optionalNode type, + optionalNode body ) { return createBaseFunctionLikeDeclaration( SyntaxKind::GetAccessor, @@ -835,12 +836,12 @@ namespace tr { // // @api // function updateGetAccessorDeclaration( // node: GetAccessorDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // name: PropertyName, -// shared parameters, -// sharedOpt type, -// sharedOpt body +// node parameters, +// optionalNode type, +// optionalNode body // ) { // return node->decorators != decorators // || node->modifiers != modifiers @@ -853,12 +854,12 @@ namespace tr { // } // @api - shared Factory::createSetAccessorDeclaration( - sharedOpt decorators, - sharedOpt modifiers, + node Factory::createSetAccessorDeclaration( + optionalNode decorators, + optionalNode modifiers, NameType name, - shared parameters, - sharedOpt body + node parameters, + optionalNode body ) { return createBaseFunctionLikeDeclaration( SyntaxKind::SetAccessor, @@ -875,11 +876,11 @@ namespace tr { // // @api // function updateSetAccessorDeclaration( // node: SetAccessorDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // name: PropertyName, -// shared parameters, -// sharedOpt body +// node parameters, +// optionalNode body // ) { // return node->decorators != decorators // || node->modifiers != modifiers @@ -891,10 +892,10 @@ namespace tr { // } // // @api - shared Factory::createCallSignature( - sharedOpt typeParameters, - shared parameters, - sharedOpt type + node Factory::createCallSignature( + optionalNode typeParameters, + node parameters, + optionalNode type ) { auto node = createBaseSignatureDeclaration( SyntaxKind::CallSignature, @@ -914,7 +915,7 @@ namespace tr { // node: CallSignatureDeclaration, // typeParameters: NodeArray | undefined, // parameters: NodeArray, -// sharedOpt type +// optionalNode type // ) { // return node->typeParameters != typeParameters // || node->parameters != parameters @@ -924,10 +925,10 @@ namespace tr { // } // // @api - shared Factory::createConstructSignature( - sharedOpt typeParameters, - shared parameters, - sharedOpt type + node Factory::createConstructSignature( + optionalNode typeParameters, + node parameters, + optionalNode type ) { auto node = createBaseSignatureDeclaration( SyntaxKind::ConstructSignature, @@ -947,7 +948,7 @@ namespace tr { // node: ConstructSignatureDeclaration, // typeParameters: NodeArray | undefined, // parameters: NodeArray, -// sharedOpt type +// optionalNode type // ) { // return node->typeParameters != typeParameters // || node->parameters != parameters @@ -957,11 +958,11 @@ namespace tr { // } // // @api - shared Factory::createIndexSignature( - sharedOpt decorators, - sharedOpt modifiers, - shared parameters, - sharedOpt type + node Factory::createIndexSignature( + optionalNode decorators, + optionalNode modifiers, + node parameters, + optionalNode type ) { auto node = createBaseSignatureDeclaration( SyntaxKind::IndexSignature, @@ -979,10 +980,10 @@ namespace tr { // // @api // function updateIndexSignature( // node: IndexSignatureDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, -// shared parameters, -// shared type +// optionalNode decorators, +// optionalNode modifiers, +// node parameters, +// node type // ) { // return node->parameters != parameters // || node->type != type @@ -993,7 +994,7 @@ namespace tr { // } // @api - shared Factory::createTemplateLiteralTypeSpan(shared type, shared literal) { + node Factory::createTemplateLiteralTypeSpan(node type, tr::node literal) { auto node = createBaseNode(SyntaxKind::TemplateLiteralTypeSpan); node->type = type; node->literal = literal; @@ -1002,7 +1003,7 @@ namespace tr { } // // @api -// function updateTemplateLiteralTypeSpan(node: TemplateLiteralTypeSpan, shared type, literal: TemplateMiddle | TemplateTail) { +// function updateTemplateLiteralTypeSpan(node: TemplateLiteralTypeSpan, tr::node type, literal: TemplateMiddle | TemplateTail) { // return node->type != type // || node->literal != literal // ? update(createTemplateLiteralTypeSpan(type, literal), node) @@ -1019,7 +1020,7 @@ namespace tr { // } // // @api - shared Factory::createTypePredicateNode(sharedOpt assertsModifier, NameType parameterName, sharedOpt type) { + node Factory::createTypePredicateNode(optionalNode assertsModifier, NameType parameterName, optionalNode type) { auto node = createBaseNode(SyntaxKind::TypePredicate); node->assertsModifier = assertsModifier; node->parameterName = asName(parameterName); @@ -1029,7 +1030,7 @@ namespace tr { } // // @api -// function updateTypePredicateNode(node: TypePredicateNode, assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode, sharedOpt type) { +// function updateTypePredicateNode(node: TypePredicateNode, assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode, optionalNode type) { // return node->assertsModifier != assertsModifier // || node->parameterName != parameterName // || node->type != type @@ -1038,7 +1039,7 @@ namespace tr { // } // @api - shared Factory::createTypeReferenceNode(NameType typeName, sharedOpt typeArguments) { + node Factory::createTypeReferenceNode(NameType typeName, optionalNode typeArguments) { auto node = createBaseNode(SyntaxKind::TypeReference); node->typeName = asName(typeName); if (typeArguments) node->typeArguments = parenthesizer.parenthesizeTypeArguments(createNodeArray(typeArguments)); @@ -1055,10 +1056,10 @@ namespace tr { // } // @api - shared Factory::createFunctionTypeNode( - sharedOpt typeParameters, - shared parameters, - sharedOpt type + node Factory::createFunctionTypeNode( + optionalNode typeParameters, + node parameters, + optionalNode type ) { auto node = createBaseSignatureDeclaration( SyntaxKind::FunctionType, @@ -1078,7 +1079,7 @@ namespace tr { // node: FunctionTypeNode, // typeParameters: NodeArray | undefined, // parameters: NodeArray, -// sharedOpt type +// optionalNode type // ) { // return node->typeParameters != typeParameters // || node->parameters != parameters @@ -1094,11 +1095,11 @@ namespace tr { // Debug.fail("Incorrect number of arguments specified."); // } - shared Factory::createConstructorTypeNode1( - sharedOpt modifiers, - sharedOpt typeParameters, - shared parameters, - sharedOpt type + node Factory::createConstructorTypeNode1( + optionalNode modifiers, + optionalNode typeParameters, + node parameters, + optionalNode type ) { auto node = createBaseSignatureDeclaration( SyntaxKind::ConstructorType, @@ -1115,9 +1116,9 @@ namespace tr { // /** @deprecated */ // function createConstructorTypeNode2( -// sharedOpt typeParameters, -// shared parameters, -// sharedOpt type +// optionalNode typeParameters, +// node parameters, +// optionalNode type // ): ConstructorTypeNode { // return createConstructorTypeNode1(/*modifiers*/ nullptr, typeParameters, parameters, type); // } @@ -1131,10 +1132,10 @@ namespace tr { // // function updateConstructorTypeNode1( // node: ConstructorTypeNode, -// sharedOpt modifiers, +// optionalNode modifiers, // typeParameters: NodeArray | undefined, // parameters: NodeArray, -// sharedOpt type +// optionalNode type // ) { // return node->modifiers != modifiers // || node->typeParameters != typeParameters @@ -1149,13 +1150,13 @@ namespace tr { // node: ConstructorTypeNode, // typeParameters: NodeArray | undefined, // parameters: NodeArray, -// sharedOpt type +// optionalNode type // ) { // return updateConstructorTypeNode1(node, node->modifiers, typeParameters, parameters, type); // } // // @api - shared Factory::createTypeQueryNode(shared exprName, sharedOpt typeArguments) { + node Factory::createTypeQueryNode(node exprName, optionalNode typeArguments) { auto node = createBaseNode(SyntaxKind::TypeQuery); node->exprName = exprName; if (typeArguments) node->typeArguments = parenthesizer.parenthesizeTypeArguments(typeArguments); @@ -1172,7 +1173,7 @@ namespace tr { // } // // @api - shared Factory::createTypeLiteralNode(sharedOpt members) { + node Factory::createTypeLiteralNode(optionalNode members) { auto node = createBaseNode(SyntaxKind::TypeLiteral); node->members = createNodeArray(members); node->transformFlags = (int) TransformFlags::ContainsTypeScript; @@ -1187,7 +1188,7 @@ namespace tr { // } // @api - shared Factory::createArrayTypeNode(shared elementType) { + node Factory::createArrayTypeNode(node elementType) { auto node = createBaseNode(SyntaxKind::ArrayType); node->elementType = parenthesizer.parenthesizeNonArrayTypeOfPostfixType(elementType); node->transformFlags = (int) TransformFlags::ContainsTypeScript; @@ -1195,14 +1196,14 @@ namespace tr { } // // @api -// function updateArrayTypeNode(node: ArrayTypeNode, shared elementType): ArrayTypeNode { +// function updateArrayTypeNode(node: ArrayTypeNode, tr::node elementType): ArrayTypeNode { // return node->elementType != elementType // ? update(createArrayTypeNode(elementType), node) // : node; // } // // @api - shared Factory::createTupleTypeNode(shared elements) { + node Factory::createTupleTypeNode(node elements) { auto node = createBaseNode(SyntaxKind::TupleType); node->elements = createNodeArray(parenthesizer.parenthesizeElementTypesOfTupleType(elements)); node->transformFlags = (int) TransformFlags::ContainsTypeScript; @@ -1217,7 +1218,7 @@ namespace tr { // } // // @api - shared Factory::createNamedTupleMember(sharedOpt dotDotDotToken, shared name, sharedOpt questionToken, shared type) { + node Factory::createNamedTupleMember(optionalNode dotDotDotToken, tr::node name, optionalNode questionToken, tr::node type) { auto node = createBaseNode(SyntaxKind::NamedTupleMember); node->dotDotDotToken = dotDotDotToken; node->name = name; @@ -1228,7 +1229,7 @@ namespace tr { } // // @api -// function updateNamedTupleMember(node: NamedTupleMember, dotDotDotToken: DotDotDotToken | undefined, name: Identifier, sharedOpt questionToken, shared type) { +// function updateNamedTupleMember(node: NamedTupleMember, dotDotDotToken: DotDotDotToken | undefined, name: Identifier, optionalNode questionToken, tr::node type) { // return node->dotDotDotToken != dotDotDotToken // || node->name != name // || node->questionToken != questionToken @@ -1238,7 +1239,7 @@ namespace tr { // } // // // @api -// function createOptionalTypeNode(shared type) { +// function createOptionalTypeNode(node type) { // auto node = createBaseNode(SyntaxKind::OptionalType); // node->type = parenthesizer.parenthesizeTypeOfOptionalType(type); // node->transformFlags = (int)TransformFlags::ContainsTypeScript; @@ -1246,14 +1247,14 @@ namespace tr { // } // // // @api -// function updateOptionalTypeNode(node: OptionalTypeNode, shared type): OptionalTypeNode { +// function updateOptionalTypeNode(node: OptionalTypeNode, tr::node type): OptionalTypeNode { // return node->type != type // ? update(createOptionalTypeNode(type), node) // : node; // } // // @api - shared Factory::createRestTypeNode(shared type) { + node Factory::createRestTypeNode(node type) { auto node = createBaseNode(SyntaxKind::RestType); node->type = type; node->transformFlags = (int) TransformFlags::ContainsTypeScript; @@ -1261,7 +1262,7 @@ namespace tr { } // // @api -// function updateRestTypeNode(node: RestTypeNode, shared type): RestTypeNode { +// function updateRestTypeNode(node: RestTypeNode, tr::node type): RestTypeNode { // return node->type != type // ? update(createRestTypeNode(type), node) // : node; @@ -1274,7 +1275,7 @@ namespace tr { // } // @api - shared Factory::createUnionTypeNode(shared types) { + node Factory::createUnionTypeNode(node types) { return createUnionOrIntersectionTypeNode(SyntaxKind::UnionType, types, CALLBACK(parenthesizer.parenthesizeConstituentTypesOfUnionType)); } @@ -1284,7 +1285,7 @@ namespace tr { // } // @api - shared Factory::createIntersectionTypeNode(shared types) { + node Factory::createIntersectionTypeNode(node types) { return createUnionOrIntersectionTypeNode(SyntaxKind::IntersectionType, types, CALLBACK(parenthesizer.parenthesizeConstituentTypesOfIntersectionType)); } @@ -1294,7 +1295,7 @@ namespace tr { // } // @api - shared Factory::createConditionalTypeNode(shared checkType, shared extendsType, shared trueType, shared falseType) { + node Factory::createConditionalTypeNode(node checkType, tr::node extendsType, tr::node trueType, tr::node falseType) { auto node = createBaseNode(SyntaxKind::ConditionalType); node->checkType = parenthesizer.parenthesizeCheckTypeOfConditionalType(checkType); node->extendsType = parenthesizer.parenthesizeExtendsTypeOfConditionalType(extendsType); @@ -1315,7 +1316,7 @@ namespace tr { // } // // @api - shared Factory::createInferTypeNode(shared typeParameter) { + node Factory::createInferTypeNode(node typeParameter) { auto node = createBaseNode(SyntaxKind::InferType); node->typeParameter = typeParameter; node->transformFlags = (int) TransformFlags::ContainsTypeScript; @@ -1330,7 +1331,7 @@ namespace tr { // } // @api - shared Factory::createTemplateLiteralType(shared head, shared templateSpans) { + node Factory::createTemplateLiteralType(node head, tr::node templateSpans) { auto node = createBaseNode(SyntaxKind::TemplateLiteralType); node->head = head; node->templateSpans = createNodeArray(templateSpans); @@ -1349,35 +1350,35 @@ namespace tr { // // @api // function createImportTypeNode(argument: TypeNode, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode; // function createImportTypeNode(argument: TypeNode, assertions?: ImportTypeAssertionContainer, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode; - shared Factory::createImportTypeNode( - shared argument, - optional, shared>> qualifierOrAssertions, - optional, shared>> typeArgumentsOrQualifier, - optional>> isTypeOfOrTypeArguments, + node Factory::createImportTypeNode( + node argument, + optional, tr::node>> qualifierOrAssertions, + optional, tr::node>> typeArgumentsOrQualifier, + optional>> isTypeOfOrTypeArguments, optional isTypeOf ) { - sharedOpt assertion; - sharedOpt qualifier; - sharedOpt typeArguments; + optionalNode assertion; + optionalNode qualifier; + optionalNode typeArguments; if (qualifierOrAssertions) { - if (holds_alternative>(*qualifierOrAssertions)) { - assertion = get>(*qualifierOrAssertions); - } else if (holds_alternative>(*qualifierOrAssertions)) { - qualifier = get>(*qualifierOrAssertions); + if (holds_alternative>(*qualifierOrAssertions)) { + assertion = get>(*qualifierOrAssertions); + } else if (holds_alternative>(*qualifierOrAssertions)) { + qualifier = get>(*qualifierOrAssertions); } } if (typeArgumentsOrQualifier) { - if (holds_alternative>(*typeArgumentsOrQualifier)) { - typeArguments = get>(*typeArgumentsOrQualifier); - } else if (holds_alternative>(*typeArgumentsOrQualifier)) { - qualifier = get>(*typeArgumentsOrQualifier); + if (holds_alternative>(*typeArgumentsOrQualifier)) { + typeArguments = get>(*typeArgumentsOrQualifier); + } else if (holds_alternative>(*typeArgumentsOrQualifier)) { + qualifier = get>(*typeArgumentsOrQualifier); } } if (isTypeOfOrTypeArguments) { - if (holds_alternative>(*isTypeOfOrTypeArguments)) { - typeArguments = get>(*isTypeOfOrTypeArguments); + if (holds_alternative>(*isTypeOfOrTypeArguments)) { + typeArguments = get>(*isTypeOfOrTypeArguments); } else if (holds_alternative(*isTypeOfOrTypeArguments)) { isTypeOf = get(*isTypeOfOrTypeArguments); } @@ -1400,8 +1401,8 @@ namespace tr { } // // @api -// function updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, qualifier: EntityName | undefined, sharedOpt typeArguments, isTypeOf?: boolean | undefined): ImportTypeNode; -// function updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, assertions: ImportTypeAssertionContainer | undefined, qualifier: EntityName | undefined, sharedOpt typeArguments, isTypeOf?: boolean | undefined): ImportTypeNode; +// function updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, qualifier: EntityName | undefined, optionalNode typeArguments, isTypeOf?: boolean | undefined): ImportTypeNode; +// function updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, assertions: ImportTypeAssertionContainer | undefined, qualifier: EntityName | undefined, optionalNode typeArguments, isTypeOf?: boolean | undefined): ImportTypeNode; // function updateImportTypeNode( // node: ImportTypeNode, // argument: TypeNode, @@ -1426,7 +1427,7 @@ namespace tr { // } // @api - shared Factory::createParenthesizedType(shared type) { + node Factory::createParenthesizedType(node type) { auto node = createBaseNode(SyntaxKind::ParenthesizedType); node->type = type; node->transformFlags = (int) TransformFlags::ContainsTypeScript; @@ -1434,21 +1435,21 @@ namespace tr { } // // @api -// function updateParenthesizedType(node: ParenthesizedTypeNode, shared type) { +// function updateParenthesizedType(node: ParenthesizedTypeNode, tr::node type) { // return node->type != type // ? update(createParenthesizedType(type), node) // : node; // } // @api - shared Factory::createThisTypeNode() { + node Factory::createThisTypeNode() { auto node = createBaseNode(SyntaxKind::ThisType); node->transformFlags = (int) TransformFlags::ContainsTypeScript; return node; } // @api - shared Factory::createTypeOperatorNode(SyntaxKind operatorKind, shared type) { + node Factory::createTypeOperatorNode(SyntaxKind operatorKind, tr::node type) { auto node = createBaseNode(SyntaxKind::TypeOperator); node->operatorKind = operatorKind; node->type = operatorKind == SyntaxKind::ReadonlyKeyword ? @@ -1459,14 +1460,14 @@ namespace tr { } // // @api -// function updateTypeOperatorNode(node: TypeOperatorNode, shared type) { +// function updateTypeOperatorNode(node: TypeOperatorNode, tr::node type) { // return node->type != type // ? update(createTypeOperatorNode(node->operator, type), node) // : node; // } // @api - shared Factory::createIndexedAccessTypeNode(shared objectType, shared indexType) { + node Factory::createIndexedAccessTypeNode(node objectType, tr::node indexType) { auto node = createBaseNode(SyntaxKind::IndexedAccessType); node->objectType = parenthesizer.parenthesizeNonArrayTypeOfPostfixType(objectType); node->indexType = indexType; @@ -1483,13 +1484,13 @@ namespace tr { // } // @api - shared Factory::createMappedTypeNode( - sharedOpt readonlyToken, //: ReadonlyKeyword | PlusToken | MinusToken | undefined, - shared typeParameter, - sharedOpt nameType, - sharedOpt questionToken, //: QuestionToken | PlusToken | MinusToken | undefined, - sharedOpt type, - sharedOpt members + node Factory::createMappedTypeNode( + optionalNode readonlyToken, //: ReadonlyKeyword | PlusToken | MinusToken | undefined, + node typeParameter, + optionalNode nameType, + optionalNode questionToken, //: QuestionToken | PlusToken | MinusToken | undefined, + optionalNode type, + optionalNode members ) { auto node = createBaseNode(SyntaxKind::MappedType); node->readonlyToken = readonlyToken; @@ -1503,7 +1504,7 @@ namespace tr { } // // @api -// function updateMappedTypeNode(node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, namesharedOpt type, questionToken: QuestionToken | PlusToken | MinusToken | undefined, sharedOpt type, sharedOpt members): MappedTypeNode { +// function updateMappedTypeNode(node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, namesharedOpt type, questionToken: QuestionToken | PlusToken | MinusToken | undefined, optionalNode type, optionalNode members): MappedTypeNode { // return node->readonlyToken != readonlyToken // || node->typeParameter != typeParameter // || node->nameType != nameType @@ -1515,7 +1516,7 @@ namespace tr { // } // // @api - shared Factory::createLiteralTypeNode(shared literal) { + node Factory::createLiteralTypeNode(node literal) { auto node = createBaseNode(SyntaxKind::LiteralType); node->literal = literal; node->transformFlags = (int) TransformFlags::ContainsTypeScript; @@ -1534,7 +1535,7 @@ namespace tr { // // // // @api - shared Factory::createObjectBindingPattern(shared elements) { + node Factory::createObjectBindingPattern(node elements) { auto node = createBaseNode(SyntaxKind::ObjectBindingPattern); node->elements = createNodeArray(elements); node->transformFlags |= @@ -1557,7 +1558,7 @@ namespace tr { // } // // @api - shared Factory::createArrayBindingPattern(shared elements) { + node Factory::createArrayBindingPattern(node elements) { auto node = createBaseNode(SyntaxKind::ArrayBindingPattern); node->elements = createNodeArray(elements); node->transformFlags |= @@ -1575,11 +1576,11 @@ namespace tr { // } // // @api - shared Factory::createBindingElement( - sharedOpt dotDotDotToken, - optional>> propertyName, - variant> name, - sharedOpt initializer + node Factory::createBindingElement( + optionalNode dotDotDotToken, + optional>> propertyName, + variant> name, + optionalNode initializer ) { auto node = createBaseBindingLikeDeclaration( SyntaxKind::BindingElement, @@ -1601,7 +1602,7 @@ namespace tr { } // // @api -// function updateBindingElement(node: BindingElement, dotDotDotToken: DotDotDotToken | undefined, propertyName: PropertyName | undefined, name: BindingName, sharedOpt initializer) { +// function updateBindingElement(node: BindingElement, dotDotDotToken: DotDotDotToken | undefined, propertyName: PropertyName | undefined, name: BindingName, optionalNode initializer) { // return node->propertyName != propertyName // || node->dotDotDotToken != dotDotDotToken // || node->name != name @@ -1615,12 +1616,12 @@ namespace tr { // // // @api - shared Factory::createArrayLiteralExpression(sharedOpt elements, bool multiLine) { + node Factory::createArrayLiteralExpression(optionalNode elements, bool multiLine) { auto node = createBaseExpression(SyntaxKind::ArrayLiteralExpression); // Ensure we add a trailing comma for something like `[NumericLiteral(1), NumericLiteral(2), OmittedExpresion]` so that // we end up with `[1, 2, ,]` instead of `[1, 2, ]` otherwise the `OmittedExpression` will just end up being treated like // a trailing comma. - sharedOpt lastElement = elements ? lastOrUndefined(elements) : nullptr; + optionalNode lastElement = elements ? lastOrUndefined(elements) : nullptr; auto elementsArray = createNodeArray(elements, lastElement && isOmittedExpression(lastElement) ? true : false); node->elements = parenthesizer.parenthesizeExpressionsOfCommaDelimitedList(elementsArray); node->multiLine = multiLine; @@ -1636,7 +1637,7 @@ namespace tr { // } // @api - shared Factory::createObjectLiteralExpression(sharedOpt properties, bool multiLine) { + node Factory::createObjectLiteralExpression(optionalNode properties, bool multiLine) { auto node = createBaseExpression(SyntaxKind::ObjectLiteralExpression); node->properties = createNodeArray(properties); node->multiLine = multiLine; @@ -1652,7 +1653,7 @@ namespace tr { // } // // @api - shared Factory::createPropertyAccessExpression(shared expression, NameType _name) { + node Factory::createPropertyAccessExpression(node expression, NameType _name) { auto node = createBaseExpression(SyntaxKind::PropertyAccessExpression); node->expression = parenthesizer.parenthesizeLeftSideOfAccess(expression); node->name = asName(_name); @@ -1672,7 +1673,7 @@ namespace tr { } // @api - shared Factory::createPropertyAccessChain(shared expression, sharedOpt questionDotToken, NameType name) { + node Factory::createPropertyAccessChain(node expression, optionalNode questionDotToken, NameType name) { auto node = createBaseExpression(SyntaxKind::PropertyAccessExpression); node->flags |= (int) NodeFlags::OptionalChain; node->expression = parenthesizer.parenthesizeLeftSideOfAccess(expression); @@ -1689,7 +1690,7 @@ namespace tr { } // // @api -// function updatePropertyAccessExpression(node: PropertyAccessExpression, shared expression, name: Identifier | PrivateIdentifier) { +// function updatePropertyAccessExpression(node: PropertyAccessExpression, tr::node expression, name: Identifier | PrivateIdentifier) { // if (isPropertyAccessChain(node)) { // return updatePropertyAccessChain(node, expression, node->questionDotToken, cast(name, isIdentifier)); // } @@ -1701,7 +1702,7 @@ namespace tr { // // // // @api -// function updatePropertyAccessChain(node: PropertyAccessChain, shared expression, sharedOpt questionDotToken, name: Identifier | PrivateIdentifier) { +// function updatePropertyAccessChain(node: PropertyAccessChain, tr::node expression, optionalNode questionDotToken, name: Identifier | PrivateIdentifier) { // Debug::asserts(!!(node->flags & NodeFlags::OptionalChain), "Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead."); // // Because we are updating an existing PropertyAccessChain we want to inherit its emitFlags // // instead of using the default from createPropertyAccess @@ -1713,7 +1714,7 @@ namespace tr { // } // // @api - shared Factory::createElementAccessExpression(shared expression, ExpressionType index) { + node Factory::createElementAccessExpression(node expression, ExpressionType index) { auto node = createBaseExpression(SyntaxKind::ElementAccessExpression); node->expression = parenthesizer.parenthesizeLeftSideOfAccess(expression); node->argumentExpression = asExpression(index); @@ -1731,7 +1732,7 @@ namespace tr { } // // // @api -// function updateElementAccessExpression(node: ElementAccessExpression, shared expression, argumentExpression: Expression) { +// function updateElementAccessExpression(node: ElementAccessExpression, tr::node expression, argumentExpression: Expression) { // if (isElementAccessChain(node)) { // return updateElementAccessChain(node, expression, node->questionDotToken, argumentExpression); // } @@ -1742,7 +1743,7 @@ namespace tr { // } // // @api - shared Factory::createElementAccessChain(shared expression, sharedOpt questionDotToken, ExpressionType index) { + node Factory::createElementAccessChain(node expression, optionalNode questionDotToken, ExpressionType index) { auto node = createBaseExpression(SyntaxKind::ElementAccessExpression); node->flags |= (int) NodeFlags::OptionalChain; node->expression = parenthesizer.parenthesizeLeftSideOfAccess(expression); @@ -1757,7 +1758,7 @@ namespace tr { } // // @api -// function updateElementAccessChain(node: ElementAccessChain, shared expression, sharedOpt questionDotToken, argumentExpression: Expression) { +// function updateElementAccessChain(node: ElementAccessChain, tr::node expression, optionalNode questionDotToken, argumentExpression: Expression) { // Debug::asserts(!!(node->flags & NodeFlags::OptionalChain), "Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead."); // // Because we are updating an existing ElementAccessChain we want to inherit its emitFlags // // instead of using the default from createElementAccess @@ -1769,7 +1770,7 @@ namespace tr { // } // // @api - shared Factory::createCallExpression(shared expression, sharedOpt typeArguments, sharedOpt argumentsArray) { + node Factory::createCallExpression(node expression, optionalNode typeArguments, optionalNode argumentsArray) { auto node = createBaseExpression(SyntaxKind::CallExpression); node->expression = parenthesizer.parenthesizeLeftSideOfAccess(expression); node->typeArguments = asNodeArray(typeArguments); @@ -1790,7 +1791,7 @@ namespace tr { } // @api - shared Factory::createCallChain(shared expression, sharedOpt questionDotToken, sharedOpt typeArguments, sharedOpt argumentsArray) { + node Factory::createCallChain(node expression, optionalNode questionDotToken, optionalNode typeArguments, optionalNode argumentsArray) { auto node = createBaseExpression(SyntaxKind::CallExpression); node->flags |= (int) NodeFlags::OptionalChain; node->expression = parenthesizer.parenthesizeLeftSideOfAccess(expression); @@ -1813,7 +1814,7 @@ namespace tr { } // @api - shared Factory::updateCallChain(shared node, shared expression, sharedOpt questionDotToken, sharedOpt typeArguments, shared argumentsArray) { + node Factory::updateCallChain(node node, tr::node expression, optionalNode questionDotToken, optionalNode typeArguments, tr::node argumentsArray) { Debug::asserts(!!(node->flags & (int) NodeFlags::OptionalChain), "Cannot update a CallExpression using updateCallChain. Use updateCall instead."); return node->expression != expression || node->questionDotToken != questionDotToken @@ -1824,7 +1825,7 @@ namespace tr { } // @api - shared Factory::updateCallExpression(shared node, shared expression, sharedOpt typeArguments, shared argumentsArray) { + node Factory::updateCallExpression(node node, tr::node expression, optionalNode typeArguments, tr::node argumentsArray) { if (isCallChain(node)) { return updateCallChain(node, expression, node->questionDotToken, typeArguments, argumentsArray); } @@ -1836,7 +1837,7 @@ namespace tr { } // @api - shared Factory::createNewExpression(shared expression, sharedOpt typeArguments, sharedOpt argumentsArray) { + node Factory::createNewExpression(node expression, optionalNode typeArguments, optionalNode argumentsArray) { auto node = createBaseExpression(SyntaxKind::NewExpression); node->expression = parenthesizer.parenthesizeExpressionOfNew(expression); node->typeArguments = asNodeArray(typeArguments); @@ -1853,7 +1854,7 @@ namespace tr { } // // @api -// function updateNewExpression(node: NewExpression, shared expression, sharedOpt typeArguments, sharedOpt argumentsArray) { +// function updateNewExpression(node: NewExpression, tr::node expression, optionalNode typeArguments, optionalNode argumentsArray) { // return node->expression != expression // || node->typeArguments != typeArguments // || node->arguments != argumentsArray @@ -1862,7 +1863,7 @@ namespace tr { // } // @api - shared Factory::createTaggedTemplateExpression(shared tag, sharedOpt typeArguments, shared templateLiteral) { + node Factory::createTaggedTemplateExpression(node tag, optionalNode typeArguments, tr::node templateLiteral) { auto node = createBaseExpression(SyntaxKind::TaggedTemplateExpression); node->tag = parenthesizer.parenthesizeLeftSideOfAccess(tag); node->typeArguments = asNodeArray(typeArguments); @@ -1882,7 +1883,7 @@ namespace tr { } // // // @api -// function updateTaggedTemplateExpression(node: TaggedTemplateExpression, tag: Expression, sharedOpt typeArguments, template: TemplateLiteral) { +// function updateTaggedTemplateExpression(node: TaggedTemplateExpression, tag: Expression, optionalNode typeArguments, template: TemplateLiteral) { // return node->tag != tag // || node->typeArguments != typeArguments // || node->template != template @@ -1891,7 +1892,7 @@ namespace tr { // } // @api - shared Factory::createTypeAssertion(shared type, shared expression) { + node Factory::createTypeAssertion(node type, tr::node expression) { auto node = createBaseExpression(SyntaxKind::TypeAssertionExpression); node->expression = parenthesizer.parenthesizeOperandOfPrefixUnary(expression); node->type = type; @@ -1903,7 +1904,7 @@ namespace tr { } // @api - shared Factory::updateTypeAssertion(shared node, shared type, shared expression) { + node Factory::updateTypeAssertion(node node, tr::node type, tr::node expression) { return node->type != type || node->expression != expression ? update(createTypeAssertion(type, expression), node) @@ -1911,7 +1912,7 @@ namespace tr { } // @api - shared Factory::createParenthesizedExpression(shared expression) { + node Factory::createParenthesizedExpression(node expression) { auto node = createBaseExpression(SyntaxKind::ParenthesizedExpression); node->expression = expression; node->transformFlags = propagateChildFlags(node->expression); @@ -1919,21 +1920,21 @@ namespace tr { } // @api - shared Factory::updateParenthesizedExpression(shared node, shared expression) { + node Factory::updateParenthesizedExpression(node node, tr::node expression) { return node->expression != expression ? update(createParenthesizedExpression(expression), node) : node; } // @api - shared Factory::createFunctionExpression( - sharedOpt modifiers, - sharedOpt asteriskToken, + node Factory::createFunctionExpression( + optionalNode modifiers, + optionalNode asteriskToken, NameType name, - sharedOpt typeParameters, - sharedOpt parameters, - sharedOpt type, - shared body + optionalNode typeParameters, + optionalNode parameters, + optionalNode type, + node body ) { auto node = createBaseFunctionLikeDeclaration( SyntaxKind::FunctionExpression, @@ -1965,13 +1966,13 @@ namespace tr { // // @api // function updateFunctionExpression( // node: FunctionExpression, -// sharedOpt modifiers, -// sharedOpt asteriskToken, +// optionalNode modifiers, +// optionalNode asteriskToken, // name: Identifier | undefined, -// sharedOpt typeParameters, -// shared parameters, -// sharedOpt type, -// shared block +// optionalNode typeParameters, +// node parameters, +// optionalNode type, +// node block // ) { // return node->name != name // || node->modifiers != modifiers @@ -1984,13 +1985,13 @@ namespace tr { // : node; // } // @api - shared Factory::createArrowFunction( - sharedOpt modifiers, - sharedOpt typeParameters, - shared parameters, - sharedOpt type, - sharedOpt equalsGreaterThanToken, - shared body + node Factory::createArrowFunction( + optionalNode modifiers, + optionalNode typeParameters, + node parameters, + optionalNode type, + optionalNode equalsGreaterThanToken, + node body ) { auto node = createBaseFunctionLikeDeclaration( SyntaxKind::ArrowFunction, @@ -2015,10 +2016,10 @@ namespace tr { // // @api // function updateArrowFunction( // node: ArrowFunction, -// sharedOpt modifiers, -// sharedOpt typeParameters, -// shared parameters, -// sharedOpt type, +// optionalNode modifiers, +// optionalNode typeParameters, +// node parameters, +// optionalNode type, // equalsGreaterThanToken: EqualsGreaterThanToken, // body: ConciseBody // ): ArrowFunction { @@ -2033,7 +2034,7 @@ namespace tr { // } // // @api - shared Factory::createDeleteExpression(shared expression) { + node Factory::createDeleteExpression(node expression) { auto node = createBaseExpression(SyntaxKind::DeleteExpression); node->expression = parenthesizer.parenthesizeOperandOfPrefixUnary(expression); node->transformFlags |= propagateChildFlags(node->expression); @@ -2041,14 +2042,14 @@ namespace tr { } // // @api -// function updateDeleteExpression(node: DeleteExpression, shared expression) { +// function updateDeleteExpression(node: DeleteExpression, tr::node expression) { // return node->expression != expression // ? update(createDeleteExpression(expression), node) // : node; // } // @api - shared Factory::createTypeOfExpression(shared expression) { + node Factory::createTypeOfExpression(node expression) { auto node = createBaseExpression(SyntaxKind::TypeOfExpression); node->expression = parenthesizer.parenthesizeOperandOfPrefixUnary(expression); node->transformFlags |= propagateChildFlags(node->expression); @@ -2056,14 +2057,14 @@ namespace tr { } // // @api -// function updateTypeOfExpression(node: TypeOfExpression, shared expression) { +// function updateTypeOfExpression(node: TypeOfExpression, tr::node expression) { // return node->expression != expression // ? update(createTypeOfExpression(expression), node) // : node; // } // @api - shared Factory::createVoidExpression(shared expression) { + node Factory::createVoidExpression(node expression) { auto node = createBaseExpression(SyntaxKind::VoidExpression); node->expression = parenthesizer.parenthesizeOperandOfPrefixUnary(expression); node->transformFlags |= propagateChildFlags(node->expression); @@ -2071,14 +2072,14 @@ namespace tr { } // // @api -// function updateVoidExpression(node: VoidExpression, shared expression) { +// function updateVoidExpression(node: VoidExpression, tr::node expression) { // return node->expression != expression // ? update(createVoidExpression(expression), node) // : node; // } // @api - shared Factory::createAwaitExpression(shared expression) { + node Factory::createAwaitExpression(node expression) { auto node = createBaseExpression(SyntaxKind::AwaitExpression); node->expression = parenthesizer.parenthesizeOperandOfPrefixUnary(expression); node->transformFlags |= @@ -2090,14 +2091,14 @@ namespace tr { } // // @api -// function updateAwaitExpression(node: AwaitExpression, shared expression) { +// function updateAwaitExpression(node: AwaitExpression, tr::node expression) { // return node->expression != expression // ? update(createAwaitExpression(expression), node) // : node; // } // // @api - shared Factory::createPrefixUnaryExpression(SyntaxKind operatorKind, shared operand) { + node Factory::createPrefixUnaryExpression(SyntaxKind operatorKind, tr::node operand) { auto node = createBaseExpression(SyntaxKind::PrefixUnaryExpression); node->operatorKind = operatorKind; node->operand = parenthesizer.parenthesizeOperandOfPrefixUnary(operand); @@ -2121,7 +2122,7 @@ namespace tr { // } // @api - shared Factory::createPostfixUnaryExpression(shared operand, SyntaxKind operatorKind) { + node Factory::createPostfixUnaryExpression(node operand, SyntaxKind operatorKind) { auto node = createBaseExpression(SyntaxKind::PostfixUnaryExpression); node->operatorKind = operatorKind; node->operand = parenthesizer.parenthesizeOperandOfPostfixUnary(operand); @@ -2144,7 +2145,7 @@ namespace tr { // } // @api - shared Factory::createBinaryExpression(shared left, shared operatorNode, shared right) { + node Factory::createBinaryExpression(node left, tr::node operatorNode, tr::node right) { auto node = createBaseExpression(SyntaxKind::BinaryExpression); auto operatorKind = operatorNode->kind; node->left = parenthesizer.parenthesizeLeftSideOfBinary(operatorKind, left); @@ -2177,12 +2178,12 @@ namespace tr { return node; } - TransformFlags Factory::propagateAssignmentPatternFlags(shared node) { + TransformFlags Factory::propagateAssignmentPatternFlags(node node) { if (node->transformFlags & (int) TransformFlags::ContainsObjectRestOrSpread) return TransformFlags::ContainsObjectRestOrSpread; if (node->transformFlags & (int) TransformFlags::ContainsES2018) { // check for nested spread assignments, otherwise '{ x: { a, ...b } = foo } = c' // will not be correctly interpreted by the ES2018 transformer - for (auto &&element: getElementsOfBindingOrAssignmentPattern(node)->list) { + for (auto element: *getElementsOfBindingOrAssignmentPattern(node)) { auto target = getTargetOfBindingOrAssignmentElement(element); if (target && isAssignmentPattern(target)) { if (target->transformFlags & (int) TransformFlags::ContainsObjectRestOrSpread) { @@ -2208,7 +2209,7 @@ namespace tr { // } // @api - shared Factory::createConditionalExpression(shared condition, sharedOpt questionToken, shared whenTrue, sharedOpt colonToken, shared whenFalse) { + node Factory::createConditionalExpression(node condition, optionalNode questionToken, tr::node whenTrue, optionalNode colonToken, tr::node whenFalse) { auto node = createBaseExpression(SyntaxKind::ConditionalExpression); node->condition = parenthesizer.parenthesizeConditionOfConditionalExpression(condition); node->questionToken = questionToken ? questionToken : createToken(SyntaxKind::QuestionToken); @@ -2243,7 +2244,7 @@ namespace tr { // } // @api - shared Factory::createTemplateExpression(shared head, shared templateSpans) { + node Factory::createTemplateExpression(node head, tr::node templateSpans) { auto node = createBaseExpression(SyntaxKind::TemplateExpression); node->head = head; node->templateSpans = createNodeArray(templateSpans); @@ -2306,7 +2307,7 @@ namespace tr { // } // @api - shared Factory::createYieldExpression(sharedOpt asteriskToken, sharedOpt expression) { + node Factory::createYieldExpression(optionalNode asteriskToken, optionalNode expression) { Debug::asserts(!asteriskToken || !!expression, "A `YieldExpression` with an asteriskToken must have an expression."); auto node = createBaseExpression(SyntaxKind::YieldExpression); if (expression) node->expression = parenthesizer.parenthesizeExpressionForDisallowedComma(expression); @@ -2321,7 +2322,7 @@ namespace tr { } // // @api -// function updateYieldExpression(node: YieldExpression, sharedOpt asteriskToken, shared expression) { +// function updateYieldExpression(node: YieldExpression, optionalNode asteriskToken, tr::node expression) { // return node->expression != expression // || node->asteriskToken != asteriskToken // ? update(createYieldExpression(asteriskToken, expression), node) @@ -2329,7 +2330,7 @@ namespace tr { // } // @api - shared Factory::createSpreadElement(shared expression) { + node Factory::createSpreadElement(node expression) { auto node = createBaseExpression(SyntaxKind::SpreadElement); node->expression = parenthesizer.parenthesizeExpressionForDisallowedComma(expression); node->transformFlags |= @@ -2340,20 +2341,20 @@ namespace tr { } // // @api -// function updateSpreadElement(node: SpreadElement, shared expression) { +// function updateSpreadElement(node: SpreadElement, tr::node expression) { // return node->expression != expression // ? update(createSpreadElement(expression), node) // : node; // } // @api - shared Factory::createClassExpression( - sharedOpt decorators, - sharedOpt modifiers, + node Factory::createClassExpression( + optionalNode decorators, + optionalNode modifiers, NameType name, - sharedOpt typeParameters, - sharedOpt heritageClauses, - shared members + optionalNode typeParameters, + optionalNode heritageClauses, + node members ) { auto node = createBaseClassLikeDeclaration( SyntaxKind::ClassExpression, @@ -2371,12 +2372,12 @@ namespace tr { // // @api // function updateClassExpression( // node: ClassExpression, -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // name: Identifier | undefined, -// sharedOpt typeParameters, -// sharedOpt heritageClauses, -// shared members +// optionalNode typeParameters, +// optionalNode heritageClauses, +// node members // ) { // return node->decorators != decorators // || node->modifiers != modifiers @@ -2389,12 +2390,12 @@ namespace tr { // } // @api - shared Factory::createOmittedExpression() { + node Factory::createOmittedExpression() { return createBaseExpression(SyntaxKind::OmittedExpression); } // @api - shared Factory::createExpressionWithTypeArguments(shared expression, sharedOpt typeArguments) { + node Factory::createExpressionWithTypeArguments(node expression, optionalNode typeArguments) { auto node = createBaseNode(SyntaxKind::ExpressionWithTypeArguments); node->expression = parenthesizer.parenthesizeLeftSideOfAccess(expression); if (typeArguments) node->typeArguments = parenthesizer.parenthesizeTypeArguments(typeArguments); @@ -2406,7 +2407,7 @@ namespace tr { } // // @api -// function updateExpressionWithTypeArguments(node: ExpressionWithTypeArguments, shared expression, sharedOpt typeArguments) { +// function updateExpressionWithTypeArguments(node: ExpressionWithTypeArguments, tr::node expression, optionalNode typeArguments) { // return node->expression != expression // || node->typeArguments != typeArguments // ? update(createExpressionWithTypeArguments(expression, typeArguments), node) @@ -2414,7 +2415,7 @@ namespace tr { // } // @api - shared Factory::createAsExpression(shared expression, shared type) { + node Factory::createAsExpression(node expression, tr::node type) { auto node = createBaseExpression(SyntaxKind::AsExpression); node->expression = expression; node->type = type; @@ -2426,7 +2427,7 @@ namespace tr { } // @api - auto Factory::updateAsExpression(shared node, shared expression, shared type) { + auto Factory::updateAsExpression(node node, tr::node expression, tr::node type) { return node->expression != expression || node->type != type ? update(createAsExpression(expression, type), node) @@ -2434,7 +2435,7 @@ namespace tr { } // @api - shared Factory::createNonNullExpression(shared expression) { + node Factory::createNonNullExpression(node expression) { auto node = createBaseExpression(SyntaxKind::NonNullExpression); node->expression = parenthesizer.parenthesizeLeftSideOfAccess(expression); node->transformFlags |= @@ -2444,7 +2445,7 @@ namespace tr { } // @api - shared Factory::createNonNullChain(shared expression) { + node Factory::createNonNullChain(node expression) { auto node = createBaseExpression(SyntaxKind::NonNullExpression); node->flags |= (int) NodeFlags::OptionalChain; node->expression = parenthesizer.parenthesizeLeftSideOfAccess(expression); @@ -2455,7 +2456,7 @@ namespace tr { } // @api - auto Factory::updateNonNullChain(shared node, shared expression) { + auto Factory::updateNonNullChain(node node, tr::node expression) { Debug::asserts(!!(node->flags & (int) NodeFlags::OptionalChain), "Cannot update a NonNullExpression using updateNonNullChain. Use updateNonNullExpression instead."); return node->expression != expression ? update(createNonNullChain(expression), node) @@ -2463,7 +2464,7 @@ namespace tr { } // @api - auto Factory::updateNonNullExpression(shared node, shared expression) { + auto Factory::updateNonNullExpression(node node, tr::node expression) { if (isNonNullChain(node)) { return updateNonNullChain(node, expression); } @@ -2473,7 +2474,7 @@ namespace tr { } // @api - shared Factory::createMetaProperty(SyntaxKind keywordToken, shared name) { + node Factory::createMetaProperty(SyntaxKind keywordToken, tr::node name) { auto node = createBaseExpression(SyntaxKind::MetaProperty); node->keywordToken = keywordToken; node->name = name; @@ -2500,7 +2501,7 @@ namespace tr { // // // @api - shared Factory::createTemplateSpan(shared expression, shared literal) { + node Factory::createTemplateSpan(node expression, tr::node literal) { auto node = createBaseNode(SyntaxKind::TemplateSpan); node->expression = expression; node->literal = literal; @@ -2512,7 +2513,7 @@ namespace tr { } // // @api -// function updateTemplateSpan(node: TemplateSpan, shared expression, literal: TemplateMiddle | TemplateTail) { +// function updateTemplateSpan(node: TemplateSpan, tr::node expression, literal: TemplateMiddle | TemplateTail) { // return node->expression != expression // || node->literal != literal // ? update(createTemplateSpan(expression, literal), node) @@ -2520,7 +2521,7 @@ namespace tr { // } // // @api - shared Factory::createSemicolonClassElement() { + node Factory::createSemicolonClassElement() { auto node = createBaseNode(SyntaxKind::SemicolonClassElement); node->transformFlags |= (int) TransformFlags::ContainsES2015; return node; @@ -2531,7 +2532,7 @@ namespace tr { // // @api - shared Factory::createBlock(shared statements, bool multiLine) { + node Factory::createBlock(node statements, bool multiLine) { auto node = createBaseNode(SyntaxKind::Block); node->statements = createNodeArray(statements); node->multiLine = multiLine; @@ -2540,11 +2541,11 @@ namespace tr { } // @api - shared Factory::createVariableDeclarationList(shared declarations, int flags) { + node Factory::createVariableDeclarationList(node declarations, int flags) { auto node = createBaseNode(SyntaxKind::VariableDeclarationList); node->flags |= flags & (int) NodeFlags::BlockScoped; node->declarations = declarations; - for (auto &&d: declarations->list) d->setParent(node); + for (auto d: *declarations) d->setParent(node); node->transformFlags |= propagateChildrenFlags(node->declarations) | (int) TransformFlags::ContainsHoistedDeclarationOrCompletion; @@ -2564,7 +2565,7 @@ namespace tr { // } // @api - shared Factory::createVariableStatement(sharedOpt modifiers, shared declarationList) { + node Factory::createVariableStatement(optionalNode modifiers, tr::node declarationList) { auto node = createBaseDeclaration(SyntaxKind::VariableStatement, /*decorators*/ nullptr, modifiers); node->declarationList = declarationList; node->transformFlags |= @@ -2576,13 +2577,13 @@ namespace tr { } // // @api -// shared Factory::createVariableStatement(sharedOpt modifiers, variant, vector>> declarationList) { +// node Factory::createVariableStatement(optionalNode modifiers, variant, vector>> declarationList) { // auto node = createBaseDeclaration(SyntaxKind::VariableStatement, /*decorators*/ nullptr, modifiers); // -// if (holds_alternative>(declarationList)) { -// node->declarationList = get>(declarationList); +// if (holds_alternative>(declarationList)) { +// node->declarationList = get>(declarationList); // } else { -// node->declarationList = createVariableDeclarationList(get>>(declarationList)); +// node->declarationList = createVariableDeclarationList(get>>(declarationList)); // } // node->transformFlags |= // propagateChildFlags(node->declarationList); @@ -2593,7 +2594,7 @@ namespace tr { // } // // @api -// function updateVariableStatement(node: VariableStatement, sharedOpt modifiers, declarationList: VariableDeclarationList) { +// function updateVariableStatement(node: VariableStatement, optionalNode modifiers, declarationList: VariableDeclarationList) { // return node->modifiers != modifiers // || node->declarationList != declarationList // ? update(createVariableStatement(modifiers, declarationList), node) @@ -2601,12 +2602,12 @@ namespace tr { // } // @api - shared Factory::createEmptyStatement() { + node Factory::createEmptyStatement() { return createBaseNode(SyntaxKind::EmptyStatement); } - shared Factory::mergeEmitNode(shared sourceEmitNode, sharedOpt destEmitNode) { - if (!destEmitNode) destEmitNode = make_shared(); + node Factory::mergeEmitNode(node sourceEmitNode, optionalNode destEmitNode) { + if (!destEmitNode) destEmitNode = pool->construct(); // We are using `.slice()` here in case `destEmitNode.leadingComments` is pushed to later. if (sourceEmitNode->leadingComments) destEmitNode->leadingComments = addRange(slice(sourceEmitNode->leadingComments), destEmitNode->leadingComments); if (sourceEmitNode->trailingComments) destEmitNode->trailingComments = addRange(slice(sourceEmitNode->trailingComments), destEmitNode->trailingComments); @@ -2625,7 +2626,7 @@ namespace tr { } // @api - shared Factory::createExpressionStatement(shared expression) { + node Factory::createExpressionStatement(node expression) { auto node = createBaseNode(SyntaxKind::ExpressionStatement); node->expression = parenthesizer.parenthesizeExpressionOfExpressionStatement(expression); node->transformFlags |= propagateChildFlags(node->expression); @@ -2633,14 +2634,14 @@ namespace tr { } // // @api -// function updateExpressionStatement(node: ExpressionStatement, shared expression) { +// function updateExpressionStatement(node: ExpressionStatement, tr::node expression) { // return node->expression != expression // ? update(createExpressionStatement(expression), node) // : node; // } // // // @api -// function createIfStatement(shared expression, thenStatement: Statement, elseStatement?: Statement) { +// function createIfStatement(node expression, thenStatement: Statement, elseStatement?: Statement) { // auto node = createBaseNode(SyntaxKind::IfStatement); // node->expression = expression; // node->thenStatement = asEmbeddedStatement(thenStatement); @@ -2653,7 +2654,7 @@ namespace tr { // } // // // @api -// function updateIfStatement(node: IfStatement, shared expression, thenStatement: Statement, elseStatement: Statement | undefined) { +// function updateIfStatement(node: IfStatement, tr::node expression, thenStatement: Statement, elseStatement: Statement | undefined) { // return node->expression != expression // || node->thenStatement != thenStatement // || node->elseStatement != elseStatement @@ -2662,7 +2663,7 @@ namespace tr { // } // // // @api -// function createDoStatement(statement: Statement, shared expression) { +// function createDoStatement(statement: Statement, tr::node expression) { // auto node = createBaseNode(SyntaxKind::DoStatement); // node->statement = asEmbeddedStatement(statement); // node->expression = expression; @@ -2673,7 +2674,7 @@ namespace tr { // } // // // @api -// function updateDoStatement(node: DoStatement, statement: Statement, shared expression) { +// function updateDoStatement(node: DoStatement, statement: Statement, tr::node expression) { // return node->statement != statement // || node->expression != expression // ? update(createDoStatement(statement, expression), node) @@ -2681,7 +2682,7 @@ namespace tr { // } // // // @api -// function createWhileStatement(shared expression, statement: Statement) { +// function createWhileStatement(node expression, statement: Statement) { // auto node = createBaseNode(SyntaxKind::WhileStatement); // node->expression = expression; // node->statement = asEmbeddedStatement(statement); @@ -2692,7 +2693,7 @@ namespace tr { // } // // // @api -// function updateWhileStatement(node: WhileStatement, shared expression, statement: Statement) { +// function updateWhileStatement(node: WhileStatement, tr::node expression, statement: Statement) { // return node->expression != expression // || node->statement != statement // ? update(createWhileStatement(expression, statement), node) @@ -2725,7 +2726,7 @@ namespace tr { // } // // // @api -// function createForInStatement(initializer: ForInitializer, shared expression, statement: Statement) { +// function createForInStatement(initializer: ForInitializer, tr::node expression, statement: Statement) { // auto node = createBaseNode(SyntaxKind::ForInStatement); // node->initializer = initializer; // node->expression = expression; @@ -2738,7 +2739,7 @@ namespace tr { // } // // // @api -// function updateForInStatement(node: ForInStatement, initializer: ForInitializer, shared expression, statement: Statement) { +// function updateForInStatement(node: ForInStatement, initializer: ForInitializer, tr::node expression, statement: Statement) { // return node->initializer != initializer // || node->expression != expression // || node->statement != statement @@ -2747,7 +2748,7 @@ namespace tr { // } // // // @api -// function createForOfStatement(awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, shared expression, statement: Statement) { +// function createForOfStatement(awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, tr::node expression, statement: Statement) { // auto node = createBaseNode(SyntaxKind::ForOfStatement); // node->awaitModifier = awaitModifier; // node->initializer = initializer; @@ -2764,7 +2765,7 @@ namespace tr { // } // // // @api -// function updateForOfStatement(node: ForOfStatement, awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, shared expression, statement: Statement) { +// function updateForOfStatement(node: ForOfStatement, awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, tr::node expression, statement: Statement) { // return node->awaitModifier != awaitModifier // || node->initializer != initializer // || node->expression != expression @@ -2820,14 +2821,14 @@ namespace tr { // } // // // @api -// function updateReturnStatement(node: ReturnStatement, sharedOpt expression) { +// function updateReturnStatement(node: ReturnStatement, optionalNode expression) { // return node->expression != expression // ? update(createReturnStatement(expression), node) // : node; // } // // // @api -// function createWithStatement(shared expression, statement: Statement) { +// function createWithStatement(node expression, statement: Statement) { // auto node = createBaseNode(SyntaxKind::WithStatement); // node->expression = expression; // node->statement = asEmbeddedStatement(statement); @@ -2838,7 +2839,7 @@ namespace tr { // } // // // @api -// function updateWithStatement(node: WithStatement, shared expression, statement: Statement) { +// function updateWithStatement(node: WithStatement, tr::node expression, statement: Statement) { // return node->expression != expression // || node->statement != statement // ? update(createWithStatement(expression, statement), node) @@ -2846,7 +2847,7 @@ namespace tr { // } // // // @api -// function createSwitchStatement(shared expression, caseBlock: CaseBlock): SwitchStatement { +// function createSwitchStatement(node expression, caseBlock: CaseBlock): SwitchStatement { // auto node = createBaseNode(SyntaxKind::SwitchStatement); // node->expression = parenthesizer.parenthesizeExpressionForDisallowedComma(expression); // node->caseBlock = caseBlock; @@ -2857,7 +2858,7 @@ namespace tr { // } // // // @api -// function updateSwitchStatement(node: SwitchStatement, shared expression, caseBlock: CaseBlock) { +// function updateSwitchStatement(node: SwitchStatement, tr::node expression, caseBlock: CaseBlock) { // return node->expression != expression // || node->caseBlock != caseBlock // ? update(createSwitchStatement(expression, caseBlock), node) @@ -2865,7 +2866,7 @@ namespace tr { // } // // @api - shared Factory::createLabeledStatement(NameType label, shared statement) { + node Factory::createLabeledStatement(NameType label, tr::node statement) { auto node = createBaseNode(SyntaxKind::LabeledStatement); node->label = to(asName(label)); node->statement = asEmbeddedStatement(statement); @@ -2884,7 +2885,7 @@ namespace tr { // } // // // @api -// function createThrowStatement(shared expression) { +// function createThrowStatement(node expression) { // auto node = createBaseNode(SyntaxKind::ThrowStatement); // node->expression = expression; // node->transformFlags |= propagateChildFlags(node->expression); @@ -2892,7 +2893,7 @@ namespace tr { // } // // // @api -// function updateThrowStatement(node: ThrowStatement, shared expression) { +// function updateThrowStatement(node: ThrowStatement, tr::node expression) { // return node->expression != expression // ? update(createThrowStatement(expression), node) // : node; @@ -2926,7 +2927,7 @@ namespace tr { // } // // @api - shared Factory::createVariableDeclaration(NameType name, sharedOpt exclamationToken, sharedOpt type, sharedOpt initializer) { + node Factory::createVariableDeclaration(NameType name, optionalNode exclamationToken, optionalNode type, optionalNode initializer) { ZoneScoped; auto node = createBaseVariableLikeDeclaration( SyntaxKind::VariableDeclaration, @@ -2945,7 +2946,7 @@ namespace tr { } // // @api -// function updateVariableDeclaration(node: VariableDeclaration, name: BindingName, exclamationToken: ExclamationToken | undefined, sharedOpt type, sharedOpt initializer) { +// function updateVariableDeclaration(node: VariableDeclaration, name: BindingName, exclamationToken: ExclamationToken | undefined, optionalNode type, optionalNode initializer) { // return node->name != name // || node->type != type // || node->exclamationToken != exclamationToken @@ -2963,15 +2964,15 @@ namespace tr { // } // @api - shared Factory::createFunctionDeclaration( - sharedOpt decorators, - sharedOpt modifiers, - sharedOpt asteriskToken, + node Factory::createFunctionDeclaration( + optionalNode decorators, + optionalNode modifiers, + optionalNode asteriskToken, NameType name, - sharedOpt typeParameters, - shared parameters, - sharedOpt type, - sharedOpt body + optionalNode typeParameters, + node parameters, + optionalNode type, + optionalNode body ) { auto node = createBaseFunctionLikeDeclaration( SyntaxKind::FunctionDeclaration, @@ -3006,14 +3007,14 @@ namespace tr { // // @api // function updateFunctionDeclaration( // node: FunctionDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, -// sharedOpt asteriskToken, +// optionalNode decorators, +// optionalNode modifiers, +// optionalNode asteriskToken, // name: Identifier | undefined, -// sharedOpt typeParameters, -// shared parameters, -// sharedOpt type, -// sharedOpt body +// optionalNode typeParameters, +// node parameters, +// optionalNode type, +// optionalNode body // ) { // return node->decorators != decorators // || node->modifiers != modifiers @@ -3028,13 +3029,13 @@ namespace tr { // } // // @api - shared Factory::createClassDeclaration( - sharedOpt decorators, - sharedOpt modifiers, + node Factory::createClassDeclaration( + optionalNode decorators, + optionalNode modifiers, NameType name, - sharedOpt typeParameters, - sharedOpt heritageClauses, - shared members + optionalNode typeParameters, + optionalNode heritageClauses, + node members ) { auto node = createBaseClassLikeDeclaration( SyntaxKind::ClassDeclaration, @@ -3059,12 +3060,12 @@ namespace tr { // // @api // function updateClassDeclaration( // node: ClassDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // name: Identifier | undefined, -// sharedOpt typeParameters, -// sharedOpt heritageClauses, -// shared members +// optionalNode typeParameters, +// optionalNode heritageClauses, +// node members // ) { // return node->decorators != decorators // || node->modifiers != modifiers @@ -3078,11 +3079,11 @@ namespace tr { // // // @api // function createInterfaceDeclaration( -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // name: string | Identifier, -// sharedOpt typeParameters, -// sharedOpt heritageClauses, +// optionalNode typeParameters, +// optionalNode heritageClauses, // members: readonly TypeElement[] // ) { // auto node = createBaseInterfaceOrClassLikeDeclaration( @@ -3101,11 +3102,11 @@ namespace tr { // // @api // function updateInterfaceDeclaration( // node: InterfaceDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // name: Identifier, -// sharedOpt typeParameters, -// sharedOpt heritageClauses, +// optionalNode typeParameters, +// optionalNode heritageClauses, // members: readonly TypeElement[] // ) { // return node->decorators != decorators @@ -3120,11 +3121,11 @@ namespace tr { // // // @api // function createTypeAliasDeclaration( -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // name: string | Identifier, -// sharedOpt typeParameters, -// shared type +// optionalNode typeParameters, +// node type // ) { // auto node = createBaseGenericNamedDeclaration( // SyntaxKind::TypeAliasDeclaration, @@ -3141,11 +3142,11 @@ namespace tr { // // @api // function updateTypeAliasDeclaration( // node: TypeAliasDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // name: Identifier, -// sharedOpt typeParameters, -// shared type +// optionalNode typeParameters, +// node type // ) { // return node->decorators != decorators // || node->modifiers != modifiers @@ -3158,8 +3159,8 @@ namespace tr { // // // @api // function createEnumDeclaration( -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // name: string | Identifier, // members: readonly EnumMember[] // ) { @@ -3180,8 +3181,8 @@ namespace tr { // // @api // function updateEnumDeclaration( // node: EnumDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // name: Identifier, // members: readonly EnumMember[]) { // return node->decorators != decorators @@ -3194,8 +3195,8 @@ namespace tr { // // // @api // function createModuleDeclaration( -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // name: ModuleName, // body: ModuleBody | undefined, // flags = NodeFlags::None @@ -3224,8 +3225,8 @@ namespace tr { // // @api // function updateModuleDeclaration( // node: ModuleDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // name: ModuleName, // body: ModuleBody | undefined // ) { @@ -3288,8 +3289,8 @@ namespace tr { // // // @api // function createImportEqualsDeclaration( -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // isTypeOnly: boolean, // name: string | Identifier, // moduleReference: ModuleReference @@ -3311,8 +3312,8 @@ namespace tr { // // @api // function updateImportEqualsDeclaration( // node: ImportEqualsDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // isTypeOnly: boolean, // name: Identifier, // moduleReference: ModuleReference @@ -3328,8 +3329,8 @@ namespace tr { // // // @api // function createImportDeclaration( -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // importClause: ImportClause | undefined, // moduleSpecifier: Expression, // assertClause: AssertClause | undefined @@ -3352,8 +3353,8 @@ namespace tr { // // @api // function updateImportDeclaration( // node: ImportDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // importClause: ImportClause | undefined, // moduleSpecifier: Expression, // assertClause: AssertClause | undefined @@ -3393,7 +3394,7 @@ namespace tr { // } // // @api - shared Factory::createAssertClause(shared elements, bool multiLine) { + node Factory::createAssertClause(node elements, bool multiLine) { auto node = createBaseNode(SyntaxKind::AssertClause); node->elements = createNodeArray(elements); node->multiLine = multiLine; @@ -3410,7 +3411,7 @@ namespace tr { // } // // @api - shared Factory::createAssertEntry(shared name, shared value) { + node Factory::createAssertEntry(node name, tr::node value) { auto node = createBaseNode(SyntaxKind::AssertEntry); node->name = name; node->value = value; @@ -3427,7 +3428,7 @@ namespace tr { // } // @api - shared Factory::createImportTypeAssertionContainer(shared clause, bool multiLine) { + node Factory::createImportTypeAssertionContainer(node clause, bool multiLine) { auto node = createBaseNode(SyntaxKind::ImportTypeAssertionContainer); node->assertClause = clause; node->multiLine = multiLine; @@ -3516,10 +3517,10 @@ namespace tr { // // // @api // function createExportAssignment( -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // isExportEquals: boolean | undefined, -// shared expression +// node expression // ) { // auto node = createBaseDeclaration( // SyntaxKind::ExportAssignment, @@ -3538,9 +3539,9 @@ namespace tr { // // @api // function updateExportAssignment( // node: ExportAssignment, -// sharedOpt decorators, -// sharedOpt modifiers, -// shared expression +// optionalNode decorators, +// optionalNode modifiers, +// node expression // ) { // return node->decorators != decorators // || node->modifiers != modifiers @@ -3551,8 +3552,8 @@ namespace tr { // // // @api // function createExportDeclaration( -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // isTypeOnly: boolean, // exportClause: NamedExportBindings | undefined, // moduleSpecifier?: Expression, @@ -3577,8 +3578,8 @@ namespace tr { // // @api // function updateExportDeclaration( // node: ExportDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // isTypeOnly: boolean, // exportClause: NamedExportBindings | undefined, // moduleSpecifier: Expression | undefined, @@ -3633,7 +3634,7 @@ namespace tr { // } // // @api - shared Factory::createMissingDeclaration() { + node Factory::createMissingDeclaration() { auto node = createBaseDeclaration( SyntaxKind::MissingDeclaration, /*decorators*/ nullptr, @@ -3647,7 +3648,7 @@ namespace tr { // // // // // @api -// function createExternalModuleReference(shared expression) { +// function createExternalModuleReference(node expression) { // auto node = createBaseNode(SyntaxKind::ExternalModuleReference); // node->expression = expression; // node->transformFlags |= propagateChildFlags(node->expression); @@ -3656,7 +3657,7 @@ namespace tr { // } // // // @api -// function updateExternalModuleReference(node: ExternalModuleReference, shared expression) { +// function updateExternalModuleReference(node: ExternalModuleReference, tr::node expression) { // return node->expression != expression // ? update(createExternalModuleReference(expression), node) // : node; @@ -3676,7 +3677,7 @@ namespace tr { // // @api // // createJSDocNullableType // // createJSDocNonNullableType -// function createJSDocPrePostfixUnaryTypeWorker type; readonly postfix: boolean }>(SyntaxKind kind, type: T["type"], postfix = false): T { +// function createJSDocPrePostfixUnaryTypeWorker type; readonly postfix: boolean }>(SyntaxKind kind, type: T["type"], postfix = false): T { // auto node = createJSDocUnaryTypeWorker( // kind, // postfix ? type && parenthesizer.parenthesizeNonArrayTypeOfPostfixType(type) : type @@ -3689,7 +3690,7 @@ namespace tr { // // createJSDocOptionalType // // createJSDocVariadicType // // createJSDocNamepathType -// function createJSDocUnaryTypeWorker type; }>(SyntaxKind kind, type: T["type"]): T { +// function createJSDocUnaryTypeWorker type; }>(SyntaxKind kind, type: T["type"]): T { // auto node = createBaseNode(kind); // node->type = type; // return node; @@ -3698,7 +3699,7 @@ namespace tr { // // @api // // updateJSDocNonNullableType // // updateJSDocNullableType -// function updateJSDocPrePostfixUnaryTypeWorker type; readonly postfix: boolean; }>(SyntaxKind kind, node: T, type: T["type"]): T { +// function updateJSDocPrePostfixUnaryTypeWorker type; readonly postfix: boolean; }>(SyntaxKind kind, node: T, type: T["type"]): T { // return node->type != type // ? update(createJSDocPrePostfixUnaryTypeWorker(kind, type, node->postfix), node) // : node; @@ -3708,14 +3709,14 @@ namespace tr { // // updateJSDocOptionalType // // updateJSDocVariadicType // // updateJSDocNamepathType -// function updateJSDocUnaryTypeWorker type; }>(SyntaxKind kind, node: T, type: T["type"]): T { +// function updateJSDocUnaryTypeWorker type; }>(SyntaxKind kind, node: T, type: T["type"]): T { // return node->type != type // ? update(createJSDocUnaryTypeWorker(kind, type), node) // : node; // } // // // @api -// function createJSDocFunctionType(shared parameters, sharedOpt type): JSDocFunctionType { +// function createJSDocFunctionType(node parameters, optionalNode type): JSDocFunctionType { // auto node = createBaseSignatureDeclaration( // SyntaxKind::JSDocFunctionType, // /*decorators*/ nullptr, @@ -3729,7 +3730,7 @@ namespace tr { // } // // // @api -// function updateJSDocFunctionType(node: JSDocFunctionType, shared parameters, sharedOpt type): JSDocFunctionType { +// function updateJSDocFunctionType(node: JSDocFunctionType, tr::node parameters, optionalNode type): JSDocFunctionType { // return node->parameters != parameters // || node->type != type // ? update(createJSDocFunctionType(parameters, type), node) @@ -3753,14 +3754,14 @@ namespace tr { // } // // // @api -// function createJSDocTypeExpression(shared type): JSDocTypeExpression { +// function createJSDocTypeExpression(node type): JSDocTypeExpression { // auto node = createBaseNode(SyntaxKind::JSDocTypeExpression); // node->type = type; // return node; // } // // // @api -// function updateJSDocTypeExpression(node: JSDocTypeExpression, shared type): JSDocTypeExpression { +// function updateJSDocTypeExpression(node: JSDocTypeExpression, tr::node type): JSDocTypeExpression { // return node->type != type // ? update(createJSDocTypeExpression(type), node) // : node; @@ -4126,7 +4127,7 @@ namespace tr { // // // // @api - shared Factory::createJsxElement(shared openingElement, shared children, shared closingElement) { + node Factory::createJsxElement(node openingElement, tr::node children, tr::node closingElement) { auto node = createBaseNode(SyntaxKind::JsxElement); node->openingElement = openingElement; node->children = createNodeArray(children); @@ -4149,7 +4150,7 @@ namespace tr { // } // @api - shared Factory::createJsxSelfClosingElement(shared tagName, sharedOpt typeArguments, shared attributes) { + node Factory::createJsxSelfClosingElement(node tagName, optionalNode typeArguments, tr::node attributes) { auto node = createBaseNode(SyntaxKind::JsxSelfClosingElement); node->tagName = tagName; node->typeArguments = asNodeArray(typeArguments); @@ -4166,7 +4167,7 @@ namespace tr { } // // // @api -// function updateJsxSelfClosingElement(node: JsxSelfClosingElement, tagName: JsxTagNameExpression, sharedOpt typeArguments, attributes: JsxAttributes) { +// function updateJsxSelfClosingElement(node: JsxSelfClosingElement, tagName: JsxTagNameExpression, optionalNode typeArguments, attributes: JsxAttributes) { // return node->tagName != tagName // || node->typeArguments != typeArguments // || node->attributes != attributes @@ -4175,7 +4176,7 @@ namespace tr { // } // // @api - shared Factory::createJsxOpeningElement(shared tagName, sharedOpt typeArguments, shared attributes) { + node Factory::createJsxOpeningElement(node tagName, optionalNode typeArguments, tr::node attributes) { auto node = createBaseNode(SyntaxKind::JsxOpeningElement); node->tagName = tagName; node->typeArguments = asNodeArray(typeArguments); @@ -4192,7 +4193,7 @@ namespace tr { } // // // @api -// function updateJsxOpeningElement(node: JsxOpeningElement, tagName: JsxTagNameExpression, sharedOpt typeArguments, attributes: JsxAttributes) { +// function updateJsxOpeningElement(node: JsxOpeningElement, tagName: JsxTagNameExpression, optionalNode typeArguments, attributes: JsxAttributes) { // return node->tagName != tagName // || node->typeArguments != typeArguments // || node->attributes != attributes @@ -4201,7 +4202,7 @@ namespace tr { // } // // @api - shared Factory::createJsxClosingElement(shared tagName) { + node Factory::createJsxClosingElement(node tagName) { auto node = createBaseNode(SyntaxKind::JsxClosingElement); node->tagName = tagName; node->transformFlags |= @@ -4218,7 +4219,7 @@ namespace tr { // } // @api - shared Factory::createJsxFragment(shared openingFragment, shared children, shared closingFragment) { + node Factory::createJsxFragment(node openingFragment, tr::node children, tr::node closingFragment) { auto node = createBaseNode(SyntaxKind::JsxFragment); node->openingFragment = openingFragment; node->children = createNodeArray(children); @@ -4250,21 +4251,21 @@ namespace tr { // } // // @api - shared Factory::createJsxOpeningFragment() { + node Factory::createJsxOpeningFragment() { auto node = createBaseNode(SyntaxKind::JsxOpeningFragment); node->transformFlags |= (int) TransformFlags::ContainsJsx; return node; } // @api - shared Factory::createJsxJsxClosingFragment() { + node Factory::createJsxJsxClosingFragment() { auto node = createBaseNode(SyntaxKind::JsxClosingFragment); node->transformFlags |= (int) TransformFlags::ContainsJsx; return node; } // @api - shared Factory::createJsxAttribute(shared name, sharedOpt initializer) { + node Factory::createJsxAttribute(node name, optionalNode initializer) { auto node = createBaseNode(SyntaxKind::JsxAttribute); node->name = name; node->initializer = initializer; @@ -4284,7 +4285,7 @@ namespace tr { // } // // @api - shared Factory::createJsxAttributes(shared properties) { + node Factory::createJsxAttributes(node properties) { auto node = createBaseNode(SyntaxKind::JsxAttributes); node->properties = createNodeArray(properties); node->transformFlags |= @@ -4301,7 +4302,7 @@ namespace tr { // } // @api - shared Factory::createJsxSpreadAttribute(shared expression) { + node Factory::createJsxSpreadAttribute(node expression) { auto node = createBaseNode(SyntaxKind::JsxSpreadAttribute); node->expression = expression; node->transformFlags |= @@ -4311,14 +4312,14 @@ namespace tr { } // // @api -// function updateJsxSpreadAttribute(node: JsxSpreadAttribute, shared expression) { +// function updateJsxSpreadAttribute(node: JsxSpreadAttribute, tr::node expression) { // return node->expression != expression // ? update(createJsxSpreadAttribute(expression), node) // : node; // } // // @api - shared Factory::createJsxExpression(sharedOpt dotDotDotToken, sharedOpt expression) { + node Factory::createJsxExpression(optionalNode dotDotDotToken, optionalNode expression) { auto node = createBaseNode(SyntaxKind::JsxExpression); node->dotDotDotToken = dotDotDotToken; node->expression = expression; @@ -4330,7 +4331,7 @@ namespace tr { } // // @api -// function updateJsxExpression(node: JsxExpression, sharedOpt expression) { +// function updateJsxExpression(node: JsxExpression, optionalNode expression) { // return node->expression != expression // ? update(createJsxExpression(node->dotDotDotToken, expression), node) // : node; @@ -4341,7 +4342,7 @@ namespace tr { // // // // // @api -// function createCaseClause(shared expression, statements: readonly Statement[]) { +// function createCaseClause(node expression, statements: readonly Statement[]) { // auto node = createBaseNode(SyntaxKind::CaseClause); // node->expression = parenthesizer.parenthesizeExpressionForDisallowedComma(expression); // node->statements = createNodeArray(statements); @@ -4352,7 +4353,7 @@ namespace tr { // } // // // @api -// function updateCaseClause(node: CaseClause, shared expression, statements: readonly Statement[]) { +// function updateCaseClause(node: CaseClause, tr::node expression, statements: readonly Statement[]) { // return node->expression != expression // || node->statements != statements // ? update(createCaseClause(expression, statements), node) @@ -4375,7 +4376,7 @@ namespace tr { // } // @api - shared Factory::createHeritageClause(SyntaxKind token, shared types) { + node Factory::createHeritageClause(SyntaxKind token, tr::node types) { auto node = createBaseNode(SyntaxKind::HeritageClause); node->token = token; node->types = createNodeArray(types); @@ -4430,7 +4431,7 @@ namespace tr { // // // // @api - shared Factory::createPropertyAssignment(NameType name, shared initializer) { + node Factory::createPropertyAssignment(NameType name, tr::node initializer) { auto node = createBaseNamedDeclaration( SyntaxKind::PropertyAssignment, /*decorators*/ nullptr, @@ -4462,7 +4463,7 @@ namespace tr { // } // // @api - shared Factory::createShorthandPropertyAssignment(NameType name, sharedOpt objectAssignmentInitializer) { + node Factory::createShorthandPropertyAssignment(NameType name, optionalNode objectAssignmentInitializer) { auto node = createBaseNamedDeclaration( SyntaxKind::ShorthandPropertyAssignment, /*decorators*/ nullptr, @@ -4495,7 +4496,7 @@ namespace tr { // } // // @api - shared Factory::createSpreadAssignment(shared expression) { + node Factory::createSpreadAssignment(node expression) { auto node = createBaseNode(SyntaxKind::SpreadAssignment); node->expression = parenthesizer.parenthesizeExpressionForDisallowedComma(expression); node->transformFlags |= @@ -4506,7 +4507,7 @@ namespace tr { } // // @api -// function updateSpreadAssignment(node: SpreadAssignment, shared expression) { +// function updateSpreadAssignment(node: SpreadAssignment, tr::node expression) { // return node->expression != expression // ? update(createSpreadAssignment(expression), node) // : node; @@ -4529,7 +4530,7 @@ namespace tr { // } // // // @api -// function updateEnumMember(node: EnumMember, name: PropertyName, sharedOpt initializer) { +// function updateEnumMember(node: EnumMember, name: PropertyName, optionalNode initializer) { // return node->name != name // || node->initializer != initializer // ? update(createEnumMember(name, initializer), node) @@ -4727,7 +4728,7 @@ namespace tr { * @param original The original outer expression. */ // @api - shared Factory::createPartiallyEmittedExpression(shared expression, sharedOpt original) { + node Factory::createPartiallyEmittedExpression(node expression, optionalNode original) { auto node = createBaseNode(SyntaxKind::PartiallyEmittedExpression); node->expression = expression; node->original = original; @@ -4739,7 +4740,7 @@ namespace tr { } // @api - auto Factory::updatePartiallyEmittedExpression(shared node, shared expression) { + auto Factory::updatePartiallyEmittedExpression(node node, tr::node expression) { return node->expression != expression ? update(createPartiallyEmittedExpression(expression, node->original), node) : node; @@ -4797,7 +4798,7 @@ namespace tr { // } // // // @api -// function createSyntheticReferenceExpression(shared expression, thisArg: Expression) { +// function createSyntheticReferenceExpression(node expression, thisArg: Expression) { // auto node = createBaseNode(SyntaxKind::SyntheticReferenceExpression); // node->expression = expression; // node->thisArg = thisArg; @@ -4808,7 +4809,7 @@ namespace tr { // } // // // @api -// function updateSyntheticReferenceExpression(node: SyntheticReferenceExpression, shared expression, thisArg: Expression) { +// function updateSyntheticReferenceExpression(node: SyntheticReferenceExpression, tr::node expression, thisArg: Expression) { // return node->expression != expression // || node->thisArg != thisArg // ? update(createSyntheticReferenceExpression(expression, thisArg), node) @@ -4887,7 +4888,7 @@ namespace tr { // return createVoidExpression(createNumericLiteral("0")); // } // -// function createExportDefault(shared expression) { +// function createExportDefault(node expression) { // return createExportAssignment( // /*decorators*/ nullptr, // /*modifiers*/ nullptr, @@ -4969,7 +4970,7 @@ namespace tr { // return createGlobalMethodCall("Reflect", "set", receiver ? [target, propertyKey, value, receiver] : [target, propertyKey, value]); // } // -// function tryAddPropertyAssignment(properties: Push, propertyName: string, sharedOpt expression) { +// function tryAddPropertyAssignment(properties: Push, propertyName: string, optionalNode expression) { // if (expression) { // properties.push(createPropertyAssignment(propertyName, expression)); // return true; @@ -4992,7 +4993,7 @@ namespace tr { // return createObjectLiteralExpression(properties, !singleLine); // } - shared Factory::updateOuterExpression(shared outerExpression, shared expression) { + node Factory::updateOuterExpression(node outerExpression, tr::node expression) { switch (outerExpression->kind) { case SyntaxKind::ParenthesizedExpression:return updateParenthesizedExpression(to(outerExpression), expression); case SyntaxKind::TypeAssertionExpression:return updateTypeAssertion(to(outerExpression), to(outerExpression)->type, expression); @@ -5017,7 +5018,7 @@ namespace tr { * the expression to maintain precedence, a new parenthesized expression should be created automatically when * the containing expression is created/updated. */ - bool Factory::isIgnorableParen(shared node) { + bool Factory::isIgnorableParen(node node) { return isParenthesizedExpression(node) && nodeIsSynthesized(node) && nodeIsSynthesized(getSourceMapRange(node)) @@ -5026,7 +5027,7 @@ namespace tr { && !some(getSyntheticTrailingComments(node)); } - shared Factory::restoreOuterExpressions(sharedOpt outerExpression, shared innerExpression, int kinds) { + node Factory::restoreOuterExpressions(optionalNode outerExpression, tr::node innerExpression, int kinds) { if (isOuterExpression(outerExpression, kinds) && !isIgnorableParen(outerExpression)) { return updateOuterExpression( outerExpression, @@ -5076,7 +5077,7 @@ namespace tr { // } // } // -// function createCallBinding(shared expression, recordTempVariable: (temp: Identifier) => void, languageVersion?: ScriptTarget, cacheIdentifiers = false): CallBinding { +// function createCallBinding(node expression, recordTempVariable: (temp: Identifier) => void, languageVersion?: ScriptTarget, cacheIdentifiers = false): CallBinding { // auto callee = skipOuterExpressions(expression, OuterExpressionKinds::All); // let thisArg: Expression; // let target: LeftHandSideExpression; @@ -5145,7 +5146,7 @@ namespace tr { // return { target, thisArg }; // } // -// function createAssignmentTargetWrapper(paramName: Identifier, shared expression): LeftHandSideExpression { +// function createAssignmentTargetWrapper(paramName: Identifier, tr::node expression): LeftHandSideExpression { // return createPropertyAccessExpression( // // Explicit parens required because of v8 regression (https://bugs.chromium.org/p/v8/issues/detail?id=9560) // createParenthesizedExpression( @@ -5376,7 +5377,7 @@ namespace tr { // } // // /** -// * Lifts a shared containing only Statement nodes to a block. +// * Lifts a node containing only Statement nodes to a block. // * // * @param nodes The NodeArray. // */ diff --git a/src/factory.h b/src/factory.h index 94744a5..8038732 100644 --- a/src/factory.h +++ b/src/factory.h @@ -8,12 +8,15 @@ #include "scanner.h" #include "node_test.h" #include "parenthesizer.h" +#include "pool_band.h" namespace tr { struct Parenthesizer; struct Factory { + PoolBand *pool; + int nextAutoGenerateId = 0; /* @internal */ @@ -35,29 +38,29 @@ namespace tr { parenthesizer.factory = this; } - int propagatePropertyNameFlagsOfChild(shared &node, int transformFlags); + int propagatePropertyNameFlagsOfChild(node &node, int transformFlags); - int propagateChildFlags(sharedOpt child); + int propagateChildFlags(optionalNode child); - int propagateIdentifierNameFlags(shared node); + int propagateIdentifierNameFlags(node node); - int propagateChildrenFlags(const sharedOpt &children); + int propagateChildrenFlags(const optionalNode &children); - void aggregateChildrenFlags(const shared &children); + void aggregateChildrenFlags(const node &children); - shared createNodeArray(const sharedOpt &elements, bool hasTrailingComma = false); + node createNodeArray(const optionalNode &elements, bool hasTrailingComma = false); - sharedOpt asNodeArray(sharedOpt elements); + optionalNode asNodeArray(optionalNode elements); // template -// inline shared asNodeArray(const vector> &array) { +// inline node asNodeArray(const vector> &array) { // auto nodeArray = make_shared(); // for (auto &&node: array) nodeArray->list.push_back(node); // return nodeArray; // } // template -// sharedOpt asNodeArray(optional>> &array) { +// optionalNode asNodeArray(optional>> &array) { // if (!array) return nullptr; // // return asNodeArray(*array); @@ -65,7 +68,7 @@ namespace tr { // @api template - shared createNodeArray(const vector> &elements, bool hasTrailingComma = false) { + node createNodeArray(const vector> &elements, bool hasTrailingComma = false) { // Since the element list of a node array is typically created by starting with an empty array and // repeatedly calling push(), the list may not have the optimal memory layout. We invoke slice() for // small arrays (1 to 4 elements) to give the VM a chance to allocate an optimal representation. @@ -73,21 +76,21 @@ namespace tr { } template - shared createBaseNode() { - auto node = make_shared(); + node createBaseNode() { + auto node = pool->construct(); node->kind = (types::SyntaxKind) T::KIND; return node; } template - shared createBaseNode(SyntaxKind kind) { - auto node = make_shared(); + node createBaseNode(SyntaxKind kind) { + auto node = pool->construct(); node->kind = kind; return node; } template - shared createBaseToken(SyntaxKind kind) { + node createBaseToken(SyntaxKind kind) { return createBaseNode(kind); } @@ -95,24 +98,24 @@ namespace tr { // Literals // template - shared createBaseLiteral(SyntaxKind kind, string text) { + node createBaseLiteral(SyntaxKind kind, string text) { auto node = createBaseToken(kind); node->text = text; return node; } // @api - shared createNumericLiteral(string value, int numericLiteralFlags = (int) types::TokenFlags::None); + node createNumericLiteral(string value, int numericLiteralFlags = (int) types::TokenFlags::None); - shared createNumericLiteral(double value, types::TokenFlags numericLiteralFlags = types::TokenFlags::None); + node createNumericLiteral(double value, types::TokenFlags numericLiteralFlags = types::TokenFlags::None); // @api - shared createBigIntLiteral(variant value); + node createBigIntLiteral(variant value); - shared createBaseStringLiteral(string text, optional isSingleQuote = {}); + node createBaseStringLiteral(string text, optional isSingleQuote = {}); // @api - shared createStringLiteral(string text, optional isSingleQuote = {}, optional hasExtendedUnicodeEscape = {}); + node createStringLiteral(string text, optional isSingleQuote = {}, optional hasExtendedUnicodeEscape = {}); // // @api // function createToken(token: SyntaxKind::SuperKeyword): SuperExpression; @@ -127,7 +130,7 @@ namespace tr { // function createToken(token: TKind): Token; // function createToken(token: TKind): Token; template - shared createToken(SyntaxKind token) { + node createToken(SyntaxKind token) { ZoneScoped // Debug::asserts(token >= SyntaxKind::FirstToken && token <= SyntaxKind::LastToken, "Invalid token"); // Debug::asserts(token <= SyntaxKind::FirstTemplateToken || token >= SyntaxKind::LastTemplateToken, "Invalid token. Use 'createTemplateLiteralLikeNode' to create template literals."); @@ -186,41 +189,41 @@ namespace tr { // // @api - shared createSuper(); + node createSuper(); // @api - shared createThis(); + node createThis(); // @api - shared createNull(); + node createNull(); // @api - shared createTrue(); + node createTrue(); // @api - shared createFalse(); + node createFalse(); - shared createBooleanLiteral(bool v); + node createBooleanLiteral(bool v); - using NameType = variant>; + using NameType = variant>; - shared asName(NameType name = {}); + node asName(NameType name = {}); - sharedOpt asName(optional name = {}); + optionalNode asName(optional name = {}); - using ExpressionType = variant>; + using ExpressionType = variant>; - sharedOpt asExpression(ExpressionType value); + optionalNode asExpression(ExpressionType value); // function createBaseNode(kind: T["kind"]) { // return basecreateBaseNode(kind) as Mutable; // } // template - shared createBaseDeclaration( + node createBaseDeclaration( SyntaxKind kind, - sharedOpt decorators, - sharedOpt modifiers + optionalNode decorators, + optionalNode modifiers ) { auto node = createBaseNode(kind); node->decorators = asNodeArray(decorators); @@ -237,14 +240,14 @@ namespace tr { return node; } - void setName(shared &lName, shared rName); + void setName(node &lName, node rName); - void setName(shared &lName, shared rName); + void setName(node &lName, node rName); - void setName(shared &lName, shared rName); + void setName(node &lName, node rName); template - shared updateWithoutOriginal(shared updated, shared original) { + node updateWithoutOriginal(node updated, node original) { if (updated != original) { setTextRange(updated, original); } @@ -252,15 +255,15 @@ namespace tr { } template - shared update(shared updated, shared original) { + node update(node updated, node original) { return updateWithoutOriginal(updated, original); } template - shared createBaseNamedDeclaration( + node createBaseNamedDeclaration( SyntaxKind kind, - sharedOpt decorators, - sharedOpt modifiers, + optionalNode decorators, + optionalNode modifiers, optional _name ) { auto node = createBaseDeclaration( @@ -295,12 +298,12 @@ namespace tr { } template - shared createBaseGenericNamedDeclaration( + node createBaseGenericNamedDeclaration( SyntaxKind kind, - sharedOpt decorators, - sharedOpt modifiers, + optionalNode decorators, + optionalNode modifiers, NameType name, - sharedOpt typeParameters + optionalNode typeParameters ) { auto node = createBaseNamedDeclaration( kind, @@ -315,14 +318,14 @@ namespace tr { } template - shared createBaseSignatureDeclaration( + node createBaseSignatureDeclaration( SyntaxKind kind, - sharedOpt decorators, - sharedOpt modifiers, + optionalNode decorators, + optionalNode modifiers, NameType name, - sharedOpt typeParameters, - sharedOpt parameters, - sharedOpt type + optionalNode typeParameters, + optionalNode parameters, + optionalNode type ) { auto node = createBaseGenericNamedDeclaration( kind, @@ -347,14 +350,14 @@ namespace tr { // } template - shared createBaseFunctionLikeDeclaration( + node createBaseFunctionLikeDeclaration( SyntaxKind kind, - sharedOpt decorators, - sharedOpt modifiers, + optionalNode decorators, + optionalNode modifiers, NameType name, - sharedOpt typeParameters, - sharedOpt parameters, - sharedOpt type, + optionalNode typeParameters, + optionalNode parameters, + optionalNode type, decltype(declval().body) body ) { auto node = createBaseSignatureDeclaration( @@ -380,13 +383,13 @@ namespace tr { // } template - shared createBaseInterfaceOrClassLikeDeclaration( + node createBaseInterfaceOrClassLikeDeclaration( SyntaxKind kind, - sharedOpt decorators, - sharedOpt modifiers, + optionalNode decorators, + optionalNode modifiers, NameType name, - sharedOpt typeParameters, - sharedOpt heritageClauses + optionalNode typeParameters, + optionalNode heritageClauses ) { auto node = createBaseGenericNamedDeclaration( kind, @@ -401,14 +404,14 @@ namespace tr { } template - shared createBaseClassLikeDeclaration( + node createBaseClassLikeDeclaration( SyntaxKind kind, - sharedOpt decorators, - sharedOpt modifiers, + optionalNode decorators, + optionalNode modifiers, NameType name, - sharedOpt typeParameters, - sharedOpt heritageClauses, - shared members + optionalNode typeParameters, + optionalNode heritageClauses, + node members ) { auto node = createBaseInterfaceOrClassLikeDeclaration( kind, @@ -424,12 +427,12 @@ namespace tr { } template - shared createBaseBindingLikeDeclaration( + node createBaseBindingLikeDeclaration( SyntaxKind kind, - sharedOpt decorators, - sharedOpt modifiers, + optionalNode decorators, + optionalNode modifiers, optional name, - sharedOpt initializer + optionalNode initializer ) { auto node = createBaseNamedDeclaration( kind, @@ -443,13 +446,13 @@ namespace tr { } template - shared createBaseVariableLikeDeclaration( + node createBaseVariableLikeDeclaration( SyntaxKind kind, - sharedOpt decorators, - sharedOpt modifiers, + optionalNode decorators, + optionalNode modifiers, optional name, - sharedOpt type, - sharedOpt initializer + optionalNode type, + optionalNode initializer ) { auto node = createBaseBindingLikeDeclaration( kind, @@ -472,27 +475,27 @@ namespace tr { // } // // @api - shared createRegularExpressionLiteral(string text); + node createRegularExpressionLiteral(string text); // @api - shared createJsxText(string text, optional containsOnlyTriviaWhiteSpaces = {}); + node createJsxText(string text, optional containsOnlyTriviaWhiteSpaces = {}); // @api - shared createTemplateLiteralLikeNode(SyntaxKind kind, string text, optional rawText = {}, optional templateFlags = {}); + node createTemplateLiteralLikeNode(SyntaxKind kind, string text, optional rawText = {}, optional templateFlags = {}); // @api - shared createLiteralLikeNode(SyntaxKind kind, string text); + node createLiteralLikeNode(SyntaxKind kind, string text); // // // // Identifiers // // - shared createBaseIdentifier(string text, optional originalKeywordKind); + node createBaseIdentifier(string text, optional originalKeywordKind); - shared createBaseGeneratedIdentifier(string text, GeneratedIdentifierFlags autoGenerateFlags); + node createBaseGeneratedIdentifier(string text, GeneratedIdentifierFlags autoGenerateFlags); // @api - shared createIdentifier(string text, sharedOpt typeArguments = {}, optional originalKeywordKind = {}); + node createIdentifier(string text, optionalNode typeArguments = {}, optional originalKeywordKind = {}); // // // @api // function updateIdentifier(node: Identifier, typeArguments?: NodeArray | undefined): Identifier { @@ -538,7 +541,7 @@ namespace tr { // } // // @api - shared createPrivateIdentifier(string text); + node createPrivateIdentifier(string text); // // // // Punctuation @@ -579,7 +582,7 @@ namespace tr { // // // // @api - shared createQualifiedName(shared left, NameType right); + node createQualifiedName(node left, NameType right); // // @api // function updateQualifiedName(node: QualifiedName, left: EntityName, right: Identifier) { @@ -590,10 +593,10 @@ namespace tr { // } // // @api - shared createComputedPropertyName(shared expression); + node createComputedPropertyName(node expression); // // @api -// function updateComputedPropertyName(node: ComputedPropertyName, shared expression) { +// function updateComputedPropertyName(node: ComputedPropertyName, node expression) { // return node->expression != expression // ? update(createComputedPropertyName(expression), node) // : node; @@ -604,18 +607,18 @@ namespace tr { // // // // // @api -// function createTypeParameterDeclaration(sharedOpt modifiers, NameType name, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration; +// function createTypeParameterDeclaration(optionalNode modifiers, NameType name, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration; // /** @deprecated */ // function createTypeParameterDeclaration(NameType name, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration; - shared createTypeParameterDeclaration( - optional, shared, string>> modifiersOrName, - optional, shared, string>> nameOrConstraint, - sharedOpt constraintOrDefault, - sharedOpt defaultType = nullptr + node createTypeParameterDeclaration( + optional, node, string>> modifiersOrName, + optional, node, string>> nameOrConstraint, + optionalNode constraintOrDefault, + optionalNode defaultType = nullptr ); // // @api -// function updateTypeParameterDeclaration(node: TypeParameterDeclaration, sharedOpt modifiers, name: Identifier, constraint: TypeNode | undefined, defaultsharedOpt type): TypeParameterDeclaration; +// function updateTypeParameterDeclaration(node: TypeParameterDeclaration, optionalNode modifiers, name: Identifier, constraint: TypeNode | undefined, defaultsharedOpt type): TypeParameterDeclaration; // /** @deprecated */ // function updateTypeParameterDeclaration(node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultsharedOpt type): TypeParameterDeclaration; // function updateTypeParameterDeclaration(node: TypeParameterDeclaration, modifiersOrName: readonly Modifier[] | Identifier | undefined, nameOrConstraint: Identifier | TypeNode | undefined, constraintOrDefault: TypeNode | undefined, defaultType?: TypeNode | undefined) { @@ -641,26 +644,26 @@ namespace tr { // } // @api - shared createParameterDeclaration( - sharedOpt decorators, - sharedOpt modifiers, - sharedOpt dotDotDotToken = nullptr, + node createParameterDeclaration( + optionalNode decorators, + optionalNode modifiers, + optionalNode dotDotDotToken = nullptr, NameType name = "", - sharedOpt questionToken = nullptr, - sharedOpt type = nullptr, - sharedOpt initializer = nullptr + optionalNode questionToken = nullptr, + optionalNode type = nullptr, + optionalNode initializer = nullptr ); // // @api // function updateParameterDeclaration( // node: ParameterDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // dotDotDotToken: DotDotDotToken | undefined, // name: string | BindingName, -// sharedOpt questionToken, -// sharedOpt type, -// sharedOpt initializer +// optionalNode questionToken, +// optionalNode type, +// optionalNode initializer // ) { // return node->decorators != decorators // || node->modifiers != modifiers @@ -674,10 +677,10 @@ namespace tr { // } // // @api - shared createDecorator(shared expression); + node createDecorator(node expression); // // @api -// function updateDecorator(node: Decorator, shared expression) { +// function updateDecorator(node: Decorator, node expression) { // return node->expression != expression // ? update(createDecorator(expression), node) // : node; @@ -688,20 +691,20 @@ namespace tr { // // // // @api - shared createPropertySignature( - sharedOpt modifiers, + node createPropertySignature( + optionalNode modifiers, NameType name, - sharedOpt questionToken, - sharedOpt type + optionalNode questionToken, + optionalNode type ); // // @api // function updatePropertySignature( // node: PropertySignature, -// sharedOpt modifiers, +// optionalNode modifiers, // name: PropertyName, -// sharedOpt questionToken, -// sharedOpt type +// optionalNode questionToken, +// optionalNode type // ) { // return node->modifiers != modifiers // || node->name != name @@ -712,24 +715,24 @@ namespace tr { // } // @api - shared createPropertyDeclaration( - sharedOpt decorators, - sharedOpt modifiers, + node createPropertyDeclaration( + optionalNode decorators, + optionalNode modifiers, NameType name, - sharedOpt questionOrExclamationToken, - sharedOpt type, - sharedOpt initializer + optionalNode questionOrExclamationToken, + optionalNode type, + optionalNode initializer ); // // @api // function updatePropertyDeclaration( // node: PropertyDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // NameType name, // questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, -// sharedOpt type, -// sharedOpt initializer +// optionalNode type, +// optionalNode initializer // ) { // return node->decorators != decorators // || node->modifiers != modifiers @@ -743,24 +746,24 @@ namespace tr { // } // // @api - shared createMethodSignature( - sharedOpt modifiers, + node createMethodSignature( + optionalNode modifiers, NameType name, - sharedOpt questionToken, - sharedOpt typeParameters, - shared parameters, - sharedOpt type + optionalNode questionToken, + optionalNode typeParameters, + node parameters, + optionalNode type ); // // @api // function updateMethodSignature( // node: MethodSignature, -// sharedOpt modifiers, +// optionalNode modifiers, // name: PropertyName, -// sharedOpt questionToken, +// optionalNode questionToken, // typeParameters: NodeArray | undefined, // parameters: NodeArray, -// sharedOpt type +// optionalNode type // ) { // return node->modifiers != modifiers // || node->name != name @@ -773,30 +776,30 @@ namespace tr { // } // // @api - shared createMethodDeclaration( - sharedOpt decorators, - sharedOpt modifiers, - sharedOpt asteriskToken, + node createMethodDeclaration( + optionalNode decorators, + optionalNode modifiers, + optionalNode asteriskToken, NameType name, - sharedOpt questionToken, - sharedOpt typeParameters, - shared parameters, - sharedOpt type, - sharedOpt body + optionalNode questionToken, + optionalNode typeParameters, + node parameters, + optionalNode type, + optionalNode body ); // // @api // function updateMethodDeclaration( // node: MethodDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, -// sharedOpt asteriskToken, +// optionalNode decorators, +// optionalNode modifiers, +// optionalNode asteriskToken, // name: PropertyName, -// sharedOpt questionToken, -// sharedOpt typeParameters, -// shared parameters, -// sharedOpt type, -// sharedOpt body +// optionalNode questionToken, +// optionalNode typeParameters, +// node parameters, +// optionalNode type, +// optionalNode body // ) { // return node->decorators != decorators // || node->modifiers != modifiers @@ -812,18 +815,18 @@ namespace tr { // } // // @api - shared createClassStaticBlockDeclaration( - sharedOpt decorators, - sharedOpt modifiers, - shared body + node createClassStaticBlockDeclaration( + optionalNode decorators, + optionalNode modifiers, + node body ); // // // @api // function updateClassStaticBlockDeclaration( // node: ClassStaticBlockDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, -// shared block +// optionalNode decorators, +// optionalNode modifiers, +// node block // ): ClassStaticBlockDeclaration { // return node->decorators != decorators // || node->modifier != modifiers @@ -833,20 +836,20 @@ namespace tr { // } // @api - shared createConstructorDeclaration( - sharedOpt decorators, - sharedOpt modifiers, - shared parameters, - sharedOpt body + node createConstructorDeclaration( + optionalNode decorators, + optionalNode modifiers, + node parameters, + optionalNode body ); // // @api // function updateConstructorDeclaration( // node: ConstructorDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, -// shared parameters, -// sharedOpt body +// optionalNode decorators, +// optionalNode modifiers, +// node parameters, +// optionalNode body // ) { // return node->decorators != decorators // || node->modifiers != modifiers @@ -857,24 +860,24 @@ namespace tr { // } // // @api - shared createGetAccessorDeclaration( - sharedOpt decorators, - sharedOpt modifiers, + node createGetAccessorDeclaration( + optionalNode decorators, + optionalNode modifiers, NameType name, - shared parameters, - sharedOpt type, - sharedOpt body + node parameters, + optionalNode type, + optionalNode body ); // // @api // function updateGetAccessorDeclaration( // node: GetAccessorDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // name: PropertyName, -// shared parameters, -// sharedOpt type, -// sharedOpt body +// node parameters, +// optionalNode type, +// optionalNode body // ) { // return node->decorators != decorators // || node->modifiers != modifiers @@ -887,22 +890,22 @@ namespace tr { // } // @api - shared createSetAccessorDeclaration( - sharedOpt decorators, - sharedOpt modifiers, + node createSetAccessorDeclaration( + optionalNode decorators, + optionalNode modifiers, NameType name, - shared parameters, - sharedOpt body + node parameters, + optionalNode body ); // // @api // function updateSetAccessorDeclaration( // node: SetAccessorDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // name: PropertyName, -// shared parameters, -// sharedOpt body +// node parameters, +// optionalNode body // ) { // return node->decorators != decorators // || node->modifiers != modifiers @@ -914,10 +917,10 @@ namespace tr { // } // // @api - shared createCallSignature( - sharedOpt typeParameters, - shared parameters, - sharedOpt type + node createCallSignature( + optionalNode typeParameters, + node parameters, + optionalNode type ); // // @api @@ -925,7 +928,7 @@ namespace tr { // node: CallSignatureDeclaration, // typeParameters: NodeArray | undefined, // parameters: NodeArray, -// sharedOpt type +// optionalNode type // ) { // return node->typeParameters != typeParameters // || node->parameters != parameters @@ -935,10 +938,10 @@ namespace tr { // } // // @api - shared createConstructSignature( - sharedOpt typeParameters, - shared parameters, - sharedOpt type + node createConstructSignature( + optionalNode typeParameters, + node parameters, + optionalNode type ); // // // @api @@ -946,7 +949,7 @@ namespace tr { // node: ConstructSignatureDeclaration, // typeParameters: NodeArray | undefined, // parameters: NodeArray, -// sharedOpt type +// optionalNode type // ) { // return node->typeParameters != typeParameters // || node->parameters != parameters @@ -956,20 +959,20 @@ namespace tr { // } // // @api - shared createIndexSignature( - sharedOpt decorators, - sharedOpt modifiers, - shared parameters, - sharedOpt type + node createIndexSignature( + optionalNode decorators, + optionalNode modifiers, + node parameters, + optionalNode type ); // // @api // function updateIndexSignature( // node: IndexSignatureDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, -// shared parameters, -// shared type +// optionalNode decorators, +// optionalNode modifiers, +// node parameters, +// node type // ) { // return node->parameters != parameters // || node->type != type @@ -980,10 +983,10 @@ namespace tr { // } // @api - shared createTemplateLiteralTypeSpan(shared type, shared literal); + node createTemplateLiteralTypeSpan(node type, node literal); // // @api -// function updateTemplateLiteralTypeSpan(node: TemplateLiteralTypeSpan, shared type, literal: TemplateMiddle | TemplateTail) { +// function updateTemplateLiteralTypeSpan(node: TemplateLiteralTypeSpan, node type, literal: TemplateMiddle | TemplateTail) { // return node->type != type // || node->literal != literal // ? update(createTemplateLiteralTypeSpan(type, literal), node) @@ -1000,10 +1003,10 @@ namespace tr { // } // // @api - shared createTypePredicateNode(sharedOpt assertsModifier, NameType parameterName, sharedOpt type); + node createTypePredicateNode(optionalNode assertsModifier, NameType parameterName, optionalNode type); // // @api -// function updateTypePredicateNode(node: TypePredicateNode, assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode, sharedOpt type) { +// function updateTypePredicateNode(node: TypePredicateNode, assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode, optionalNode type) { // return node->assertsModifier != assertsModifier // || node->parameterName != parameterName // || node->type != type @@ -1012,7 +1015,7 @@ namespace tr { // } // @api - shared createTypeReferenceNode(NameType typeName, sharedOpt typeArguments); + node createTypeReferenceNode(NameType typeName, optionalNode typeArguments); // // @api // function updateTypeReferenceNode(node: TypeReferenceNode, typeName: EntityName, typeArguments: NodeArray | undefined) { @@ -1023,10 +1026,10 @@ namespace tr { // } // @api - shared createFunctionTypeNode( - sharedOpt typeParameters, - shared parameters, - sharedOpt type + node createFunctionTypeNode( + optionalNode typeParameters, + node parameters, + optionalNode type ); // // @api @@ -1034,7 +1037,7 @@ namespace tr { // node: FunctionTypeNode, // typeParameters: NodeArray | undefined, // parameters: NodeArray, -// sharedOpt type +// optionalNode type // ) { // return node->typeParameters != typeParameters // || node->parameters != parameters @@ -1050,18 +1053,18 @@ namespace tr { // Debug.fail("Incorrect number of arguments specified."); // } - shared createConstructorTypeNode1( - sharedOpt modifiers, - sharedOpt typeParameters, - shared parameters, - sharedOpt type + node createConstructorTypeNode1( + optionalNode modifiers, + optionalNode typeParameters, + node parameters, + optionalNode type ); // /** @deprecated */ // function createConstructorTypeNode2( -// sharedOpt typeParameters, -// shared parameters, -// sharedOpt type +// optionalNode typeParameters, +// node parameters, +// optionalNode type // ): ConstructorTypeNode { // return createConstructorTypeNode1(/*modifiers*/ nullptr, typeParameters, parameters, type); // } @@ -1075,10 +1078,10 @@ namespace tr { // // function updateConstructorTypeNode1( // node: ConstructorTypeNode, -// sharedOpt modifiers, +// optionalNode modifiers, // typeParameters: NodeArray | undefined, // parameters: NodeArray, -// sharedOpt type +// optionalNode type // ) { // return node->modifiers != modifiers // || node->typeParameters != typeParameters @@ -1093,13 +1096,13 @@ namespace tr { // node: ConstructorTypeNode, // typeParameters: NodeArray | undefined, // parameters: NodeArray, -// sharedOpt type +// optionalNode type // ) { // return updateConstructorTypeNode1(node, node->modifiers, typeParameters, parameters, type); // } // // @api - shared createTypeQueryNode(shared exprName, sharedOpt typeArguments); + node createTypeQueryNode(node exprName, optionalNode typeArguments); // // @api // function updateTypeQueryNode(node: TypeQueryNode, exprName: EntityName, typeArguments?: readonly TypeNode[]) { @@ -1110,7 +1113,7 @@ namespace tr { // } // // @api - shared createTypeLiteralNode(sharedOpt members); + node createTypeLiteralNode(optionalNode members); // // // @api // function updateTypeLiteralNode(node: TypeLiteralNode, members: NodeArray) { @@ -1120,17 +1123,17 @@ namespace tr { // } // @api - shared createArrayTypeNode(shared elementType); + node createArrayTypeNode(node elementType); // // @api -// function updateArrayTypeNode(node: ArrayTypeNode, shared elementType): ArrayTypeNode { +// function updateArrayTypeNode(node: ArrayTypeNode, node elementType): ArrayTypeNode { // return node->elementType != elementType // ? update(createArrayTypeNode(elementType), node) // : node; // } // // @api - shared createTupleTypeNode(shared elements); + node createTupleTypeNode(node elements); // // @api // function updateTupleTypeNode(node: TupleTypeNode, elements: readonly (TypeNode | NamedTupleMember)[]) { @@ -1140,10 +1143,10 @@ namespace tr { // } // // @api - shared createNamedTupleMember(sharedOpt dotDotDotToken, shared name, sharedOpt questionToken, shared type); + node createNamedTupleMember(optionalNode dotDotDotToken, node name, optionalNode questionToken, node type); // // @api -// function updateNamedTupleMember(node: NamedTupleMember, dotDotDotToken: DotDotDotToken | undefined, name: Identifier, sharedOpt questionToken, shared type) { +// function updateNamedTupleMember(node: NamedTupleMember, dotDotDotToken: DotDotDotToken | undefined, name: Identifier, optionalNode questionToken, node type) { // return node->dotDotDotToken != dotDotDotToken // || node->name != name // || node->questionToken != questionToken @@ -1153,7 +1156,7 @@ namespace tr { // } // // @api - shared createOptionalTypeNode(shared type) { + node createOptionalTypeNode(node type) { auto node = createBaseNode(SyntaxKind::OptionalType); node->type = parenthesizer.parenthesizeTypeOfOptionalType(type); node->transformFlags = (int)TransformFlags::ContainsTypeScript; @@ -1161,24 +1164,24 @@ namespace tr { } // // @api -// function updateOptionalTypeNode(node: OptionalTypeNode, shared type): OptionalTypeNode { +// function updateOptionalTypeNode(node: OptionalTypeNode, node type): OptionalTypeNode { // return node->type != type // ? update(createOptionalTypeNode(type), node) // : node; // } // // @api - shared createRestTypeNode(shared type); + node createRestTypeNode(node type); // // @api -// function updateRestTypeNode(node: RestTypeNode, shared type): RestTypeNode { +// function updateRestTypeNode(node: RestTypeNode, node type): RestTypeNode { // return node->type != type // ? update(createRestTypeNode(type), node) // : node; // } template - shared createUnionOrIntersectionTypeNode(SyntaxKind kind, shared types, function(shared)> parenthesize) { + node createUnionOrIntersectionTypeNode(SyntaxKind kind, node types, function(node)> parenthesize) { auto node = createBaseNode(kind); node->types = createNodeArray(parenthesize(types)); node->transformFlags = (int) TransformFlags::ContainsTypeScript; @@ -1192,7 +1195,7 @@ namespace tr { // } // @api - shared createUnionTypeNode(shared types); + node createUnionTypeNode(node types); // // @api // function updateUnionTypeNode(node: UnionTypeNode, types: NodeArray) { @@ -1200,7 +1203,7 @@ namespace tr { // } // @api - shared createIntersectionTypeNode(shared types); + node createIntersectionTypeNode(node types); // // @api // function updateIntersectionTypeNode(node: IntersectionTypeNode, types: NodeArray) { @@ -1208,7 +1211,7 @@ namespace tr { // } // @api - shared createConditionalTypeNode(shared checkType, shared extendsType, shared trueType, shared falseType); + node createConditionalTypeNode(node checkType, node extendsType, node trueType, node falseType); // // @api // function updateConditionalTypeNode(node: ConditionalTypeNode, checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode) { @@ -1221,7 +1224,7 @@ namespace tr { // } // // @api - shared createInferTypeNode(shared typeParameter); + node createInferTypeNode(node typeParameter); // // @api // function updateInferTypeNode(node: InferTypeNode, typeParameter: TypeParameterDeclaration) { @@ -1231,7 +1234,7 @@ namespace tr { // } // @api - shared createTemplateLiteralType(shared head, shared templateSpans); + node createTemplateLiteralType(node head, node templateSpans); // // @api // function updateTemplateLiteralType(node: TemplateLiteralTypeNode, head: TemplateHead, templateSpans: readonly TemplateLiteralTypeSpan[]) { @@ -1244,17 +1247,17 @@ namespace tr { // // @api // function createImportTypeNode(argument: TypeNode, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode; // function createImportTypeNode(argument: TypeNode, assertions?: ImportTypeAssertionContainer, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode; - shared createImportTypeNode( - shared argument, - optional, shared>> qualifierOrAssertions, - optional, shared>> typeArgumentsOrQualifier, - optional>> isTypeOfOrTypeArguments, + node createImportTypeNode( + node argument, + optional, node>> qualifierOrAssertions, + optional, node>> typeArgumentsOrQualifier, + optional>> isTypeOfOrTypeArguments, optional isTypeOf ); // // @api -// function updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, qualifier: EntityName | undefined, sharedOpt typeArguments, isTypeOf?: boolean | undefined): ImportTypeNode; -// function updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, assertions: ImportTypeAssertionContainer | undefined, qualifier: EntityName | undefined, sharedOpt typeArguments, isTypeOf?: boolean | undefined): ImportTypeNode; +// function updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, qualifier: EntityName | undefined, optionalNode typeArguments, isTypeOf?: boolean | undefined): ImportTypeNode; +// function updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, assertions: ImportTypeAssertionContainer | undefined, qualifier: EntityName | undefined, optionalNode typeArguments, isTypeOf?: boolean | undefined): ImportTypeNode; // function updateImportTypeNode( // node: ImportTypeNode, // argument: TypeNode, @@ -1279,30 +1282,30 @@ namespace tr { // } // @api - shared createParenthesizedType(shared type); + node createParenthesizedType(node type); // // @api -// function updateParenthesizedType(node: ParenthesizedTypeNode, shared type) { +// function updateParenthesizedType(node: ParenthesizedTypeNode, node type) { // return node->type != type // ? update(createParenthesizedType(type), node) // : node; // } // @api - shared createThisTypeNode(); + node createThisTypeNode(); // @api - shared createTypeOperatorNode(SyntaxKind operatorKind, shared type); + node createTypeOperatorNode(SyntaxKind operatorKind, node type); // // @api -// function updateTypeOperatorNode(node: TypeOperatorNode, shared type) { +// function updateTypeOperatorNode(node: TypeOperatorNode, node type) { // return node->type != type // ? update(createTypeOperatorNode(node->operator, type), node) // : node; // } // @api - shared createIndexedAccessTypeNode(shared objectType, shared indexType); + node createIndexedAccessTypeNode(node objectType, node indexType); // // @api // function updateIndexedAccessTypeNode(node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode) { @@ -1313,17 +1316,17 @@ namespace tr { // } // @api - shared createMappedTypeNode( - sharedOpt readonlyToken, //: ReadonlyKeyword | PlusToken | MinusToken | undefined, - shared typeParameter, - sharedOpt nameType, - sharedOpt questionToken, //: QuestionToken | PlusToken | MinusToken | undefined, - sharedOpt type, - sharedOpt members + node createMappedTypeNode( + optionalNode readonlyToken, //: ReadonlyKeyword | PlusToken | MinusToken | undefined, + node typeParameter, + optionalNode nameType, + optionalNode questionToken, //: QuestionToken | PlusToken | MinusToken | undefined, + optionalNode type, + optionalNode members ); // // @api -// function updateMappedTypeNode(node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, namesharedOpt type, questionToken: QuestionToken | PlusToken | MinusToken | undefined, sharedOpt type, sharedOpt members): MappedTypeNode { +// function updateMappedTypeNode(node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, namesharedOpt type, questionToken: QuestionToken | PlusToken | MinusToken | undefined, optionalNode type, optionalNode members): MappedTypeNode { // return node->readonlyToken != readonlyToken // || node->typeParameter != typeParameter // || node->nameType != nameType @@ -1335,7 +1338,7 @@ namespace tr { // } // // @api - shared createLiteralTypeNode(shared literal); + node createLiteralTypeNode(node literal); // // @api // function updateLiteralTypeNode(node: LiteralTypeNode, literal: LiteralTypeNode["literal"]) { @@ -1349,7 +1352,7 @@ namespace tr { // // // // @api - shared createObjectBindingPattern(shared elements); + node createObjectBindingPattern(node elements); // // @api // function updateObjectBindingPattern(node: ObjectBindingPattern, elements: readonly BindingElement[]) { @@ -1359,7 +1362,7 @@ namespace tr { // } // // @api - shared createArrayBindingPattern(shared elements); + node createArrayBindingPattern(node elements); // // @api // function updateArrayBindingPattern(node: ArrayBindingPattern, elements: readonly ArrayBindingElement[]) { @@ -1369,15 +1372,15 @@ namespace tr { // } // // @api - shared createBindingElement( - sharedOpt dotDotDotToken, - optional>> propertyName = {}, - variant> name = "", - sharedOpt initializer = {} + node createBindingElement( + optionalNode dotDotDotToken, + optional>> propertyName = {}, + variant> name = "", + optionalNode initializer = {} ); // // @api -// function updateBindingElement(node: BindingElement, dotDotDotToken: DotDotDotToken | undefined, propertyName: PropertyName | undefined, name: BindingName, sharedOpt initializer) { +// function updateBindingElement(node: BindingElement, dotDotDotToken: DotDotDotToken | undefined, propertyName: PropertyName | undefined, name: BindingName, optionalNode initializer) { // return node->propertyName != propertyName // || node->dotDotDotToken != dotDotDotToken // || node->name != name @@ -1391,7 +1394,7 @@ namespace tr { // // template - shared createBaseExpression(SyntaxKind kind) { + node createBaseExpression(SyntaxKind kind) { ZoneScoped; auto node = createBaseNode(kind); // the following properties are commonly set by the checker/binder @@ -1399,7 +1402,7 @@ namespace tr { } // @api - shared createArrayLiteralExpression(sharedOpt elements, bool multiLine); + node createArrayLiteralExpression(optionalNode elements, bool multiLine); // // @api // function updateArrayLiteralExpression(node: ArrayLiteralExpression, elements: readonly Expression[]) { @@ -1409,7 +1412,7 @@ namespace tr { // } // @api - shared createObjectLiteralExpression(sharedOpt properties, bool multiLine); + node createObjectLiteralExpression(optionalNode properties, bool multiLine); // // @api // function updateObjectLiteralExpression(node: ObjectLiteralExpression, properties: readonly ObjectLiteralElementLike[]) { @@ -1419,13 +1422,13 @@ namespace tr { // } // // @api - shared createPropertyAccessExpression(shared expression, NameType _name); + node createPropertyAccessExpression(node expression, NameType _name); // @api - shared createPropertyAccessChain(shared expression, sharedOpt questionDotToken, NameType name); + node createPropertyAccessChain(node expression, optionalNode questionDotToken, NameType name); // // @api -// function updatePropertyAccessExpression(node: PropertyAccessExpression, shared expression, name: Identifier | PrivateIdentifier) { +// function updatePropertyAccessExpression(node: PropertyAccessExpression, node expression, name: Identifier | PrivateIdentifier) { // if (isPropertyAccessChain(node)) { // return updatePropertyAccessChain(node, expression, node->questionDotToken, cast(name, isIdentifier)); // } @@ -1437,7 +1440,7 @@ namespace tr { // // // // @api -// function updatePropertyAccessChain(node: PropertyAccessChain, shared expression, sharedOpt questionDotToken, name: Identifier | PrivateIdentifier) { +// function updatePropertyAccessChain(node: PropertyAccessChain, node expression, optionalNode questionDotToken, name: Identifier | PrivateIdentifier) { // Debug::asserts(!!(node->flags & NodeFlags::OptionalChain), "Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead."); // // Because we are updating an existing PropertyAccessChain we want to inherit its emitFlags // // instead of using the default from createPropertyAccess @@ -1449,10 +1452,10 @@ namespace tr { // } // // @api - shared createElementAccessExpression(shared expression, ExpressionType index); + node createElementAccessExpression(node expression, ExpressionType index); // // // @api -// function updateElementAccessExpression(node: ElementAccessExpression, shared expression, argumentExpression: Expression) { +// function updateElementAccessExpression(node: ElementAccessExpression, node expression, argumentExpression: Expression) { // if (isElementAccessChain(node)) { // return updateElementAccessChain(node, expression, node->questionDotToken, argumentExpression); // } @@ -1463,10 +1466,10 @@ namespace tr { // } // // @api - shared createElementAccessChain(shared expression, sharedOpt questionDotToken, ExpressionType index); + node createElementAccessChain(node expression, optionalNode questionDotToken, ExpressionType index); // // @api -// function updateElementAccessChain(node: ElementAccessChain, shared expression, sharedOpt questionDotToken, argumentExpression: Expression) { +// function updateElementAccessChain(node: ElementAccessChain, node expression, optionalNode questionDotToken, argumentExpression: Expression) { // Debug::asserts(!!(node->flags & NodeFlags::OptionalChain), "Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead."); // // Because we are updating an existing ElementAccessChain we want to inherit its emitFlags // // instead of using the default from createElementAccess @@ -1478,22 +1481,22 @@ namespace tr { // } // // @api - shared createCallExpression(shared expression, sharedOpt typeArguments, sharedOpt argumentsArray); + node createCallExpression(node expression, optionalNode typeArguments, optionalNode argumentsArray); // @api - shared createCallChain(shared expression, sharedOpt questionDotToken, sharedOpt typeArguments, sharedOpt argumentsArray); + node createCallChain(node expression, optionalNode questionDotToken, optionalNode typeArguments, optionalNode argumentsArray); // @api - shared updateCallChain(shared node, shared expression, sharedOpt questionDotToken, sharedOpt typeArguments, shared argumentsArray); + node updateCallChain(node node, tr::node expression, optionalNode questionDotToken, optionalNode typeArguments, tr::node argumentsArray); // @api - shared updateCallExpression(shared node, shared expression, sharedOpt typeArguments, shared argumentsArray); + node updateCallExpression(node node, tr::node expression, optionalNode typeArguments, tr::node argumentsArray); // @api - shared createNewExpression(shared expression, sharedOpt typeArguments, sharedOpt argumentsArray); + node createNewExpression(node expression, optionalNode typeArguments, optionalNode argumentsArray); // // @api -// function updateNewExpression(node: NewExpression, shared expression, sharedOpt typeArguments, sharedOpt argumentsArray) { +// function updateNewExpression(node: NewExpression, node expression, optionalNode typeArguments, optionalNode argumentsArray) { // return node->expression != expression // || node->typeArguments != typeArguments // || node->arguments != argumentsArray @@ -1502,10 +1505,10 @@ namespace tr { // } // @api - shared createTaggedTemplateExpression(shared tag, sharedOpt typeArguments, shared templateLiteral); + node createTaggedTemplateExpression(node tag, optionalNode typeArguments, node templateLiteral); // // // @api -// function updateTaggedTemplateExpression(node: TaggedTemplateExpression, tag: Expression, sharedOpt typeArguments, template: TemplateLiteral) { +// function updateTaggedTemplateExpression(node: TaggedTemplateExpression, tag: Expression, optionalNode typeArguments, template: TemplateLiteral) { // return node->tag != tag // || node->typeArguments != typeArguments // || node->template != template @@ -1514,38 +1517,38 @@ namespace tr { // } // @api - shared createTypeAssertion(shared type, shared expression); + node createTypeAssertion(node type, node expression); // @api - shared updateTypeAssertion(shared node, shared type, shared expression); + node updateTypeAssertion(node node, tr::node type, tr::node expression); // @api - shared createParenthesizedExpression(shared expression); + node createParenthesizedExpression(node expression); // @api - shared updateParenthesizedExpression(shared node, shared expression); + node updateParenthesizedExpression(node node, tr::node expression); // @api - shared createFunctionExpression( - sharedOpt modifiers, - sharedOpt asteriskToken, + node createFunctionExpression( + optionalNode modifiers, + optionalNode asteriskToken, NameType name, - sharedOpt typeParameters, - sharedOpt parameters, - sharedOpt type, - shared body + optionalNode typeParameters, + optionalNode parameters, + optionalNode type, + node body ); // // @api // function updateFunctionExpression( // node: FunctionExpression, -// sharedOpt modifiers, -// sharedOpt asteriskToken, +// optionalNode modifiers, +// optionalNode asteriskToken, // name: Identifier | undefined, -// sharedOpt typeParameters, -// shared parameters, -// sharedOpt type, -// shared block +// optionalNode typeParameters, +// node parameters, +// optionalNode type, +// node block // ) { // return node->name != name // || node->modifiers != modifiers @@ -1558,22 +1561,22 @@ namespace tr { // : node; // } // @api - shared createArrowFunction( - sharedOpt modifiers, - sharedOpt typeParameters, - shared parameters, - sharedOpt type, - sharedOpt equalsGreaterThanToken, - shared body + node createArrowFunction( + optionalNode modifiers, + optionalNode typeParameters, + node parameters, + optionalNode type, + optionalNode equalsGreaterThanToken, + node body ); // // @api // function updateArrowFunction( // node: ArrowFunction, -// sharedOpt modifiers, -// sharedOpt typeParameters, -// shared parameters, -// sharedOpt type, +// optionalNode modifiers, +// optionalNode typeParameters, +// node parameters, +// optionalNode type, // equalsGreaterThanToken: EqualsGreaterThanToken, // body: ConciseBody // ): ArrowFunction { @@ -1588,47 +1591,47 @@ namespace tr { // } // // @api - shared createDeleteExpression(shared expression); + node createDeleteExpression(node expression); // // @api -// function updateDeleteExpression(node: DeleteExpression, shared expression) { +// function updateDeleteExpression(node: DeleteExpression, node expression) { // return node->expression != expression // ? update(createDeleteExpression(expression), node) // : node; // } // @api - shared createTypeOfExpression(shared expression); + node createTypeOfExpression(node expression); // // @api -// function updateTypeOfExpression(node: TypeOfExpression, shared expression) { +// function updateTypeOfExpression(node: TypeOfExpression, node expression) { // return node->expression != expression // ? update(createTypeOfExpression(expression), node) // : node; // } // @api - shared createVoidExpression(shared expression); + node createVoidExpression(node expression); // // @api -// function updateVoidExpression(node: VoidExpression, shared expression) { +// function updateVoidExpression(node: VoidExpression, node expression) { // return node->expression != expression // ? update(createVoidExpression(expression), node) // : node; // } // @api - shared createAwaitExpression(shared expression); + node createAwaitExpression(node expression); // // @api -// function updateAwaitExpression(node: AwaitExpression, shared expression) { +// function updateAwaitExpression(node: AwaitExpression, node expression) { // return node->expression != expression // ? update(createAwaitExpression(expression), node) // : node; // } // // @api - shared createPrefixUnaryExpression(SyntaxKind operatorKind, shared operand); + node createPrefixUnaryExpression(SyntaxKind operatorKind, node operand); // // @api // function updatePrefixUnaryExpression(node: PrefixUnaryExpression, operand: Expression) { @@ -1638,7 +1641,7 @@ namespace tr { // } // @api - shared createPostfixUnaryExpression(shared operand, SyntaxKind operatorKind); + node createPostfixUnaryExpression(node operand, SyntaxKind operatorKind); // // @api // function updatePostfixUnaryExpression(node: PostfixUnaryExpression, operand: Expression) { @@ -1648,9 +1651,9 @@ namespace tr { // } // // @api - shared createBinaryExpression(shared left, shared operatorNode, shared right); + node createBinaryExpression(node left, node operatorNode, node right); - TransformFlags propagateAssignmentPatternFlags(shared node); + TransformFlags propagateAssignmentPatternFlags(node node); // // // @api // function updateBinaryExpression(node: BinaryExpression, left: Expression, operator: BinaryOperatorToken, right: Expression) { @@ -1662,7 +1665,7 @@ namespace tr { // } // @api - shared createConditionalExpression(shared condition, sharedOpt questionToken, shared whenTrue, sharedOpt colonToken, shared whenFalse); + node createConditionalExpression(node condition, optionalNode questionToken, node whenTrue, optionalNode colonToken, node whenFalse); // // @api // function updateConditionalExpression( @@ -1683,7 +1686,7 @@ namespace tr { // } // @api - shared createTemplateExpression(shared head, shared templateSpans); + node createTemplateExpression(node head, node templateSpans); // // @api // function updateTemplateExpression(node: TemplateExpression, head: TemplateHead, templateSpans: readonly TemplateSpan[]) { @@ -1737,10 +1740,10 @@ namespace tr { // } // @api - shared createYieldExpression(sharedOpt asteriskToken, sharedOpt expression); + node createYieldExpression(optionalNode asteriskToken, optionalNode expression); // // @api -// function updateYieldExpression(node: YieldExpression, sharedOpt asteriskToken, shared expression) { +// function updateYieldExpression(node: YieldExpression, optionalNode asteriskToken, node expression) { // return node->expression != expression // || node->asteriskToken != asteriskToken // ? update(createYieldExpression(asteriskToken, expression), node) @@ -1748,34 +1751,34 @@ namespace tr { // } // @api - shared createSpreadElement(shared expression); + node createSpreadElement(node expression); // // @api -// function updateSpreadElement(node: SpreadElement, shared expression) { +// function updateSpreadElement(node: SpreadElement, node expression) { // return node->expression != expression // ? update(createSpreadElement(expression), node) // : node; // } // @api - shared createClassExpression( - sharedOpt decorators, - sharedOpt modifiers, + node createClassExpression( + optionalNode decorators, + optionalNode modifiers, NameType name, - sharedOpt typeParameters, - sharedOpt heritageClauses, - shared members + optionalNode typeParameters, + optionalNode heritageClauses, + node members ); // // @api // function updateClassExpression( // node: ClassExpression, -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // name: Identifier | undefined, -// sharedOpt typeParameters, -// sharedOpt heritageClauses, -// shared members +// optionalNode typeParameters, +// optionalNode heritageClauses, +// node members // ) { // return node->decorators != decorators // || node->modifiers != modifiers @@ -1788,13 +1791,13 @@ namespace tr { // } // @api - shared createOmittedExpression(); + node createOmittedExpression(); // @api - shared createExpressionWithTypeArguments(shared expression, sharedOpt typeArguments); + node createExpressionWithTypeArguments(node expression, optionalNode typeArguments); // // @api -// function updateExpressionWithTypeArguments(node: ExpressionWithTypeArguments, shared expression, sharedOpt typeArguments) { +// function updateExpressionWithTypeArguments(node: ExpressionWithTypeArguments, node expression, optionalNode typeArguments) { // return node->expression != expression // || node->typeArguments != typeArguments // ? update(createExpressionWithTypeArguments(expression, typeArguments), node) @@ -1802,25 +1805,25 @@ namespace tr { // } // @api - shared createAsExpression(shared expression, shared type); + node createAsExpression(node expression, node type); // @api - auto updateAsExpression(shared node, shared expression, shared type); + auto updateAsExpression(node node, tr::node expression, tr::node type); // @api - shared createNonNullExpression(shared expression); + node createNonNullExpression(node expression); // @api - shared createNonNullChain(shared expression); + node createNonNullChain(node expression); // @api - auto updateNonNullChain(shared node, shared expression); + auto updateNonNullChain(node node, tr::node expression); // @api - auto updateNonNullExpression(shared node, shared expression); + auto updateNonNullExpression(node node, tr::node expression); // @api - shared createMetaProperty(SyntaxKind keywordToken, shared name); + node createMetaProperty(SyntaxKind keywordToken, node name); // // @api // function updateMetaProperty(node: MetaProperty, name: Identifier) { @@ -1834,10 +1837,10 @@ namespace tr { // // // @api - shared createTemplateSpan(shared expression, shared literal); + node createTemplateSpan(node expression, node literal); // // @api -// function updateTemplateSpan(node: TemplateSpan, shared expression, literal: TemplateMiddle | TemplateTail) { +// function updateTemplateSpan(node: TemplateSpan, node expression, literal: TemplateMiddle | TemplateTail) { // return node->expression != expression // || node->literal != literal // ? update(createTemplateSpan(expression, literal), node) @@ -1845,17 +1848,17 @@ namespace tr { // } // // @api - shared createSemicolonClassElement(); + node createSemicolonClassElement(); // // Element // // @api - shared createBlock(shared statements, bool multiLine); + node createBlock(node statements, bool multiLine); // @api - shared createVariableDeclarationList(shared declarations, int flags = (int) NodeFlags::None); + node createVariableDeclarationList(node declarations, int flags = (int) NodeFlags::None); // // @api // function updateBlock(node: Block, statements: readonly Statement[]) { @@ -1865,12 +1868,12 @@ namespace tr { // } // @api - shared createVariableStatement(sharedOpt modifiers, shared declarationList); + node createVariableStatement(optionalNode modifiers, node declarationList); -// shared createVariableStatement(sharedOpt modifiers, variant, vector>> declarationList); +// node createVariableStatement(optionalNode modifiers, variant, vector>> declarationList); // // @api -// function updateVariableStatement(node: VariableStatement, sharedOpt modifiers, declarationList: VariableDeclarationList) { +// function updateVariableStatement(node: VariableStatement, optionalNode modifiers, declarationList: VariableDeclarationList) { // return node->modifiers != modifiers // || node->declarationList != declarationList // ? update(createVariableStatement(modifiers, declarationList), node) @@ -1878,12 +1881,12 @@ namespace tr { // } // @api - shared createEmptyStatement(); + node createEmptyStatement(); - shared mergeEmitNode(shared sourceEmitNode, sharedOpt destEmitNode); + node mergeEmitNode(node sourceEmitNode, optionalNode destEmitNode); template - T setOriginalNode(T node, sharedOpt original) { + T setOriginalNode(T node, optionalNode original) { node->original = original; if (original) { auto emitNode = original->emitNode; @@ -1893,19 +1896,19 @@ namespace tr { } template - sharedOpt asEmbeddedStatement(sharedOpt statement) { + optionalNode asEmbeddedStatement(optionalNode statement) { return statement && isNotEmittedStatement(statement) ? setTextRange(setOriginalNode(createEmptyStatement(), statement), statement) : statement; } // // @api -// function updateExpressionStatement(node: ExpressionStatement, shared expression) { +// function updateExpressionStatement(node: ExpressionStatement, node expression) { // return node->expression != expression // ? update(createExpressionStatement(expression), node) // : node; // } // // @api - shared createIfStatement(shared expression, shared thenStatement, sharedOpt elseStatement = nullptr) { + node createIfStatement(node expression, node thenStatement, optionalNode elseStatement = nullptr) { auto node = createBaseNode(SyntaxKind::IfStatement); node->expression = expression; node->thenStatement = asEmbeddedStatement(thenStatement); @@ -1918,7 +1921,7 @@ namespace tr { } // // @api -// function updateIfStatement(node: IfStatement, shared expression, thenStatement: Statement, elseStatement: Statement | undefined) { +// function updateIfStatement(node: IfStatement, node expression, thenStatement: Statement, elseStatement: Statement | undefined) { // return node->expression != expression // || node->thenStatement != thenStatement // || node->elseStatement != elseStatement @@ -1927,7 +1930,7 @@ namespace tr { // } // // // @api -// function createDoStatement(statement: Statement, shared expression) { +// function createDoStatement(statement: Statement, node expression) { // auto node = createBaseNode(SyntaxKind::DoStatement); // node->statement = asEmbeddedStatement(statement); // node->expression = expression; @@ -1938,7 +1941,7 @@ namespace tr { // } // // // @api -// function updateDoStatement(node: DoStatement, statement: Statement, shared expression) { +// function updateDoStatement(node: DoStatement, statement: Statement, node expression) { // return node->statement != statement // || node->expression != expression // ? update(createDoStatement(statement, expression), node) @@ -1946,7 +1949,7 @@ namespace tr { // } // // // @api -// function createWhileStatement(shared expression, statement: Statement) { +// function createWhileStatement(node expression, statement: Statement) { // auto node = createBaseNode(SyntaxKind::WhileStatement); // node->expression = expression; // node->statement = asEmbeddedStatement(statement); @@ -1957,7 +1960,7 @@ namespace tr { // } // // // @api -// function updateWhileStatement(node: WhileStatement, shared expression, statement: Statement) { +// function updateWhileStatement(node: WhileStatement, node expression, statement: Statement) { // return node->expression != expression // || node->statement != statement // ? update(createWhileStatement(expression, statement), node) @@ -1990,7 +1993,7 @@ namespace tr { // } // // // @api -// function createForInStatement(initializer: ForInitializer, shared expression, statement: Statement) { +// function createForInStatement(initializer: ForInitializer, node expression, statement: Statement) { // auto node = createBaseNode(SyntaxKind::ForInStatement); // node->initializer = initializer; // node->expression = expression; @@ -2003,7 +2006,7 @@ namespace tr { // } // // // @api -// function updateForInStatement(node: ForInStatement, initializer: ForInitializer, shared expression, statement: Statement) { +// function updateForInStatement(node: ForInStatement, initializer: ForInitializer, node expression, statement: Statement) { // return node->initializer != initializer // || node->expression != expression // || node->statement != statement @@ -2012,7 +2015,7 @@ namespace tr { // } // // // @api -// function createForOfStatement(awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, shared expression, statement: Statement) { +// function createForOfStatement(awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, node expression, statement: Statement) { // auto node = createBaseNode(SyntaxKind::ForOfStatement); // node->awaitModifier = awaitModifier; // node->initializer = initializer; @@ -2029,7 +2032,7 @@ namespace tr { // } // // // @api -// function updateForOfStatement(node: ForOfStatement, awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, shared expression, statement: Statement) { +// function updateForOfStatement(node: ForOfStatement, awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, node expression, statement: Statement) { // return node->awaitModifier != awaitModifier // || node->initializer != initializer // || node->expression != expression @@ -2073,7 +2076,7 @@ namespace tr { // } // // @api - shared createReturnStatement(sharedOpt expression) { + node createReturnStatement(optionalNode expression) { auto node = createBaseNode(SyntaxKind::ReturnStatement); node->expression = expression; // return in an ES2018 async generator must be awaited @@ -2085,14 +2088,14 @@ namespace tr { } // // @api -// function updateReturnStatement(node: ReturnStatement, sharedOpt expression) { +// function updateReturnStatement(node: ReturnStatement, optionalNode expression) { // return node->expression != expression // ? update(createReturnStatement(expression), node) // : node; // } // // // @api -// function createWithStatement(shared expression, statement: Statement) { +// function createWithStatement(node expression, statement: Statement) { // auto node = createBaseNode(SyntaxKind::WithStatement); // node->expression = expression; // node->statement = asEmbeddedStatement(statement); @@ -2103,7 +2106,7 @@ namespace tr { // } // // // @api -// function updateWithStatement(node: WithStatement, shared expression, statement: Statement) { +// function updateWithStatement(node: WithStatement, node expression, statement: Statement) { // return node->expression != expression // || node->statement != statement // ? update(createWithStatement(expression, statement), node) @@ -2111,7 +2114,7 @@ namespace tr { // } // // // @api -// function createSwitchStatement(shared expression, caseBlock: CaseBlock): SwitchStatement { +// function createSwitchStatement(node expression, caseBlock: CaseBlock): SwitchStatement { // auto node = createBaseNode(SyntaxKind::SwitchStatement); // node->expression = parenthesizer.parenthesizeExpressionForDisallowedComma(expression); // node->caseBlock = caseBlock; @@ -2122,7 +2125,7 @@ namespace tr { // } // // // @api -// function updateSwitchStatement(node: SwitchStatement, shared expression, caseBlock: CaseBlock) { +// function updateSwitchStatement(node: SwitchStatement, node expression, caseBlock: CaseBlock) { // return node->expression != expression // || node->caseBlock != caseBlock // ? update(createSwitchStatement(expression, caseBlock), node) @@ -2130,10 +2133,10 @@ namespace tr { // } // // @api - shared createLabeledStatement(NameType label, shared statement); + node createLabeledStatement(NameType label, node statement); // @api - shared createExpressionStatement(shared expression); + node createExpressionStatement(node expression); // // @api // function updateLabeledStatement(node: LabeledStatement, label: Identifier, statement: Statement) { @@ -2144,7 +2147,7 @@ namespace tr { // } // // // @api -// function createThrowStatement(shared expression) { +// function createThrowStatement(node expression) { // auto node = createBaseNode(SyntaxKind::ThrowStatement); // node->expression = expression; // node->transformFlags |= propagateChildFlags(node->expression); @@ -2152,7 +2155,7 @@ namespace tr { // } // // // @api -// function updateThrowStatement(node: ThrowStatement, shared expression) { +// function updateThrowStatement(node: ThrowStatement, node expression) { // return node->expression != expression // ? update(createThrowStatement(expression), node) // : node; @@ -2186,10 +2189,10 @@ namespace tr { // } // // @api - shared createVariableDeclaration(NameType name, sharedOpt exclamationToken, sharedOpt type, sharedOpt initializer); + node createVariableDeclaration(NameType name, optionalNode exclamationToken, optionalNode type, optionalNode initializer); // // @api -// function updateVariableDeclaration(node: VariableDeclaration, name: BindingName, exclamationToken: ExclamationToken | undefined, sharedOpt type, sharedOpt initializer) { +// function updateVariableDeclaration(node: VariableDeclaration, name: BindingName, exclamationToken: ExclamationToken | undefined, optionalNode type, optionalNode initializer) { // return node->name != name // || node->type != type // || node->exclamationToken != exclamationToken @@ -2207,28 +2210,28 @@ namespace tr { // } // @api - shared createFunctionDeclaration( - sharedOpt decorators, - sharedOpt modifiers, - sharedOpt asteriskToken, + node createFunctionDeclaration( + optionalNode decorators, + optionalNode modifiers, + optionalNode asteriskToken, NameType name, - sharedOpt typeParameters, - shared parameters, - sharedOpt type, - sharedOpt body + optionalNode typeParameters, + node parameters, + optionalNode type, + optionalNode body ); // // @api // function updateFunctionDeclaration( // node: FunctionDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, -// sharedOpt asteriskToken, +// optionalNode decorators, +// optionalNode modifiers, +// optionalNode asteriskToken, // name: Identifier | undefined, -// sharedOpt typeParameters, -// shared parameters, -// sharedOpt type, -// sharedOpt body +// optionalNode typeParameters, +// node parameters, +// optionalNode type, +// optionalNode body // ) { // return node->decorators != decorators // || node->modifiers != modifiers @@ -2243,24 +2246,24 @@ namespace tr { // } // // @api - shared createClassDeclaration( - sharedOpt decorators, - sharedOpt modifiers, + node createClassDeclaration( + optionalNode decorators, + optionalNode modifiers, NameType name, - sharedOpt typeParameters, - sharedOpt heritageClauses, - shared members + optionalNode typeParameters, + optionalNode heritageClauses, + node members ); // // @api // function updateClassDeclaration( // node: ClassDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // name: Identifier | undefined, -// sharedOpt typeParameters, -// sharedOpt heritageClauses, -// shared members +// optionalNode typeParameters, +// optionalNode heritageClauses, +// node members // ) { // return node->decorators != decorators // || node->modifiers != modifiers @@ -2274,11 +2277,11 @@ namespace tr { // // // @api // function createInterfaceDeclaration( -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // NameType name, -// sharedOpt typeParameters, -// sharedOpt heritageClauses, +// optionalNode typeParameters, +// optionalNode heritageClauses, // members: readonly TypeElement[] // ) { // auto node = createBaseInterfaceOrClassLikeDeclaration( @@ -2297,11 +2300,11 @@ namespace tr { // // @api // function updateInterfaceDeclaration( // node: InterfaceDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // name: Identifier, -// sharedOpt typeParameters, -// sharedOpt heritageClauses, +// optionalNode typeParameters, +// optionalNode heritageClauses, // members: readonly TypeElement[] // ) { // return node->decorators != decorators @@ -2315,12 +2318,12 @@ namespace tr { // } // // @api - shared createTypeAliasDeclaration( - sharedOpt decorators, - sharedOpt modifiers, + node createTypeAliasDeclaration( + optionalNode decorators, + optionalNode modifiers, NameType name, - sharedOpt typeParameters, - shared type + optionalNode typeParameters, + node type ) { auto node = createBaseGenericNamedDeclaration( SyntaxKind::TypeAliasDeclaration, @@ -2337,11 +2340,11 @@ namespace tr { // // @api // function updateTypeAliasDeclaration( // node: TypeAliasDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // name: Identifier, -// sharedOpt typeParameters, -// shared type +// optionalNode typeParameters, +// node type // ) { // return node->decorators != decorators // || node->modifiers != modifiers @@ -2354,8 +2357,8 @@ namespace tr { // // // @api // function createEnumDeclaration( -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // NameType name, // members: readonly EnumMember[] // ) { @@ -2376,8 +2379,8 @@ namespace tr { // // @api // function updateEnumDeclaration( // node: EnumDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // name: Identifier, // members: readonly EnumMember[]) { // return node->decorators != decorators @@ -2390,8 +2393,8 @@ namespace tr { // // // @api // function createModuleDeclaration( -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // name: ModuleName, // body: ModuleBody | undefined, // flags = NodeFlags::None @@ -2420,8 +2423,8 @@ namespace tr { // // @api // function updateModuleDeclaration( // node: ModuleDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // name: ModuleName, // body: ModuleBody | undefined // ) { @@ -2484,8 +2487,8 @@ namespace tr { // // // @api // function createImportEqualsDeclaration( -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // isTypeOnly: boolean, // NameType name, // moduleReference: ModuleReference @@ -2507,8 +2510,8 @@ namespace tr { // // @api // function updateImportEqualsDeclaration( // node: ImportEqualsDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // isTypeOnly: boolean, // name: Identifier, // moduleReference: ModuleReference @@ -2524,8 +2527,8 @@ namespace tr { // // // @api // function createImportDeclaration( -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // importClause: ImportClause | undefined, // moduleSpecifier: Expression, // assertClause: AssertClause | undefined @@ -2548,8 +2551,8 @@ namespace tr { // // @api // function updateImportDeclaration( // node: ImportDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // importClause: ImportClause | undefined, // moduleSpecifier: Expression, // assertClause: AssertClause | undefined @@ -2589,7 +2592,7 @@ namespace tr { // } // // @api - shared createAssertClause(shared elements, bool multiLine); + node createAssertClause(node elements, bool multiLine); // // @api // function updateAssertClause(node: AssertClause, elements: readonly AssertEntry[], multiLine?: boolean): AssertClause { @@ -2600,7 +2603,7 @@ namespace tr { // } // // @api - shared createAssertEntry(shared name, shared value); + node createAssertEntry(node name, node value); // // @api // function updateAssertEntry(node: AssertEntry, name: AssertionKey, value: Expression): AssertEntry { @@ -2611,7 +2614,7 @@ namespace tr { // } // @api - shared createImportTypeAssertionContainer(shared clause, bool multiLine); + node createImportTypeAssertionContainer(node clause, bool multiLine); // // @api // function updateImportTypeAssertionContainer(node: ImportTypeAssertionContainer, clause: AssertClause, multiLine?: boolean): ImportTypeAssertionContainer { @@ -2695,10 +2698,10 @@ namespace tr { // // // @api // function createExportAssignment( -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // isExportEquals: boolean | undefined, -// shared expression +// node expression // ) { // auto node = createBaseDeclaration( // SyntaxKind::ExportAssignment, @@ -2717,9 +2720,9 @@ namespace tr { // // @api // function updateExportAssignment( // node: ExportAssignment, -// sharedOpt decorators, -// sharedOpt modifiers, -// shared expression +// optionalNode decorators, +// optionalNode modifiers, +// node expression // ) { // return node->decorators != decorators // || node->modifiers != modifiers @@ -2730,8 +2733,8 @@ namespace tr { // // // @api // function createExportDeclaration( -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // isTypeOnly: boolean, // exportClause: NamedExportBindings | undefined, // moduleSpecifier?: Expression, @@ -2756,8 +2759,8 @@ namespace tr { // // @api // function updateExportDeclaration( // node: ExportDeclaration, -// sharedOpt decorators, -// sharedOpt modifiers, +// optionalNode decorators, +// optionalNode modifiers, // isTypeOnly: boolean, // exportClause: NamedExportBindings | undefined, // moduleSpecifier: Expression | undefined, @@ -2812,14 +2815,14 @@ namespace tr { // } // // @api - shared createMissingDeclaration(); + node createMissingDeclaration(); // // // // Module references // // // // // @api -// function createExternalModuleReference(shared expression) { +// function createExternalModuleReference(node expression) { // auto node = createBaseNode(SyntaxKind::ExternalModuleReference); // node->expression = expression; // node->transformFlags |= propagateChildFlags(node->expression); @@ -2828,7 +2831,7 @@ namespace tr { // } // // // @api -// function updateExternalModuleReference(node: ExternalModuleReference, shared expression) { +// function updateExternalModuleReference(node: ExternalModuleReference, node expression) { // return node->expression != expression // ? update(createExternalModuleReference(expression), node) // : node; @@ -2846,14 +2849,14 @@ namespace tr { // } // // @api - shared createJSDocNonNullableType(shared type, bool postfix = false) { + node createJSDocNonNullableType(node type, bool postfix = false) { auto node = createBaseNode(); node->type = postfix ? type ? parenthesizer.parenthesizeNonArrayTypeOfPostfixType(type) : nullptr : type; node->postfix = postfix; return node; } - shared createJSDocNullableType(shared type, bool postfix = false) { + node createJSDocNullableType(node type, bool postfix = false) { auto node = createBaseNode(); node->type = postfix ? type ? parenthesizer.parenthesizeNonArrayTypeOfPostfixType(type) : nullptr : type; node->postfix = postfix; @@ -2864,7 +2867,7 @@ namespace tr { // createJSDocOptionalType // createJSDocVariadicType // createJSDocNamepathType -// shared createJSDocUnaryTypeWorker(SyntaxKind kind, shared type) { +// node createJSDocUnaryTypeWorker(SyntaxKind kind, node type) { // auto node = createBaseNode(kind); // node->type = type; // return node; @@ -2873,7 +2876,7 @@ namespace tr { // // @api // // updateJSDocNonNullableType // // updateJSDocNullableType -// function updateJSDocPrePostfixUnaryTypeWorker type; readonly postfix: boolean; }>(SyntaxKind kind, node: T, type: T["type"]): T { +// function updateJSDocPrePostfixUnaryTypeWorker type; readonly postfix: boolean; }>(SyntaxKind kind, node: T, type: T["type"]): T { // return node->type != type // ? update(createJSDocPrePostfixUnaryTypeWorker(kind, type, node->postfix), node) // : node; @@ -2883,14 +2886,14 @@ namespace tr { // // updateJSDocOptionalType // // updateJSDocVariadicType // // updateJSDocNamepathType -// function updateJSDocUnaryTypeWorker type; }>(SyntaxKind kind, node: T, type: T["type"]): T { +// function updateJSDocUnaryTypeWorker type; }>(SyntaxKind kind, node: T, type: T["type"]): T { // return node->type != type // ? update(createJSDocUnaryTypeWorker(kind, type), node) // : node; // } // // // @api -// function createJSDocFunctionType(shared parameters, sharedOpt type): JSDocFunctionType { +// function createJSDocFunctionType(node parameters, optionalNode type): JSDocFunctionType { // auto node = createBaseSignatureDeclaration( // SyntaxKind::JSDocFunctionType, // /*decorators*/ {}, @@ -2904,7 +2907,7 @@ namespace tr { // } // // // @api -// function updateJSDocFunctionType(node: JSDocFunctionType, shared parameters, sharedOpt type): JSDocFunctionType { +// function updateJSDocFunctionType(node: JSDocFunctionType, node parameters, optionalNode type): JSDocFunctionType { // return node->parameters != parameters // || node->type != type // ? update(createJSDocFunctionType(parameters, type), node) @@ -2928,14 +2931,14 @@ namespace tr { // } // // // @api -// function createJSDocTypeExpression(shared type): JSDocTypeExpression { +// function createJSDocTypeExpression(node type): JSDocTypeExpression { // auto node = createBaseNode(SyntaxKind::JSDocTypeExpression); // node->type = type; // return node; // } // // // @api -// function updateJSDocTypeExpression(node: JSDocTypeExpression, shared type): JSDocTypeExpression { +// function updateJSDocTypeExpression(node: JSDocTypeExpression, node type): JSDocTypeExpression { // return node->type != type // ? update(createJSDocTypeExpression(type), node) // : node; @@ -3301,7 +3304,7 @@ namespace tr { // // // // @api - shared createJsxElement(shared openingElement, shared children, shared closingElement); + node createJsxElement(node openingElement, node children, node closingElement); // // @api // function updateJsxElement(node: JsxElement, openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement) { @@ -3313,10 +3316,10 @@ namespace tr { // } // @api - shared createJsxSelfClosingElement(shared tagName, sharedOpt typeArguments, shared attributes); + node createJsxSelfClosingElement(node tagName, optionalNode typeArguments, node attributes); // // // @api -// function updateJsxSelfClosingElement(node: JsxSelfClosingElement, tagName: JsxTagNameExpression, sharedOpt typeArguments, attributes: JsxAttributes) { +// function updateJsxSelfClosingElement(node: JsxSelfClosingElement, tagName: JsxTagNameExpression, optionalNode typeArguments, attributes: JsxAttributes) { // return node->tagName != tagName // || node->typeArguments != typeArguments // || node->attributes != attributes @@ -3325,10 +3328,10 @@ namespace tr { // } // // @api - shared createJsxOpeningElement(shared tagName, sharedOpt typeArguments, shared attributes); + node createJsxOpeningElement(node tagName, optionalNode typeArguments, node attributes); // // // @api -// function updateJsxOpeningElement(node: JsxOpeningElement, tagName: JsxTagNameExpression, sharedOpt typeArguments, attributes: JsxAttributes) { +// function updateJsxOpeningElement(node: JsxOpeningElement, tagName: JsxTagNameExpression, optionalNode typeArguments, attributes: JsxAttributes) { // return node->tagName != tagName // || node->typeArguments != typeArguments // || node->attributes != attributes @@ -3337,7 +3340,7 @@ namespace tr { // } // // @api - shared createJsxClosingElement(shared tagName); + node createJsxClosingElement(node tagName); // // @api // function updateJsxClosingElement(node: JsxClosingElement, tagName: JsxTagNameExpression) { @@ -3347,7 +3350,7 @@ namespace tr { // } // @api - shared createJsxFragment(shared openingFragment, shared children, shared closingFragment); + node createJsxFragment(node openingFragment, node children, node closingFragment); // // @api // function updateJsxFragment(node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment) { @@ -3368,13 +3371,13 @@ namespace tr { // } // // @api - shared createJsxOpeningFragment(); + node createJsxOpeningFragment(); // @api - shared createJsxJsxClosingFragment(); + node createJsxJsxClosingFragment(); // @api - shared createJsxAttribute(shared name, sharedOpt initializer = {}); + node createJsxAttribute(node name, optionalNode initializer = {}); // // @api // function updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer: JsxAttributeValue | undefined) { @@ -3385,7 +3388,7 @@ namespace tr { // } // // @api - shared createJsxAttributes(shared properties); + node createJsxAttributes(node properties); // // // @api // function updateJsxAttributes(node: JsxAttributes, properties: readonly JsxAttributeLike[]) { @@ -3395,20 +3398,20 @@ namespace tr { // } // @api - shared createJsxSpreadAttribute(shared expression); + node createJsxSpreadAttribute(node expression); // // @api -// function updateJsxSpreadAttribute(node: JsxSpreadAttribute, shared expression) { +// function updateJsxSpreadAttribute(node: JsxSpreadAttribute, node expression) { // return node->expression != expression // ? update(createJsxSpreadAttribute(expression), node) // : node; // } // // @api - shared createJsxExpression(sharedOpt dotDotDotToken, sharedOpt expression); + node createJsxExpression(optionalNode dotDotDotToken, optionalNode expression); // // @api -// function updateJsxExpression(node: JsxExpression, sharedOpt expression) { +// function updateJsxExpression(node: JsxExpression, optionalNode expression) { // return node->expression != expression // ? update(createJsxExpression(node->dotDotDotToken, expression), node) // : node; @@ -3419,7 +3422,7 @@ namespace tr { // // // // // @api -// function createCaseClause(shared expression, statements: readonly Statement[]) { +// function createCaseClause(node expression, statements: readonly Statement[]) { // auto node = createBaseNode(SyntaxKind::CaseClause); // node->expression = parenthesizer.parenthesizeExpressionForDisallowedComma(expression); // node->statements = createNodeArray(statements); @@ -3430,7 +3433,7 @@ namespace tr { // } // // // @api -// function updateCaseClause(node: CaseClause, shared expression, statements: readonly Statement[]) { +// function updateCaseClause(node: CaseClause, node expression, statements: readonly Statement[]) { // return node->expression != expression // || node->statements != statements // ? update(createCaseClause(expression, statements), node) @@ -3453,7 +3456,7 @@ namespace tr { // } // @api - shared createHeritageClause(SyntaxKind token, shared types); + node createHeritageClause(SyntaxKind token, node types); // // @api // function updateHeritageClause(node: HeritageClause, types: readonly ExpressionWithTypeArguments[]) { @@ -3495,7 +3498,7 @@ namespace tr { // // // // @api - shared createPropertyAssignment(NameType name, shared initializer); + node createPropertyAssignment(NameType name, node initializer); // function finishUpdatePropertyAssignment(updated: Mutable, original: PropertyAssignment) { // // copy children used only for error reporting @@ -3515,7 +3518,7 @@ namespace tr { // } // // @api - shared createShorthandPropertyAssignment(NameType name, sharedOpt objectAssignmentInitializer); + node createShorthandPropertyAssignment(NameType name, optionalNode objectAssignmentInitializer); // // function finishUpdateShorthandPropertyAssignment(updated: Mutable, original: ShorthandPropertyAssignment) { // // copy children used only for error reporting @@ -3536,10 +3539,10 @@ namespace tr { // } // // @api - shared createSpreadAssignment(shared expression); + node createSpreadAssignment(node expression); // // @api -// function updateSpreadAssignment(node: SpreadAssignment, shared expression) { +// function updateSpreadAssignment(node: SpreadAssignment, node expression) { // return node->expression != expression // ? update(createSpreadAssignment(expression), node) // : node; @@ -3562,21 +3565,17 @@ namespace tr { // } // // // @api -// function updateEnumMember(node: EnumMember, name: PropertyName, sharedOpt initializer) { +// function updateEnumMember(node: EnumMember, name: PropertyName, optionalNode initializer) { // return node->name != name // || node->initializer != initializer // ? update(createEnumMember(name, initializer), node) // : node; // } - // - // Top-level nodes - // - // @api - shared createSourceFile( - shared statements, - shared endOfFileToken, + shared_ptr createSourceFile( + node statements, + node endOfFileToken, int flags ) { auto node = make_shared(); @@ -3760,10 +3759,10 @@ namespace tr { * @param original The original outer expression. */ // @api - shared createPartiallyEmittedExpression(shared expression, sharedOpt original); + node createPartiallyEmittedExpression(node expression, optionalNode original); // @api - auto updatePartiallyEmittedExpression(shared node, shared expression); + auto updatePartiallyEmittedExpression(node node, tr::node expression); // function flattenCommaElements(node: Expression): Expression | readonly Expression[] { // if (nodeIsSynthesized(node) && !isParseTreeNode(node) && !node->original && !node->emitNode && !node->id) { @@ -3817,7 +3816,7 @@ namespace tr { // } // // // @api -// function createSyntheticReferenceExpression(shared expression, thisArg: Expression) { +// function createSyntheticReferenceExpression(node expression, thisArg: Expression) { // auto node = createBaseNode(SyntaxKind::SyntheticReferenceExpression); // node->expression = expression; // node->thisArg = thisArg; @@ -3828,7 +3827,7 @@ namespace tr { // } // // // @api -// function updateSyntheticReferenceExpression(node: SyntheticReferenceExpression, shared expression, thisArg: Expression) { +// function updateSyntheticReferenceExpression(node: SyntheticReferenceExpression, node expression, thisArg: Expression) { // return node->expression != expression // || node->thisArg != thisArg // ? update(createSyntheticReferenceExpression(expression, thisArg), node) @@ -3907,7 +3906,7 @@ namespace tr { // return createVoidExpression(createNumericLiteral("0")); // } // -// function createExportDefault(shared expression) { +// function createExportDefault(node expression) { // return createExportAssignment( // /*decorators*/ {}, // /*modifiers*/ {}, @@ -3989,7 +3988,7 @@ namespace tr { // return createGlobalMethodCall("Reflect", "set", receiver ? [target, propertyKey, value, receiver] : [target, propertyKey, value]); // } // -// function tryAddPropertyAssignment(properties: Push, propertyName: string, sharedOpt expression) { +// function tryAddPropertyAssignment(properties: Push, propertyName: string, optionalNode expression) { // if (expression) { // properties.push(createPropertyAssignment(propertyName, expression)); // return true; @@ -4012,7 +4011,7 @@ namespace tr { // return createObjectLiteralExpression(properties, !singleLine); // } - shared updateOuterExpression(shared outerExpression, shared expression); + node updateOuterExpression(node outerExpression, node expression); /** * Determines whether a node is a parenthesized expression that can be ignored when recreating outer expressions. @@ -4028,9 +4027,9 @@ namespace tr { * the expression to maintain precedence, a new parenthesized expression should be created automatically when * the containing expression is created/updated. */ - bool isIgnorableParen(shared node); + bool isIgnorableParen(node node); - shared restoreOuterExpressions(sharedOpt outerExpression, shared innerExpression, int kinds = (int)OuterExpressionKinds::All); + node restoreOuterExpressions(optionalNode outerExpression, node innerExpression, int kinds = (int)OuterExpressionKinds::All); // function restoreEnclosingLabel(node: Statement, outermostLabeledStatement: LabeledStatement | undefined, afterRestoreLabelCallback?: (node: LabeledStatement) => void): Statement { // if (!outermostLabeledStatement) { @@ -4072,7 +4071,7 @@ namespace tr { // } // } // -// function createCallBinding(shared expression, recordTempVariable: (temp: Identifier) => void, languageVersion?: ScriptTarget, cacheIdentifiers = false): CallBinding { +// function createCallBinding(node expression, recordTempVariable: (temp: Identifier) => void, languageVersion?: ScriptTarget, cacheIdentifiers = false): CallBinding { // auto callee = skipOuterExpressions(expression, OuterExpressionKinds::All); // let thisArg: Expression; // let target: LeftHandSideExpression; @@ -4141,7 +4140,7 @@ namespace tr { // return { target, thisArg }; // } // -// function createAssignmentTargetWrapper(paramName: Identifier, shared expression): LeftHandSideExpression { +// function createAssignmentTargetWrapper(paramName: Identifier, node expression): LeftHandSideExpression { // return createPropertyAccessExpression( // // Explicit parens required because of v8 regression (https://bugs.chromium.org/p/v8/issues/detail?id=9560) // createParenthesizedExpression( @@ -4372,7 +4371,7 @@ namespace tr { // } // // /** -// * Lifts a shared containing only Statement nodes to a block. +// * Lifts a node containing only Statement nodes to a block. // * // * @param nodes The NodeArray. // */ diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index f63b6e8..09cbede 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 3.22) project(typescript) add_executable(typescript_debugger diff --git a/src/gui/debugger_main.cpp b/src/gui/debugger_main.cpp index 95a3ebd..c5b7a6a 100644 --- a/src/gui/debugger_main.cpp +++ b/src/gui/debugger_main.cpp @@ -99,7 +99,7 @@ const v3: NoNumber = 34; auto iterations = 100; auto start = std::chrono::high_resolution_clock::now(); - shared result; + node result; for (auto i = 0; i &node) { + int getEmitFlags(const node &node) { return node->emitNode ? node->emitNode->flags : 0; } - bool isCommaSequence(shared node) { + bool isCommaSequence(node node) { return node->kind == SyntaxKind::BinaryExpression && to(node)->operatorToken->kind == SyntaxKind::CommaToken || node->kind == SyntaxKind::CommaListExpression; } @@ -20,13 +20,13 @@ namespace tr { /** * Gets whether an identifier should only be referred to by its local name. */ - bool isLocalName(const shared &node) { + bool isLocalName(const node &node) { return (getEmitFlags(node) & (int) EmitFlags::LocalName) != 0; } - bool hasModifier(const shared &node, SyntaxKind kind) { + bool hasModifier(const node &node, SyntaxKind kind) { if (!node->modifiers) return false; - for (auto &&v: node->modifiers->list) if (v->kind == kind) return true; + for (auto v: *node->modifiers) if (v->kind == kind) return true; return false; } @@ -64,10 +64,10 @@ namespace tr { return ModifierFlags::None; } - int modifiersToFlags(shared modifiers) { + int modifiersToFlags(node modifiers) { int flags = (int) ModifierFlags::None; if (modifiers) { - for (auto &&modifier: modifiers->list) { + for (auto modifier: *modifiers) { flags |= (int) modifierToFlag(modifier->kind); } } @@ -79,7 +79,7 @@ namespace tr { * * NOTE: This function does not use `parent` pointers and will not include modifiers from JSDoc. */ - int getSyntacticModifierFlagsNoCache(shared node) { + int getSyntacticModifierFlagsNoCache(node node) { auto flags = modifiersToFlags(node->modifiers); if (node->flags & (int) NodeFlags::NestedNamespace || (node->kind == SyntaxKind::Identifier && to(node)->isInJSDocNamespace)) { flags |= (int) ModifierFlags::Export; @@ -87,7 +87,7 @@ namespace tr { return flags; } - int getModifierFlagsWorker(shared node, bool includeJSDoc, optional alwaysIncludeJSDoc) { + int getModifierFlagsWorker(node node, bool includeJSDoc, optional alwaysIncludeJSDoc) { if (node->kind >= SyntaxKind::FirstToken && node->kind <= SyntaxKind::LastToken) { return (int) ModifierFlags::None; } @@ -104,23 +104,23 @@ namespace tr { return node->modifierFlagsCache & ~((int) ModifierFlags::HasComputedFlags | (int) ModifierFlags::HasComputedJSDocModifiers); } - int getSyntacticModifierFlags(shared node) { + int getSyntacticModifierFlags(node node) { return getModifierFlagsWorker(node, /*includeJSDoc*/ false); } - int getSelectedSyntacticModifierFlags(shared node, int flags) { + int getSelectedSyntacticModifierFlags(node node, int flags) { return getSyntacticModifierFlags(node) & flags; } - bool hasSyntacticModifier(shared node, int flags) { + bool hasSyntacticModifier(node node, int flags) { return !!getSelectedSyntacticModifierFlags(node, flags); } - bool hasStaticModifier(shared node) { + bool hasStaticModifier(node node) { return hasSyntacticModifier(node, (int) ModifierFlags::Static); } - shared resolveNameToNode(const shared &node) { + node resolveNameToNode(const node &node) { switch (node->kind) { case SyntaxKind::Identifier: case SyntaxKind::StringLiteral: @@ -133,7 +133,7 @@ namespace tr { throw runtime_error(fmt::format("resolveNamToNode with kind {} no valid name property", (int) node->kind)); } - bool isFunctionOrConstructorTypeNode(shared node) { + bool isFunctionOrConstructorTypeNode(node node) { switch (node->kind) { case SyntaxKind::FunctionType: case SyntaxKind::ConstructorType: @@ -142,7 +142,7 @@ namespace tr { return false; } - sharedOpt getTypeParameters(shared node) { + optionalNode getTypeParameters(node node) { switch (node->kind) { case SyntaxKind::Constructor: return to(node)->typeParameters; @@ -175,7 +175,7 @@ namespace tr { } } - shared getTagName(shared node) { + node getTagName(node node) { switch (node->kind) { case SyntaxKind::JsxClosingElement: return to(node)->tagName; @@ -186,18 +186,18 @@ namespace tr { } } - string &getEscapedName(const shared &node) { + string &getEscapedName(const node &node) { switch (node->kind) { case SyntaxKind::Identifier: - return reinterpret_pointer_cast(node)->escapedText; + return reinterpret_cast(node)->escapedText; case SyntaxKind::PrivateIdentifier: - return reinterpret_pointer_cast(node)->escapedText; + return reinterpret_cast(node)->escapedText; } throw runtime_error(fmt::format("getEscapedName with kind {} no valid", (int) node->kind)); } - sharedOpt getName(const shared &node) { + optionalNode getName(const node &node) { //[x] Check all with `name` //[x] Check child of NamedDeclaration //[x] Check child of SignatureDeclarationBase @@ -284,124 +284,126 @@ namespace tr { return resolveNameToNode(to(node)->name); case SyntaxKind::ExportAssignment: return resolveNameToNode(to(node)->name); - default: - if (auto v = dynamic_pointer_cast(node)) { - return resolveNameToNode(v->name); - } + case SyntaxKind::Identifier: + case SyntaxKind::StringLiteral: + case SyntaxKind::NumericLiteral: + case SyntaxKind::ComputedPropertyName: + case SyntaxKind::PrivateIdentifier: + return node; } return nullptr; } - bool isNumericLiteral(const shared &node) { + bool isNumericLiteral(const node &node) { return node->kind == SyntaxKind::NumericLiteral; } - bool isBigIntLiteral(const shared &node) { + bool isBigIntLiteral(const node &node) { return node->kind == SyntaxKind::BigIntLiteral; } - bool isStringLiteral(const shared &node) { + bool isStringLiteral(const node &node) { return node->kind == SyntaxKind::StringLiteral; } - bool isJsxText(const shared &node) { + bool isJsxText(const node &node) { return node->kind == SyntaxKind::JsxText; } - bool isRegularExpressionLiteral(const shared &node) { + bool isRegularExpressionLiteral(const node &node) { return node->kind == SyntaxKind::RegularExpressionLiteral; } - bool isNoSubstitutionTemplateLiteral(const shared &node) { + bool isNoSubstitutionTemplateLiteral(const node &node) { return node->kind == SyntaxKind::NoSubstitutionTemplateLiteral; } - bool isStringLiteralLike(shared node) { + bool isStringLiteralLike(node node) { return node->kind == SyntaxKind::StringLiteral || node->kind == SyntaxKind::NoSubstitutionTemplateLiteral; } - bool isStringOrNumericLiteralLike(shared node) { + bool isStringOrNumericLiteralLike(node node) { return isStringLiteralLike(node) || isNumericLiteral(node); } // Pseudo-literals - bool isTemplateHead(const shared &node) { + bool isTemplateHead(const node &node) { return node->kind == SyntaxKind::TemplateHead; } - bool isTemplateMiddle(const shared &node) { + bool isTemplateMiddle(const node &node) { return node->kind == SyntaxKind::TemplateMiddle; } - bool isTemplateTail(const shared &node) { + bool isTemplateTail(const node &node) { return node->kind == SyntaxKind::TemplateTail; } // Punctuation - bool isDotDotDotToken(const shared &node) { + bool isDotDotDotToken(const node &node) { return node->kind == SyntaxKind::DotDotDotToken; } /*@internal*/ - bool isCommaToken(const shared &node) { + bool isCommaToken(const node &node) { return node->kind == SyntaxKind::CommaToken; } - bool isPlusToken(const shared &node) { + bool isPlusToken(const node &node) { return node->kind == SyntaxKind::PlusToken; } - bool isMinusToken(const shared &node) { + bool isMinusToken(const node &node) { return node->kind == SyntaxKind::MinusToken; } - bool isAsteriskToken(const shared &node) { + bool isAsteriskToken(const node &node) { return node->kind == SyntaxKind::AsteriskToken; } /*@internal*/ - bool isExclamationToken(const shared &node) { + bool isExclamationToken(const node &node) { return node->kind == SyntaxKind::ExclamationToken; } /*@internal*/ - bool isQuestionToken(const shared &node) { + bool isQuestionToken(const node &node) { return node->kind == SyntaxKind::QuestionToken; } /*@internal*/ - bool isColonToken(const shared &node) { + bool isColonToken(const node &node) { return node->kind == SyntaxKind::ColonToken; } /*@internal*/ - bool isQuestionDotToken(const shared &node) { + bool isQuestionDotToken(const node &node) { return node->kind == SyntaxKind::QuestionDotToken; } /*@internal*/ - bool isEqualsGreaterThanToken(const shared &node) { + bool isEqualsGreaterThanToken(const node &node) { return node->kind == SyntaxKind::EqualsGreaterThanToken; } // Identifiers - bool isIdentifier(const shared &node) { + bool isIdentifier(const node &node) { return node->kind == SyntaxKind::Identifier; } - bool isPrivateIdentifier(const shared &node) { + bool isPrivateIdentifier(const node &node) { return node->kind == SyntaxKind::PrivateIdentifier; } - bool identifierIsThisKeyword(const shared &id) { + bool identifierIsThisKeyword(const node &id) { return id->originalKeywordKind == SyntaxKind::ThisKeyword; } - bool isThisIdentifier(sharedOpt node) { + bool isThisIdentifier(optionalNode node) { if (!node) return false; return node->kind == SyntaxKind::Identifier && identifierIsThisKeyword(to(node)); } @@ -409,7 +411,7 @@ namespace tr { /** * Determines whether a node is a property or element access expression for `super`. */ - bool isSuperProperty(shared node) { + bool isSuperProperty(node node) { if (node->is()) return to(node)->expression->kind == SyntaxKind::SuperKeyword; if (node->is()) return to(node)->expression->kind == SyntaxKind::SuperKeyword; return false; @@ -418,661 +420,661 @@ namespace tr { // Reserved Words /* @internal */ - bool isExportModifier(const shared &node) { + bool isExportModifier(const node &node) { return node->kind == SyntaxKind::ExportKeyword; } /* @internal */ - bool isAsyncModifier(const shared &node) { + bool isAsyncModifier(const node &node) { return node->kind == SyntaxKind::AsyncKeyword; } /* @internal */ - bool isAssertsKeyword(const shared &node) { + bool isAssertsKeyword(const node &node) { return node->kind == SyntaxKind::AssertsKeyword; } /* @internal */ - bool isAwaitKeyword(const shared &node) { + bool isAwaitKeyword(const node &node) { return node->kind == SyntaxKind::AwaitKeyword; } /* @internal */ - bool isReadonlyKeyword(const shared &node) { + bool isReadonlyKeyword(const node &node) { return node->kind == SyntaxKind::ReadonlyKeyword; } /* @internal */ - bool isStaticModifier(const shared &node) { + bool isStaticModifier(const node &node) { return node->kind == SyntaxKind::StaticKeyword; } /* @internal */ - bool isAbstractModifier(const shared &node) { + bool isAbstractModifier(const node &node) { return node->kind == SyntaxKind::AbstractKeyword; } /*@internal*/ - bool isSuperKeyword(const shared &node) { + bool isSuperKeyword(const node &node) { return node->kind == SyntaxKind::SuperKeyword; } /*@internal*/ - bool isImportKeyword(const shared &node) { + bool isImportKeyword(const node &node) { return node->kind == SyntaxKind::ImportKeyword; } // Names - bool isQualifiedName(const shared &node) { + bool isQualifiedName(const node &node) { return node->kind == SyntaxKind::QualifiedName; } - bool isComputedPropertyName(const shared &node) { + bool isComputedPropertyName(const node &node) { return node->kind == SyntaxKind::ComputedPropertyName; } // Signature elements - bool isTypeParameterDeclaration(const shared &node) { + bool isTypeParameterDeclaration(const node &node) { return node->kind == SyntaxKind::TypeParameter; } // TODO(rbuckton): Rename to 'isParameterDeclaration' - bool isParameter(const shared &node) { + bool isParameter(const node &node) { return node->kind == SyntaxKind::Parameter; } - bool isDecorator(const shared &node) { + bool isDecorator(const node &node) { return node->kind == SyntaxKind::Decorator; } // TypeMember - bool isPropertySignature(const shared &node) { + bool isPropertySignature(const node &node) { return node->kind == SyntaxKind::PropertySignature; } - bool isPropertyDeclaration(const shared &node) { + bool isPropertyDeclaration(const node &node) { return node->kind == SyntaxKind::PropertyDeclaration; } - bool isMethodSignature(const shared &node) { + bool isMethodSignature(const node &node) { return node->kind == SyntaxKind::MethodSignature; } - bool isMethodDeclaration(const shared &node) { + bool isMethodDeclaration(const node &node) { return node->kind == SyntaxKind::MethodDeclaration; } - bool isClassStaticBlockDeclaration(const shared &node) { + bool isClassStaticBlockDeclaration(const node &node) { return node->kind == SyntaxKind::ClassStaticBlockDeclaration; } - bool isConstructorDeclaration(const shared &node) { + bool isConstructorDeclaration(const node &node) { return node->kind == SyntaxKind::Constructor; } - bool isGetAccessorDeclaration(const shared &node) { + bool isGetAccessorDeclaration(const node &node) { return node->kind == SyntaxKind::GetAccessor; } - bool isSetAccessorDeclaration(const shared &node) { + bool isSetAccessorDeclaration(const node &node) { return node->kind == SyntaxKind::SetAccessor; } - bool isCallSignatureDeclaration(const shared &node) { + bool isCallSignatureDeclaration(const node &node) { return node->kind == SyntaxKind::CallSignature; } - bool isConstructSignatureDeclaration(const shared &node) { + bool isConstructSignatureDeclaration(const node &node) { return node->kind == SyntaxKind::ConstructSignature; } - bool isIndexSignatureDeclaration(const shared &node) { + bool isIndexSignatureDeclaration(const node &node) { return node->kind == SyntaxKind::IndexSignature; } // Type - bool isTypePredicateNode(const shared &node) { + bool isTypePredicateNode(const node &node) { return node->kind == SyntaxKind::TypePredicate; } - bool isTypeReferenceNode(const shared &node) { + bool isTypeReferenceNode(const node &node) { return node->kind == SyntaxKind::TypeReference; } - bool isFunctionTypeNode(const shared &node) { + bool isFunctionTypeNode(const node &node) { return node->kind == SyntaxKind::FunctionType; } - bool isConstructorTypeNode(const shared &node) { + bool isConstructorTypeNode(const node &node) { return node->kind == SyntaxKind::ConstructorType; } - bool isTypeQueryNode(const shared &node) { + bool isTypeQueryNode(const node &node) { return node->kind == SyntaxKind::TypeQuery; } - bool isTypeLiteralNode(const shared &node) { + bool isTypeLiteralNode(const node &node) { return node->kind == SyntaxKind::TypeLiteral; } - bool isArrayTypeNode(const shared &node) { + bool isArrayTypeNode(const node &node) { return node->kind == SyntaxKind::ArrayType; } - bool isTupleTypeNode(const shared &node) { + bool isTupleTypeNode(const node &node) { return node->kind == SyntaxKind::TupleType; } - bool isNamedTupleMember(const shared &node) { + bool isNamedTupleMember(const node &node) { return node->kind == SyntaxKind::NamedTupleMember; } - bool isOptionalTypeNode(const shared &node) { + bool isOptionalTypeNode(const node &node) { return node->kind == SyntaxKind::OptionalType; } - bool isRestTypeNode(const shared &node) { + bool isRestTypeNode(const node &node) { return node->kind == SyntaxKind::RestType; } - bool isUnionTypeNode(const shared &node) { + bool isUnionTypeNode(const node &node) { return node->kind == SyntaxKind::UnionType; } - bool isIntersectionTypeNode(const shared &node) { + bool isIntersectionTypeNode(const node &node) { return node->kind == SyntaxKind::IntersectionType; } - bool isConditionalTypeNode(const shared &node) { + bool isConditionalTypeNode(const node &node) { return node->kind == SyntaxKind::ConditionalType; } - bool isInferTypeNode(const shared &node) { + bool isInferTypeNode(const node &node) { return node->kind == SyntaxKind::InferType; } - bool isParenthesizedTypeNode(const shared &node) { + bool isParenthesizedTypeNode(const node &node) { return node->kind == SyntaxKind::ParenthesizedType; } - bool isThisTypeNode(const shared &node) { + bool isThisTypeNode(const node &node) { return node->kind == SyntaxKind::ThisType; } - bool isTypeOperatorNode(const shared &node) { + bool isTypeOperatorNode(const node &node) { return node->kind == SyntaxKind::TypeOperator; } - bool isIndexedAccessTypeNode(const shared &node) { + bool isIndexedAccessTypeNode(const node &node) { return node->kind == SyntaxKind::IndexedAccessType; } - bool isMappedTypeNode(const shared &node) { + bool isMappedTypeNode(const node &node) { return node->kind == SyntaxKind::MappedType; } - bool isLiteralTypeNode(const shared &node) { + bool isLiteralTypeNode(const node &node) { return node->kind == SyntaxKind::LiteralType; } - bool isImportTypeNode(const shared &node) { + bool isImportTypeNode(const node &node) { return node->kind == SyntaxKind::ImportType; } - bool isTemplateLiteralTypeSpan(const shared &node) { + bool isTemplateLiteralTypeSpan(const node &node) { return node->kind == SyntaxKind::TemplateLiteralTypeSpan; } - bool isTemplateLiteralTypeNode(const shared &node) { + bool isTemplateLiteralTypeNode(const node &node) { return node->kind == SyntaxKind::TemplateLiteralType; } // Binding patterns - bool isObjectBindingPattern(const shared &node) { + bool isObjectBindingPattern(const node &node) { return node->kind == SyntaxKind::ObjectBindingPattern; } - bool isArrayBindingPattern(const shared &node) { + bool isArrayBindingPattern(const node &node) { return node->kind == SyntaxKind::ArrayBindingPattern; } - bool isBindingElement(const shared &node) { + bool isBindingElement(const node &node) { return node->kind == SyntaxKind::BindingElement; } // Expression - bool isArrayLiteralExpression(const shared &node) { + bool isArrayLiteralExpression(const node &node) { return node->kind == SyntaxKind::ArrayLiteralExpression; } - bool isObjectLiteralExpression(const shared &node) { + bool isObjectLiteralExpression(const node &node) { return node->kind == SyntaxKind::ObjectLiteralExpression; } - bool isPropertyAccessExpression(const shared &node) { + bool isPropertyAccessExpression(const node &node) { return node->kind == SyntaxKind::PropertyAccessExpression; } - bool isElementAccessExpression(const shared &node) { + bool isElementAccessExpression(const node &node) { return node->kind == SyntaxKind::ElementAccessExpression; } - bool isCallExpression(const shared &node) { + bool isCallExpression(const node &node) { return node->kind == SyntaxKind::CallExpression; } - bool isCallChain(shared node) { + bool isCallChain(node node) { return isCallExpression(node) && !!(node->flags & (int)NodeFlags::OptionalChain); } - bool isNewExpression(const shared &node) { + bool isNewExpression(const node &node) { return node->kind == SyntaxKind::NewExpression; } - bool isTaggedTemplateExpression(const shared &node) { + bool isTaggedTemplateExpression(const node &node) { return node->kind == SyntaxKind::TaggedTemplateExpression; } - bool isTypeAssertionExpression(const shared &node) { + bool isTypeAssertionExpression(const node &node) { return node->kind == SyntaxKind::TypeAssertionExpression; } - bool isParenthesizedExpression(const shared &node) { + bool isParenthesizedExpression(const node &node) { return node->kind == SyntaxKind::ParenthesizedExpression; } - bool isFunctionExpression(const shared &node) { + bool isFunctionExpression(const node &node) { return node->kind == SyntaxKind::FunctionExpression; } - bool isArrowFunction(const shared &node) { + bool isArrowFunction(const node &node) { return node->kind == SyntaxKind::ArrowFunction; } - bool isDeleteExpression(const shared &node) { + bool isDeleteExpression(const node &node) { return node->kind == SyntaxKind::DeleteExpression; } - bool isTypeOfExpression(const shared &node) { + bool isTypeOfExpression(const node &node) { return node->kind == SyntaxKind::TypeOfExpression; } - bool isVoidExpression(const shared &node) { + bool isVoidExpression(const node &node) { return node->kind == SyntaxKind::VoidExpression; } - bool isAwaitExpression(const shared &node) { + bool isAwaitExpression(const node &node) { return node->kind == SyntaxKind::AwaitExpression; } - bool isPrefixUnaryExpression(const shared &node) { + bool isPrefixUnaryExpression(const node &node) { return node->kind == SyntaxKind::PrefixUnaryExpression; } - bool isPostfixUnaryExpression(const shared &node) { + bool isPostfixUnaryExpression(const node &node) { return node->kind == SyntaxKind::PostfixUnaryExpression; } - bool isBinaryExpression(const shared &node) { + bool isBinaryExpression(const node &node) { return node->kind == SyntaxKind::BinaryExpression; } - bool isConditionalExpression(const shared &node) { + bool isConditionalExpression(const node &node) { return node->kind == SyntaxKind::ConditionalExpression; } - bool isTemplateExpression(const shared &node) { + bool isTemplateExpression(const node &node) { return node->kind == SyntaxKind::TemplateExpression; } - bool isYieldExpression(const shared &node) { + bool isYieldExpression(const node &node) { return node->kind == SyntaxKind::YieldExpression; } - bool isSpreadElement(const shared &node) { + bool isSpreadElement(const node &node) { return node->kind == SyntaxKind::SpreadElement; } - bool isClassExpression(const shared &node) { + bool isClassExpression(const node &node) { return node->kind == SyntaxKind::ClassExpression; } - bool isOmittedExpression(const shared &node) { + bool isOmittedExpression(const node &node) { return node->kind == SyntaxKind::OmittedExpression; } - bool isExpressionWithTypeArguments(const shared &node) { + bool isExpressionWithTypeArguments(const node &node) { return node->kind == SyntaxKind::ExpressionWithTypeArguments; } - bool isAsExpression(const shared &node) { + bool isAsExpression(const node &node) { return node->kind == SyntaxKind::AsExpression; } - bool isNonNullExpression(const shared &node) { + bool isNonNullExpression(const node &node) { return node->kind == SyntaxKind::NonNullExpression; } - bool isNonNullChain(shared node) { + bool isNonNullChain(node node) { return isNonNullExpression(node) && !!(node->flags & (int)NodeFlags::OptionalChain); } - bool isMetaProperty(const shared &node) { + bool isMetaProperty(const node &node) { return node->kind == SyntaxKind::MetaProperty; } - bool isSyntheticExpression(const shared &node) { + bool isSyntheticExpression(const node &node) { return node->kind == SyntaxKind::SyntheticExpression; } - bool isPartiallyEmittedExpression(const shared &node) { + bool isPartiallyEmittedExpression(const node &node) { return node->kind == SyntaxKind::PartiallyEmittedExpression; } - bool isCommaListExpression(const shared &node) { + bool isCommaListExpression(const node &node) { return node->kind == SyntaxKind::CommaListExpression; } // Misc - bool isTemplateSpan(const shared &node) { + bool isTemplateSpan(const node &node) { return node->kind == SyntaxKind::TemplateSpan; } - bool isSemicolonClassElement(const shared &node) { + bool isSemicolonClassElement(const node &node) { return node->kind == SyntaxKind::SemicolonClassElement; } // Elements - bool isBlock(const shared &node) { + bool isBlock(const node &node) { return node->kind == SyntaxKind::Block; } - bool isVariableStatement(const shared &node) { + bool isVariableStatement(const node &node) { return node->kind == SyntaxKind::VariableStatement; } - bool isEmptyStatement(const shared &node) { + bool isEmptyStatement(const node &node) { return node->kind == SyntaxKind::EmptyStatement; } - bool isExpressionStatement(const shared &node) { + bool isExpressionStatement(const node &node) { return node->kind == SyntaxKind::ExpressionStatement; } - bool isIfStatement(const shared &node) { + bool isIfStatement(const node &node) { return node->kind == SyntaxKind::IfStatement; } - bool isDoStatement(const shared &node) { + bool isDoStatement(const node &node) { return node->kind == SyntaxKind::DoStatement; } - bool isWhileStatement(const shared &node) { + bool isWhileStatement(const node &node) { return node->kind == SyntaxKind::WhileStatement; } - bool isForStatement(const shared &node) { + bool isForStatement(const node &node) { return node->kind == SyntaxKind::ForStatement; } - bool isForInStatement(const shared &node) { + bool isForInStatement(const node &node) { return node->kind == SyntaxKind::ForInStatement; } - bool isForOfStatement(const shared &node) { + bool isForOfStatement(const node &node) { return node->kind == SyntaxKind::ForOfStatement; } - bool isContinueStatement(const shared &node) { + bool isContinueStatement(const node &node) { return node->kind == SyntaxKind::ContinueStatement; } - bool isBreakStatement(const shared &node) { + bool isBreakStatement(const node &node) { return node->kind == SyntaxKind::BreakStatement; } - bool isReturnStatement(const shared &node) { + bool isReturnStatement(const node &node) { return node->kind == SyntaxKind::ReturnStatement; } - bool isWithStatement(const shared &node) { + bool isWithStatement(const node &node) { return node->kind == SyntaxKind::WithStatement; } - bool isSwitchStatement(const shared &node) { + bool isSwitchStatement(const node &node) { return node->kind == SyntaxKind::SwitchStatement; } - bool isLabeledStatement(const shared &node) { + bool isLabeledStatement(const node &node) { return node->kind == SyntaxKind::LabeledStatement; } - bool isThrowStatement(const shared &node) { + bool isThrowStatement(const node &node) { return node->kind == SyntaxKind::ThrowStatement; } - bool isTryStatement(const shared &node) { + bool isTryStatement(const node &node) { return node->kind == SyntaxKind::TryStatement; } - bool isDebuggerStatement(const shared &node) { + bool isDebuggerStatement(const node &node) { return node->kind == SyntaxKind::DebuggerStatement; } - bool isVariableDeclaration(const shared &node) { + bool isVariableDeclaration(const node &node) { return node->kind == SyntaxKind::VariableDeclaration; } - bool isVariableDeclarationList(const shared &node) { + bool isVariableDeclarationList(const node &node) { return node->kind == SyntaxKind::VariableDeclarationList; } - bool isFunctionDeclaration(const shared &node) { + bool isFunctionDeclaration(const node &node) { return node->kind == SyntaxKind::FunctionDeclaration; } - bool isClassDeclaration(const shared &node) { + bool isClassDeclaration(const node &node) { return node->kind == SyntaxKind::ClassDeclaration; } - bool isInterfaceDeclaration(const shared &node) { + bool isInterfaceDeclaration(const node &node) { return node->kind == SyntaxKind::InterfaceDeclaration; } - bool isTypeAliasDeclaration(const shared &node) { + bool isTypeAliasDeclaration(const node &node) { return node->kind == SyntaxKind::TypeAliasDeclaration; } - bool isEnumDeclaration(const shared &node) { + bool isEnumDeclaration(const node &node) { return node->kind == SyntaxKind::EnumDeclaration; } - bool isModuleDeclaration(const shared &node) { + bool isModuleDeclaration(const node &node) { return node->kind == SyntaxKind::ModuleDeclaration; } - bool isModuleBlock(const shared &node) { + bool isModuleBlock(const node &node) { return node->kind == SyntaxKind::ModuleBlock; } - bool isCaseBlock(const shared &node) { + bool isCaseBlock(const node &node) { return node->kind == SyntaxKind::CaseBlock; } - bool isNamespaceExportDeclaration(const shared &node) { + bool isNamespaceExportDeclaration(const node &node) { return node->kind == SyntaxKind::NamespaceExportDeclaration; } - bool isImportEqualsDeclaration(const shared &node) { + bool isImportEqualsDeclaration(const node &node) { return node->kind == SyntaxKind::ImportEqualsDeclaration; } - bool isImportDeclaration(const shared &node) { + bool isImportDeclaration(const node &node) { return node->kind == SyntaxKind::ImportDeclaration; } - bool isImportClause(const shared &node) { + bool isImportClause(const node &node) { return node->kind == SyntaxKind::ImportClause; } - bool isAssertClause(const shared &node) { + bool isAssertClause(const node &node) { return node->kind == SyntaxKind::AssertClause; } - bool isAssertEntry(const shared &node) { + bool isAssertEntry(const node &node) { return node->kind == SyntaxKind::AssertEntry; } - bool isNamespaceImport(const shared &node) { + bool isNamespaceImport(const node &node) { return node->kind == SyntaxKind::NamespaceImport; } - bool isNamespaceExport(const shared &node) { + bool isNamespaceExport(const node &node) { return node->kind == SyntaxKind::NamespaceExport; } - bool isNamedImports(const shared &node) { + bool isNamedImports(const node &node) { return node->kind == SyntaxKind::NamedImports; } - bool isImportSpecifier(const shared &node) { + bool isImportSpecifier(const node &node) { return node->kind == SyntaxKind::ImportSpecifier; } - bool isExportAssignment(const shared &node) { + bool isExportAssignment(const node &node) { return node->kind == SyntaxKind::ExportAssignment; } - bool isExportDeclaration(const shared &node) { + bool isExportDeclaration(const node &node) { return node->kind == SyntaxKind::ExportDeclaration; } - bool isNamedExports(const shared &node) { + bool isNamedExports(const node &node) { return node->kind == SyntaxKind::NamedExports; } - bool isExportSpecifier(const shared &node) { + bool isExportSpecifier(const node &node) { return node->kind == SyntaxKind::ExportSpecifier; } - bool isMissingDeclaration(const shared &node) { + bool isMissingDeclaration(const node &node) { return node->kind == SyntaxKind::MissingDeclaration; } - bool isNotEmittedStatement(const shared &node) { + bool isNotEmittedStatement(const node &node) { return node->kind == SyntaxKind::NotEmittedStatement; } /* @internal */ - bool isSyntheticReference(const shared &node) { + bool isSyntheticReference(const node &node) { return node->kind == SyntaxKind::SyntheticReferenceExpression; } /* @internal */ - bool isMergeDeclarationMarker(const shared &node) { + bool isMergeDeclarationMarker(const node &node) { return node->kind == SyntaxKind::MergeDeclarationMarker; } /* @internal */ - bool isEndOfDeclarationMarker(const shared &node) { + bool isEndOfDeclarationMarker(const node &node) { return node->kind == SyntaxKind::EndOfDeclarationMarker; } // Module References - bool isExternalModuleReference(const shared &node) { + bool isExternalModuleReference(const node &node) { return node->kind == SyntaxKind::ExternalModuleReference; } // JSX - bool isJsxElement(const shared &node) { + bool isJsxElement(const node &node) { return node->kind == SyntaxKind::JsxElement; } - bool isJsxSelfClosingElement(const shared &node) { + bool isJsxSelfClosingElement(const node &node) { return node->kind == SyntaxKind::JsxSelfClosingElement; } - bool isJsxOpeningElement(const shared &node) { + bool isJsxOpeningElement(const node &node) { return node->kind == SyntaxKind::JsxOpeningElement; } - bool isJsxClosingElement(const shared &node) { + bool isJsxClosingElement(const node &node) { return node->kind == SyntaxKind::JsxClosingElement; } - bool isJsxFragment(const shared &node) { + bool isJsxFragment(const node &node) { return node->kind == SyntaxKind::JsxFragment; } - bool isJsxOpeningFragment(const shared &node) { + bool isJsxOpeningFragment(const node &node) { return node->kind == SyntaxKind::JsxOpeningFragment; } - bool isJsxClosingFragment(const shared &node) { + bool isJsxClosingFragment(const node &node) { return node->kind == SyntaxKind::JsxClosingFragment; } - bool isJsxAttribute(const shared &node) { + bool isJsxAttribute(const node &node) { return node->kind == SyntaxKind::JsxAttribute; } - bool isJsxAttributes(const shared &node) { + bool isJsxAttributes(const node &node) { return node->kind == SyntaxKind::JsxAttributes; } - bool isJsxSpreadAttribute(const shared &node) { + bool isJsxSpreadAttribute(const node &node) { return node->kind == SyntaxKind::JsxSpreadAttribute; } - bool isJsxExpression(const shared &node) { + bool isJsxExpression(const node &node) { return node->kind == SyntaxKind::JsxExpression; } // Clauses - bool isCaseClause(const shared &node) { + bool isCaseClause(const node &node) { return node->kind == SyntaxKind::CaseClause; } - bool isDefaultClause(const shared &node) { + bool isDefaultClause(const node &node) { return node->kind == SyntaxKind::DefaultClause; } - bool isHeritageClause(const shared &node) { + bool isHeritageClause(const node &node) { return node->kind == SyntaxKind::HeritageClause; } - bool isCatchClause(const shared &node) { + bool isCatchClause(const node &node) { return node->kind == SyntaxKind::CatchClause; } // Property assignments - bool isPropertyAssignment(const shared &node) { + bool isPropertyAssignment(const node &node) { return node->kind == SyntaxKind::PropertyAssignment; } - bool isShorthandPropertyAssignment(const shared &node) { + bool isShorthandPropertyAssignment(const node &node) { return node->kind == SyntaxKind::ShorthandPropertyAssignment; } - bool isSpreadAssignment(const shared &node) { + bool isSpreadAssignment(const node &node) { return node->kind == SyntaxKind::SpreadAssignment; } // Enum - bool isEnumMember(const shared &node) { + bool isEnumMember(const node &node) { return node->kind == SyntaxKind::EnumMember; } @@ -1080,7 +1082,7 @@ namespace tr { // TODO(rbuckton): isUnparsedPrologue - bool isUnparsedPrepend(const shared &node) { + bool isUnparsedPrepend(const node &node) { return node->kind == SyntaxKind::UnparsedPrepend; } @@ -1089,15 +1091,15 @@ namespace tr { // TODO(rbuckton): isUnparsedSyntheticReference // Top-level nodes - bool isSourceFile(const shared &node) { + bool isSourceFile(const node &node) { return node->kind == SyntaxKind::SourceFile; } - bool isBundle(const shared &node) { + bool isBundle(const node &node) { return node->kind == SyntaxKind::Bundle; } - bool isUnparsedSource(const shared &node) { + bool isUnparsedSource(const node &node) { return node->kind == SyntaxKind::UnparsedSource; } @@ -1105,164 +1107,164 @@ namespace tr { // JSDoc Elements - bool isJSDocTypeExpression(const shared &node) { + bool isJSDocTypeExpression(const node &node) { return node->kind == SyntaxKind::JSDocTypeExpression; } - bool isJSDocNameReference(const shared &node) { + bool isJSDocNameReference(const node &node) { return node->kind == SyntaxKind::JSDocNameReference; } - bool isJSDocMemberName(const shared &node) { + bool isJSDocMemberName(const node &node) { return node->kind == SyntaxKind::JSDocMemberName; } - bool isJSDocLink(const shared &node) { + bool isJSDocLink(const node &node) { return node->kind == SyntaxKind::JSDocLink; } - bool isJSDocLinkCode(const shared &node) { + bool isJSDocLinkCode(const node &node) { return node->kind == SyntaxKind::JSDocLinkCode; } - bool isJSDocLinkPlain(const shared &node) { + bool isJSDocLinkPlain(const node &node) { return node->kind == SyntaxKind::JSDocLinkPlain; } - bool isJSDocAllType(const shared &node) { + bool isJSDocAllType(const node &node) { return node->kind == SyntaxKind::JSDocAllType; } - bool isJSDocUnknownType(const shared &node) { + bool isJSDocUnknownType(const node &node) { return node->kind == SyntaxKind::JSDocUnknownType; } - bool isJSDocNullableType(const shared &node) { + bool isJSDocNullableType(const node &node) { return node->kind == SyntaxKind::JSDocNullableType; } - bool isJSDocNonNullableType(const shared &node) { + bool isJSDocNonNullableType(const node &node) { return node->kind == SyntaxKind::JSDocNonNullableType; } - bool isJSDocOptionalType(const shared &node) { + bool isJSDocOptionalType(const node &node) { return node->kind == SyntaxKind::JSDocOptionalType; } - bool isJSDocFunctionType(const shared &node) { + bool isJSDocFunctionType(const node &node) { return node->kind == SyntaxKind::JSDocFunctionType; } - bool isJSDocVariadicType(const shared &node) { + bool isJSDocVariadicType(const node &node) { return node->kind == SyntaxKind::JSDocVariadicType; } - bool isJSDocNamepathType(const shared &node) { + bool isJSDocNamepathType(const node &node) { return node->kind == SyntaxKind::JSDocNamepathType; } - bool isJSDoc(const shared &node) { + bool isJSDoc(const node &node) { return node->kind == SyntaxKind::JSDoc; } - bool isJSDocTypeLiteral(const shared &node) { + bool isJSDocTypeLiteral(const node &node) { return node->kind == SyntaxKind::JSDocTypeLiteral; } - bool isJSDocSignature(const shared &node) { + bool isJSDocSignature(const node &node) { return node->kind == SyntaxKind::JSDocSignature; } // JSDoc Tags - bool isJSDocAugmentsTag(const shared &node) { + bool isJSDocAugmentsTag(const node &node) { return node->kind == SyntaxKind::JSDocAugmentsTag; } - bool isJSDocAuthorTag(const shared &node) { + bool isJSDocAuthorTag(const node &node) { return node->kind == SyntaxKind::JSDocAuthorTag; } - bool isJSDocClassTag(const shared &node) { + bool isJSDocClassTag(const node &node) { return node->kind == SyntaxKind::JSDocClassTag; } - bool isJSDocCallbackTag(const shared &node) { + bool isJSDocCallbackTag(const node &node) { return node->kind == SyntaxKind::JSDocCallbackTag; } - bool isJSDocPublicTag(const shared &node) { + bool isJSDocPublicTag(const node &node) { return node->kind == SyntaxKind::JSDocPublicTag; } - bool isJSDocPrivateTag(const shared &node) { + bool isJSDocPrivateTag(const node &node) { return node->kind == SyntaxKind::JSDocPrivateTag; } - bool isJSDocProtectedTag(const shared &node) { + bool isJSDocProtectedTag(const node &node) { return node->kind == SyntaxKind::JSDocProtectedTag; } - bool isJSDocReadonlyTag(const shared &node) { + bool isJSDocReadonlyTag(const node &node) { return node->kind == SyntaxKind::JSDocReadonlyTag; } - bool isJSDocOverrideTag(const shared &node) { + bool isJSDocOverrideTag(const node &node) { return node->kind == SyntaxKind::JSDocOverrideTag; } - bool isJSDocDeprecatedTag(const shared &node) { + bool isJSDocDeprecatedTag(const node &node) { return node->kind == SyntaxKind::JSDocDeprecatedTag; } - bool isJSDocSeeTag(const shared &node) { + bool isJSDocSeeTag(const node &node) { return node->kind == SyntaxKind::JSDocSeeTag; } - bool isJSDocEnumTag(const shared &node) { + bool isJSDocEnumTag(const node &node) { return node->kind == SyntaxKind::JSDocEnumTag; } - bool isJSDocParameterTag(const shared &node) { + bool isJSDocParameterTag(const node &node) { return node->kind == SyntaxKind::JSDocParameterTag; } - bool isJSDocReturnTag(const shared &node) { + bool isJSDocReturnTag(const node &node) { return node->kind == SyntaxKind::JSDocReturnTag; } - bool isJSDocThisTag(const shared &node) { + bool isJSDocThisTag(const node &node) { return node->kind == SyntaxKind::JSDocThisTag; } - bool isJSDocTypeTag(const shared &node) { + bool isJSDocTypeTag(const node &node) { return node->kind == SyntaxKind::JSDocTypeTag; } - bool isJSDocTemplateTag(const shared &node) { + bool isJSDocTemplateTag(const node &node) { return node->kind == SyntaxKind::JSDocTemplateTag; } - bool isJSDocTypedefTag(const shared &node) { + bool isJSDocTypedefTag(const node &node) { return node->kind == SyntaxKind::JSDocTypedefTag; } - bool isJSDocUnknownTag(const shared &node) { + bool isJSDocUnknownTag(const node &node) { return node->kind == SyntaxKind::JSDocTag; } - bool isJSDocPropertyTag(const shared &node) { + bool isJSDocPropertyTag(const node &node) { return node->kind == SyntaxKind::JSDocPropertyTag; } - bool isJSDocImplementsTag(const shared &node) { + bool isJSDocImplementsTag(const node &node) { return node->kind == SyntaxKind::JSDocImplementsTag; } // Synthesized list /* @internal */ - bool isSyntaxList(const shared &node) { + bool isSyntaxList(const node &node) { return node->kind == SyntaxKind::SyntaxList; } } diff --git a/src/node_test.h b/src/node_test.h index c74dcb8..8a6c9fe 100644 --- a/src/node_test.h +++ b/src/node_test.h @@ -12,567 +12,567 @@ namespace tr { /** * Gets flags that control emit behavior of a node. */ - int getEmitFlags(const shared &node); + int getEmitFlags(const node &node); - bool isCommaSequence(shared node); + bool isCommaSequence(node node); bool isAssignmentOperator(SyntaxKind token); /** * Gets whether an identifier should only be referred to by its local name. */ - bool isLocalName(const shared &node); + bool isLocalName(const node &node); - bool hasModifier(const shared &node, SyntaxKind kind); + bool hasModifier(const node &node, SyntaxKind kind); ModifierFlags modifierToFlag(SyntaxKind token); - int modifiersToFlags(sharedOpt modifiers); + int modifiersToFlags(optionalNode modifiers); /** * Gets the ModifierFlags for syntactic modifiers on the provided node. The modifier flags cache on the node is ignored. * * NOTE: This function does not use `parent` pointers and will not include modifiers from JSDoc. */ - int getSyntacticModifierFlagsNoCache(shared node); + int getSyntacticModifierFlagsNoCache(node node); - int getModifierFlagsWorker(shared node, bool includeJSDoc, optional alwaysIncludeJSDoc = {}); + int getModifierFlagsWorker(node node, bool includeJSDoc, optional alwaysIncludeJSDoc = {}); - int getSyntacticModifierFlags(shared node); + int getSyntacticModifierFlags(node node); - int getSelectedSyntacticModifierFlags(shared node, int flags); + int getSelectedSyntacticModifierFlags(node node, int flags); - bool hasSyntacticModifier(shared node, int flags); + bool hasSyntacticModifier(node node, int flags); - bool hasStaticModifier(shared node); + bool hasStaticModifier(node node); - shared resolveNameToNode(const shared &node); + node resolveNameToNode(const node &node); - bool isFunctionOrConstructorTypeNode(shared node); + bool isFunctionOrConstructorTypeNode(node node); - sharedOpt getTypeParameters(shared node); + optionalNode getTypeParameters(node node); - shared getTagName(shared node); + node getTagName(node node); - string &getEscapedName(const shared &node); + string &getEscapedName(const node &node); - sharedOpt getName(const shared &node); + optionalNode getName(const node &node); - bool isNumericLiteral(const shared &node); + bool isNumericLiteral(const node &node); - bool isBigIntLiteral(const shared &node); + bool isBigIntLiteral(const node &node); - bool isStringLiteral(const shared &node); + bool isStringLiteral(const node &node); - bool isJsxText(const shared &node); + bool isJsxText(const node &node); - bool isRegularExpressionLiteral(const shared &node); + bool isRegularExpressionLiteral(const node &node); - bool isNoSubstitutionTemplateLiteral(const shared &node); + bool isNoSubstitutionTemplateLiteral(const node &node); - bool isStringLiteralLike(shared node); + bool isStringLiteralLike(node node); - bool isStringOrNumericLiteralLike(shared node); + bool isStringOrNumericLiteralLike(node node); // Pseudo-literals - bool isTemplateHead(const shared &node); + bool isTemplateHead(const node &node); - bool isTemplateMiddle(const shared &node); + bool isTemplateMiddle(const node &node); - bool isTemplateTail(const shared &node); + bool isTemplateTail(const node &node); // Punctuation - bool isDotDotDotToken(const shared &node); + bool isDotDotDotToken(const node &node); /*@internal*/ - bool isCommaToken(const shared &node); + bool isCommaToken(const node &node); - bool isPlusToken(const shared &node); + bool isPlusToken(const node &node); - bool isMinusToken(const shared &node); + bool isMinusToken(const node &node); - bool isAsteriskToken(const shared &node); + bool isAsteriskToken(const node &node); /*@internal*/ - bool isExclamationToken(const shared &node); + bool isExclamationToken(const node &node); /*@internal*/ - bool isQuestionToken(const shared &node); + bool isQuestionToken(const node &node); /*@internal*/ - bool isColonToken(const shared &node); + bool isColonToken(const node &node); /*@internal*/ - bool isQuestionDotToken(const shared &node); + bool isQuestionDotToken(const node &node); /*@internal*/ - bool isEqualsGreaterThanToken(const shared &node); + bool isEqualsGreaterThanToken(const node &node); // Identifiers - bool isIdentifier(const shared &node); + bool isIdentifier(const node &node); - bool isPrivateIdentifier(const shared &node); + bool isPrivateIdentifier(const node &node); - bool identifierIsThisKeyword(const shared &id); + bool identifierIsThisKeyword(const node &id); - bool isThisIdentifier(sharedOpt node); + bool isThisIdentifier(optionalNode node); /** * Determines whether a node is a property or element access expression for `super`. */ - bool isSuperProperty(shared node); + bool isSuperProperty(node node); // Reserved Words /* @internal */ - bool isExportModifier(const shared &node); + bool isExportModifier(const node &node); /* @internal */ - bool isAsyncModifier(const shared &node); + bool isAsyncModifier(const node &node); /* @internal */ - bool isAssertsKeyword(const shared &node); + bool isAssertsKeyword(const node &node); /* @internal */ - bool isAwaitKeyword(const shared &node); + bool isAwaitKeyword(const node &node); /* @internal */ - bool isReadonlyKeyword(const shared &node); + bool isReadonlyKeyword(const node &node); /* @internal */ - bool isStaticModifier(const shared &node); + bool isStaticModifier(const node &node); /* @internal */ - bool isAbstractModifier(const shared &node); + bool isAbstractModifier(const node &node); /*@internal*/ - bool isSuperKeyword(const shared &node); + bool isSuperKeyword(const node &node); /*@internal*/ - bool isImportKeyword(const shared &node); + bool isImportKeyword(const node &node); // Names - bool isQualifiedName(const shared &node); + bool isQualifiedName(const node &node); - bool isComputedPropertyName(const shared &node); + bool isComputedPropertyName(const node &node); // Signature elements - bool isTypeParameterDeclaration(const shared &node); + bool isTypeParameterDeclaration(const node &node); // TODO(rbuckton): Rename to 'isParameterDeclaration' - bool isParameter(const shared &node); + bool isParameter(const node &node); - bool isDecorator(const shared &node); + bool isDecorator(const node &node); // TypeMember - bool isPropertySignature(const shared &node); + bool isPropertySignature(const node &node); - bool isPropertyDeclaration(const shared &node); + bool isPropertyDeclaration(const node &node); - bool isMethodSignature(const shared &node); + bool isMethodSignature(const node &node); - bool isMethodDeclaration(const shared &node); + bool isMethodDeclaration(const node &node); - bool isClassStaticBlockDeclaration(const shared &node); + bool isClassStaticBlockDeclaration(const node &node); - bool isConstructorDeclaration(const shared &node); + bool isConstructorDeclaration(const node &node); - bool isGetAccessorDeclaration(const shared &node); + bool isGetAccessorDeclaration(const node &node); - bool isSetAccessorDeclaration(const shared &node); + bool isSetAccessorDeclaration(const node &node); - bool isCallSignatureDeclaration(const shared &node); + bool isCallSignatureDeclaration(const node &node); - bool isConstructSignatureDeclaration(const shared &node); + bool isConstructSignatureDeclaration(const node &node); - bool isIndexSignatureDeclaration(const shared &node); + bool isIndexSignatureDeclaration(const node &node); // Type - bool isTypePredicateNode(const shared &node); + bool isTypePredicateNode(const node &node); - bool isTypeReferenceNode(const shared &node); + bool isTypeReferenceNode(const node &node); - bool isFunctionTypeNode(const shared &node); + bool isFunctionTypeNode(const node &node); - bool isConstructorTypeNode(const shared &node); + bool isConstructorTypeNode(const node &node); - bool isTypeQueryNode(const shared &node); + bool isTypeQueryNode(const node &node); - bool isTypeLiteralNode(const shared &node); + bool isTypeLiteralNode(const node &node); - bool isArrayTypeNode(const shared &node); + bool isArrayTypeNode(const node &node); - bool isTupleTypeNode(const shared &node); + bool isTupleTypeNode(const node &node); - bool isNamedTupleMember(const shared &node); + bool isNamedTupleMember(const node &node); - bool isOptionalTypeNode(const shared &node); + bool isOptionalTypeNode(const node &node); - bool isRestTypeNode(const shared &node); + bool isRestTypeNode(const node &node); - bool isUnionTypeNode(const shared &node); + bool isUnionTypeNode(const node &node); - bool isIntersectionTypeNode(const shared &node); + bool isIntersectionTypeNode(const node &node); - bool isConditionalTypeNode(const shared &node); + bool isConditionalTypeNode(const node &node); - bool isInferTypeNode(const shared &node); + bool isInferTypeNode(const node &node); - bool isParenthesizedTypeNode(const shared &node); + bool isParenthesizedTypeNode(const node &node); - bool isThisTypeNode(const shared &node); + bool isThisTypeNode(const node &node); - bool isTypeOperatorNode(const shared &node); + bool isTypeOperatorNode(const node &node); - bool isIndexedAccessTypeNode(const shared &node); + bool isIndexedAccessTypeNode(const node &node); - bool isMappedTypeNode(const shared &node); + bool isMappedTypeNode(const node &node); - bool isLiteralTypeNode(const shared &node); + bool isLiteralTypeNode(const node &node); - bool isImportTypeNode(const shared &node); + bool isImportTypeNode(const node &node); - bool isTemplateLiteralTypeSpan(const shared &node); + bool isTemplateLiteralTypeSpan(const node &node); - bool isTemplateLiteralTypeNode(const shared &node); + bool isTemplateLiteralTypeNode(const node &node); // Binding patterns - bool isObjectBindingPattern(const shared &node); + bool isObjectBindingPattern(const node &node); - bool isArrayBindingPattern(const shared &node); + bool isArrayBindingPattern(const node &node); - bool isBindingElement(const shared &node); + bool isBindingElement(const node &node); // Expression - bool isArrayLiteralExpression(const shared &node); + bool isArrayLiteralExpression(const node &node); - bool isObjectLiteralExpression(const shared &node); + bool isObjectLiteralExpression(const node &node); - bool isPropertyAccessExpression(const shared &node); + bool isPropertyAccessExpression(const node &node); - bool isElementAccessExpression(const shared &node); + bool isElementAccessExpression(const node &node); - bool isCallExpression(const shared &node); + bool isCallExpression(const node &node); - bool isCallChain(shared node); + bool isCallChain(node node); - bool isNewExpression(const shared &node); + bool isNewExpression(const node &node); - bool isTaggedTemplateExpression(const shared &node); + bool isTaggedTemplateExpression(const node &node); - bool isTypeAssertionExpression(const shared &node); + bool isTypeAssertionExpression(const node &node); - bool isParenthesizedExpression(const shared &node); + bool isParenthesizedExpression(const node &node); - bool isFunctionExpression(const shared &node); + bool isFunctionExpression(const node &node); - bool isArrowFunction(const shared &node); + bool isArrowFunction(const node &node); - bool isDeleteExpression(const shared &node); + bool isDeleteExpression(const node &node); - bool isTypeOfExpression(const shared &node); + bool isTypeOfExpression(const node &node); - bool isVoidExpression(const shared &node); + bool isVoidExpression(const node &node); - bool isAwaitExpression(const shared &node); + bool isAwaitExpression(const node &node); - bool isPrefixUnaryExpression(const shared &node); + bool isPrefixUnaryExpression(const node &node); - bool isPostfixUnaryExpression(const shared &node); + bool isPostfixUnaryExpression(const node &node); - bool isBinaryExpression(const shared &node); + bool isBinaryExpression(const node &node); - bool isConditionalExpression(const shared &node); + bool isConditionalExpression(const node &node); - bool isTemplateExpression(const shared &node); + bool isTemplateExpression(const node &node); - bool isYieldExpression(const shared &node); + bool isYieldExpression(const node &node); - bool isSpreadElement(const shared &node); + bool isSpreadElement(const node &node); - bool isClassExpression(const shared &node); + bool isClassExpression(const node &node); - bool isOmittedExpression(const shared &node); + bool isOmittedExpression(const node &node); - bool isExpressionWithTypeArguments(const shared &node); + bool isExpressionWithTypeArguments(const node &node); - bool isAsExpression(const shared &node); + bool isAsExpression(const node &node); - bool isNonNullExpression(const shared &node); + bool isNonNullExpression(const node &node); - bool isNonNullChain(shared node); + bool isNonNullChain(node node); - bool isMetaProperty(const shared &node); + bool isMetaProperty(const node &node); - bool isSyntheticExpression(const shared &node); + bool isSyntheticExpression(const node &node); - bool isPartiallyEmittedExpression(const shared &node); + bool isPartiallyEmittedExpression(const node &node); - bool isCommaListExpression(const shared &node); + bool isCommaListExpression(const node &node); // Misc - bool isTemplateSpan(const shared &node); + bool isTemplateSpan(const node &node); - bool isSemicolonClassElement(const shared &node); + bool isSemicolonClassElement(const node &node); // Elements - bool isBlock(const shared &node); + bool isBlock(const node &node); - bool isVariableStatement(const shared &node); + bool isVariableStatement(const node &node); - bool isEmptyStatement(const shared &node); + bool isEmptyStatement(const node &node); - bool isExpressionStatement(const shared &node); + bool isExpressionStatement(const node &node); - bool isIfStatement(const shared &node); + bool isIfStatement(const node &node); - bool isDoStatement(const shared &node); + bool isDoStatement(const node &node); - bool isWhileStatement(const shared &node); + bool isWhileStatement(const node &node); - bool isForStatement(const shared &node); + bool isForStatement(const node &node); - bool isForInStatement(const shared &node); + bool isForInStatement(const node &node); - bool isForOfStatement(const shared &node); + bool isForOfStatement(const node &node); - bool isContinueStatement(const shared &node); + bool isContinueStatement(const node &node); - bool isBreakStatement(const shared &node); + bool isBreakStatement(const node &node); - bool isReturnStatement(const shared &node); + bool isReturnStatement(const node &node); - bool isWithStatement(const shared &node); + bool isWithStatement(const node &node); - bool isSwitchStatement(const shared &node); + bool isSwitchStatement(const node &node); - bool isLabeledStatement(const shared &node); + bool isLabeledStatement(const node &node); - bool isThrowStatement(const shared &node); + bool isThrowStatement(const node &node); - bool isTryStatement(const shared &node); + bool isTryStatement(const node &node); - bool isDebuggerStatement(const shared &node); + bool isDebuggerStatement(const node &node); - bool isVariableDeclaration(const shared &node); + bool isVariableDeclaration(const node &node); - bool isVariableDeclarationList(const shared &node); + bool isVariableDeclarationList(const node &node); - bool isFunctionDeclaration(const shared &node); + bool isFunctionDeclaration(const node &node); - bool isClassDeclaration(const shared &node); + bool isClassDeclaration(const node &node); - bool isInterfaceDeclaration(const shared &node); + bool isInterfaceDeclaration(const node &node); - bool isTypeAliasDeclaration(const shared &node); + bool isTypeAliasDeclaration(const node &node); - bool isEnumDeclaration(const shared &node); + bool isEnumDeclaration(const node &node); - bool isModuleDeclaration(const shared &node); + bool isModuleDeclaration(const node &node); - bool isModuleBlock(const shared &node); + bool isModuleBlock(const node &node); - bool isCaseBlock(const shared &node); + bool isCaseBlock(const node &node); - bool isNamespaceExportDeclaration(const shared &node); + bool isNamespaceExportDeclaration(const node &node); - bool isImportEqualsDeclaration(const shared &node); + bool isImportEqualsDeclaration(const node &node); - bool isImportDeclaration(const shared &node); + bool isImportDeclaration(const node &node); - bool isImportClause(const shared &node); + bool isImportClause(const node &node); - bool isAssertClause(const shared &node); + bool isAssertClause(const node &node); - bool isAssertEntry(const shared &node); + bool isAssertEntry(const node &node); - bool isNamespaceImport(const shared &node); + bool isNamespaceImport(const node &node); - bool isNamespaceExport(const shared &node); + bool isNamespaceExport(const node &node); - bool isNamedImports(const shared &node); + bool isNamedImports(const node &node); - bool isImportSpecifier(const shared &node); + bool isImportSpecifier(const node &node); - bool isExportAssignment(const shared &node); + bool isExportAssignment(const node &node); - bool isExportDeclaration(const shared &node); + bool isExportDeclaration(const node &node); - bool isNamedExports(const shared &node); + bool isNamedExports(const node &node); - bool isExportSpecifier(const shared &node); + bool isExportSpecifier(const node &node); - bool isMissingDeclaration(const shared &node); + bool isMissingDeclaration(const node &node); - bool isNotEmittedStatement(const shared &node); + bool isNotEmittedStatement(const node &node); /* @internal */ - bool isSyntheticReference(const shared &node); + bool isSyntheticReference(const node &node); /* @internal */ - bool isMergeDeclarationMarker(const shared &node); + bool isMergeDeclarationMarker(const node &node); /* @internal */ - bool isEndOfDeclarationMarker(const shared &node); + bool isEndOfDeclarationMarker(const node &node); // Module References - bool isExternalModuleReference(const shared &node); + bool isExternalModuleReference(const node &node); // JSX - bool isJsxElement(const shared &node); + bool isJsxElement(const node &node); - bool isJsxSelfClosingElement(const shared &node); + bool isJsxSelfClosingElement(const node &node); - bool isJsxOpeningElement(const shared &node); + bool isJsxOpeningElement(const node &node); - bool isJsxClosingElement(const shared &node); + bool isJsxClosingElement(const node &node); - bool isJsxFragment(const shared &node); + bool isJsxFragment(const node &node); - bool isJsxOpeningFragment(const shared &node); + bool isJsxOpeningFragment(const node &node); - bool isJsxClosingFragment(const shared &node); + bool isJsxClosingFragment(const node &node); - bool isJsxAttribute(const shared &node); + bool isJsxAttribute(const node &node); - bool isJsxAttributes(const shared &node); + bool isJsxAttributes(const node &node); - bool isJsxSpreadAttribute(const shared &node); + bool isJsxSpreadAttribute(const node &node); - bool isJsxExpression(const shared &node); + bool isJsxExpression(const node &node); // Clauses - bool isCaseClause(const shared &node); + bool isCaseClause(const node &node); - bool isDefaultClause(const shared &node); + bool isDefaultClause(const node &node); - bool isHeritageClause(const shared &node); - bool isCatchClause(const shared &node); + bool isHeritageClause(const node &node); + bool isCatchClause(const node &node); // Property assignments - bool isPropertyAssignment(const shared &node); + bool isPropertyAssignment(const node &node); - bool isShorthandPropertyAssignment(const shared &node); + bool isShorthandPropertyAssignment(const node &node); - bool isSpreadAssignment(const shared &node); + bool isSpreadAssignment(const node &node); // Enum - bool isEnumMember(const shared &node); + bool isEnumMember(const node &node); // Unparsed // TODO(rbuckton): isUnparsedPrologue - bool isUnparsedPrepend(const shared &node); + bool isUnparsedPrepend(const node &node); // TODO(rbuckton): isUnparsedText // TODO(rbuckton): isUnparsedInternalText // TODO(rbuckton): isUnparsedSyntheticReference // Top-level nodes - bool isSourceFile(const shared &node); + bool isSourceFile(const node &node); - bool isBundle(const shared &node); + bool isBundle(const node &node); - bool isUnparsedSource(const shared &node); + bool isUnparsedSource(const node &node); // TODO(rbuckton): isInputFiles // JSDoc Elements - bool isJSDocTypeExpression(const shared &node); + bool isJSDocTypeExpression(const node &node); - bool isJSDocNameReference(const shared &node); + bool isJSDocNameReference(const node &node); - bool isJSDocMemberName(const shared &node); + bool isJSDocMemberName(const node &node); - bool isJSDocLink(const shared &node); + bool isJSDocLink(const node &node); - bool isJSDocLinkCode(const shared &node); + bool isJSDocLinkCode(const node &node); - bool isJSDocLinkPlain(const shared &node); + bool isJSDocLinkPlain(const node &node); - bool isJSDocAllType(const shared &node); + bool isJSDocAllType(const node &node); - bool isJSDocUnknownType(const shared &node); + bool isJSDocUnknownType(const node &node); - bool isJSDocNullableType(const shared &node); + bool isJSDocNullableType(const node &node); - bool isJSDocNonNullableType(const shared &node); + bool isJSDocNonNullableType(const node &node); - bool isJSDocOptionalType(const shared &node); + bool isJSDocOptionalType(const node &node); - bool isJSDocFunctionType(const shared &node); + bool isJSDocFunctionType(const node &node); - bool isJSDocVariadicType(const shared &node); + bool isJSDocVariadicType(const node &node); - bool isJSDocNamepathType(const shared &node); + bool isJSDocNamepathType(const node &node); - bool isJSDoc(const shared &node); + bool isJSDoc(const node &node); - bool isJSDocTypeLiteral(const shared &node); + bool isJSDocTypeLiteral(const node &node); - bool isJSDocSignature(const shared &node); + bool isJSDocSignature(const node &node); // JSDoc Tags - bool isJSDocAugmentsTag(const shared &node); + bool isJSDocAugmentsTag(const node &node); - bool isJSDocAuthorTag(const shared &node); + bool isJSDocAuthorTag(const node &node); - bool isJSDocClassTag(const shared &node); + bool isJSDocClassTag(const node &node); - bool isJSDocCallbackTag(const shared &node); + bool isJSDocCallbackTag(const node &node); - bool isJSDocPublicTag(const shared &node); + bool isJSDocPublicTag(const node &node); - bool isJSDocPrivateTag(const shared &node); + bool isJSDocPrivateTag(const node &node); - bool isJSDocProtectedTag(const shared &node); - bool isJSDocReadonlyTag(const shared &node); + bool isJSDocProtectedTag(const node &node); + bool isJSDocReadonlyTag(const node &node); - bool isJSDocOverrideTag(const shared &node); + bool isJSDocOverrideTag(const node &node); - bool isJSDocDeprecatedTag(const shared &node); + bool isJSDocDeprecatedTag(const node &node); - bool isJSDocSeeTag(const shared &node); + bool isJSDocSeeTag(const node &node); - bool isJSDocEnumTag(const shared &node); + bool isJSDocEnumTag(const node &node); - bool isJSDocParameterTag(const shared &node); + bool isJSDocParameterTag(const node &node); - bool isJSDocReturnTag(const shared &node); + bool isJSDocReturnTag(const node &node); - bool isJSDocThisTag(const shared &node); + bool isJSDocThisTag(const node &node); - bool isJSDocTypeTag(const shared &node); + bool isJSDocTypeTag(const node &node); - bool isJSDocTemplateTag(const shared &node); - bool isJSDocTypedefTag(const shared &node); + bool isJSDocTemplateTag(const node &node); + bool isJSDocTypedefTag(const node &node); - bool isJSDocUnknownTag(const shared &node); + bool isJSDocUnknownTag(const node &node); - bool isJSDocPropertyTag(const shared &node); + bool isJSDocPropertyTag(const node &node); - bool isJSDocImplementsTag(const shared &node); + bool isJSDocImplementsTag(const node &node); // Synthesized list /* @internal */ - bool isSyntaxList(const shared &node); + bool isSyntaxList(const node &node); } diff --git a/src/parenthesizer.cpp b/src/parenthesizer.cpp index a77955c..38ae346 100644 --- a/src/parenthesizer.cpp +++ b/src/parenthesizer.cpp @@ -8,18 +8,18 @@ namespace tr { template - shared sameMap(const sharedOpt &array, const function(shared, int)> &callback) { - auto result = make_shared(); + node sameMap(Factory *factory, const optionalNode &array, const function(node, int)> &callback) { + auto result = factory->pool->construct(); if (array) { auto i = 0; - for (auto &v: array->list) { - result->list.push_back(callback(reinterpret_pointer_cast(v), i++)); + for (auto v: *array) { + result->push(callback(reinterpret_node(v), i++)); } } return result; } - shared Parenthesizer::parenthesizeBinaryOperand(SyntaxKind binaryOperator, shared operand, bool isLeftSideOfBinary, sharedOpt leftOperand) { + node Parenthesizer::parenthesizeBinaryOperand(SyntaxKind binaryOperator, node operand, bool isLeftSideOfBinary, optionalNode leftOperand) { auto skipped = skipPartiallyEmittedExpressions(operand); // If the resulting expression is already parenthesized, we do not need to do any further processing. @@ -33,15 +33,15 @@ namespace tr { } - shared Parenthesizer::parenthesizeLeftSideOfBinary(SyntaxKind binaryOperator, shared leftSide) { + node Parenthesizer::parenthesizeLeftSideOfBinary(SyntaxKind binaryOperator, node leftSide) { return parenthesizeBinaryOperand(binaryOperator, leftSide, /*isLeftSideOfBinary*/ true); } - shared Parenthesizer::parenthesizeExpressionOfComputedPropertyName(shared expression) { + node Parenthesizer::parenthesizeExpressionOfComputedPropertyName(node expression) { return isCommaSequence(expression) ? factory->createParenthesizedExpression(expression) : expression; } - shared Parenthesizer::parenthesizeConditionOfConditionalExpression(shared condition) { + node Parenthesizer::parenthesizeConditionOfConditionalExpression(node condition) { auto conditionalPrecedence = getOperatorPrecedence(SyntaxKind::ConditionalExpression, SyntaxKind::QuestionToken); auto emittedCondition = skipPartiallyEmittedExpressions(condition); auto conditionPrecedence = getExpressionPrecedence(emittedCondition); @@ -51,20 +51,20 @@ namespace tr { return condition; } - sharedOpt Parenthesizer::parenthesizeTypeArguments(sharedOpt typeArguments) { + optionalNode Parenthesizer::parenthesizeTypeArguments(optionalNode typeArguments) { if (typeArguments && !typeArguments->empty()) { - auto m = sameMap(typeArguments, CALLBACK(parenthesizeOrdinalTypeArgument)); + auto m = sameMap(factory, typeArguments, CALLBACK(parenthesizeOrdinalTypeArgument)); return factory->createNodeArray(m); } return typeArguments; } - shared Parenthesizer::parenthesizeTypeOfOptionalType(shared type) { + node Parenthesizer::parenthesizeTypeOfOptionalType(node type) { if (hasJSDocPostfixQuestion(type)) return factory->createParenthesizedType(type); return parenthesizeNonArrayTypeOfPostfixType(type); } - shared Parenthesizer::parenthesizeBranchOfConditionalExpression(shared branch) { + node Parenthesizer::parenthesizeBranchOfConditionalExpression(node branch) { // per ES grammar both 'whenTrue' and 'whenFalse' parts of conditional expression are assignment expressions // so in case when comma expression is introduced as a part of previous transformations // if should be wrapped in parens since comma operator has the lowest precedence @@ -74,19 +74,19 @@ namespace tr { : branch; } - shared Parenthesizer::parenthesizeElementTypesOfTupleType(shared types) { - return factory->createNodeArray(sameMap(types, CALLBACK(parenthesizeElementTypeOfTupleType))); + node Parenthesizer::parenthesizeElementTypesOfTupleType(node types) { + return factory->createNodeArray(sameMap(factory, types, CALLBACK(parenthesizeElementTypeOfTupleType))); } - shared Parenthesizer::parenthesizeLeadingTypeArgument(shared node) { + node Parenthesizer::parenthesizeLeadingTypeArgument(node node) { return isFunctionOrConstructorTypeNode(node) && getTypeParameters(node) ? factory->createParenthesizedType(node) : node; } - shared Parenthesizer::parenthesizeConstituentTypesOfIntersectionType(shared members) { - return factory->createNodeArray(sameMap(members, CALLBACK(parenthesizeConstituentTypeOfIntersectionType))); + node Parenthesizer::parenthesizeConstituentTypesOfIntersectionType(node members) { + return factory->createNodeArray(sameMap(factory, members, CALLBACK(parenthesizeConstituentTypeOfIntersectionType))); } - shared Parenthesizer::parenthesizeNonArrayTypeOfPostfixType(shared type) { + node Parenthesizer::parenthesizeNonArrayTypeOfPostfixType(node type) { switch (type->kind) { case SyntaxKind::InferType: case SyntaxKind::TypeOperator: @@ -95,21 +95,21 @@ namespace tr { } return parenthesizeOperandOfTypeOperator(type); } - shared Parenthesizer::parenthesizeOperandOfReadonlyTypeOperator(shared type) { + node Parenthesizer::parenthesizeOperandOfReadonlyTypeOperator(node type) { switch (type->kind) { case SyntaxKind::TypeOperator: return factory->createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); } - shared Parenthesizer::parenthesizeOperandOfTypeOperator(shared type) { + node Parenthesizer::parenthesizeOperandOfTypeOperator(node type) { switch (type->kind) { case SyntaxKind::IntersectionType: return factory->createParenthesizedType(type); } return parenthesizeConstituentTypeOfIntersectionType(type); } - shared Parenthesizer::parenthesizeConstituentTypeOfIntersectionType(shared type, int) { + node Parenthesizer::parenthesizeConstituentTypeOfIntersectionType(node type, int) { switch (type->kind) { case SyntaxKind::UnionType: case SyntaxKind::IntersectionType: // Not strictly necessary, but an intersection containing an intersection should have been flattened @@ -123,7 +123,7 @@ namespace tr { * Wraps an expression in parentheses if it is needed in order to use the expression for * property or element access. */ - shared Parenthesizer::parenthesizeLeftSideOfAccess(shared expression) { + node Parenthesizer::parenthesizeLeftSideOfAccess(node expression) { // isLeftHandSideExpression is almost the correct criterion for when it is not necessary // to parenthesize the expression before a dot. The known exception is: // @@ -134,7 +134,7 @@ namespace tr { if (isLeftHandSideExpression(emittedExpression) && (emittedExpression->kind != SyntaxKind::NewExpression || to(emittedExpression)->arguments)) { // TODO(rbuckton): Verify whether this assertion holds. - return reinterpret_pointer_cast(expression); + return reinterpret_node(expression); } // TODO(rbuckton): Verifiy whether `setTextRange` is needed. @@ -145,7 +145,7 @@ namespace tr { * Wraps an expression in parentheses if it is needed in order to use the expression * as the expression of a `NewExpression` node-> */ - shared Parenthesizer::parenthesizeExpressionOfNew(shared expression) { + node Parenthesizer::parenthesizeExpressionOfNew(node expression) { auto leftmostExpr = getLeftmostExpression(expression, /*stopAtCallExpressions*/ true); switch (leftmostExpr->kind) { case SyntaxKind::CallExpression: @@ -154,23 +154,23 @@ namespace tr { case SyntaxKind::NewExpression: return !to(leftmostExpr)->arguments ? factory->createParenthesizedExpression(expression) - : reinterpret_pointer_cast(expression); // TODO(rbuckton): Verify this assertion holds + : reinterpret_node(expression); // TODO(rbuckton): Verify this assertion holds } return parenthesizeLeftSideOfAccess(expression); } - shared Parenthesizer::parenthesizeOperandOfPostfixUnary(shared operand) { + node Parenthesizer::parenthesizeOperandOfPostfixUnary(node operand) { // TODO(rbuckton): Verifiy whether `setTextRange` is needed. - return isLeftHandSideExpression(operand) ? reinterpret_pointer_cast(operand) : setTextRange(factory->createParenthesizedExpression(operand), operand); + return isLeftHandSideExpression(operand) ? reinterpret_node(operand) : setTextRange(factory->createParenthesizedExpression(operand), operand); } - shared Parenthesizer::parenthesizeOperandOfPrefixUnary(shared operand) { + node Parenthesizer::parenthesizeOperandOfPrefixUnary(node operand) { // TODO(rbuckton): Verifiy whether `setTextRange` is needed. - return isUnaryExpression(operand) ? reinterpret_pointer_cast(operand) : setTextRange(factory->createParenthesizedExpression(operand), operand); + return isUnaryExpression(operand) ? reinterpret_node(operand) : setTextRange(factory->createParenthesizedExpression(operand), operand); } - shared Parenthesizer::parenthesizeExpressionForDisallowedComma(shared expression, int) { + node Parenthesizer::parenthesizeExpressionForDisallowedComma(node expression, int) { auto emittedExpression = skipPartiallyEmittedExpressions(expression); auto expressionPrecedence = getExpressionPrecedence(emittedExpression); auto commaPrecedence = getOperatorPrecedence(SyntaxKind::BinaryExpression, SyntaxKind::CommaToken); @@ -178,12 +178,12 @@ namespace tr { return expressionPrecedence > commaPrecedence ? expression : setTextRange(factory->createParenthesizedExpression(expression), expression); } - shared Parenthesizer::parenthesizeExpressionsOfCommaDelimitedList(shared elements) { - auto result = sameMap(elements, CALLBACK(parenthesizeExpressionForDisallowedComma)); - return setTextRange(factory->createNodeArray(result, elements->hasTrailingComma), elements); + node Parenthesizer::parenthesizeExpressionsOfCommaDelimitedList(node elements) { + auto result = sameMap(factory, elements, CALLBACK(parenthesizeExpressionForDisallowedComma)); + return setArrayTextRange(factory->createNodeArray(result, elements->hasTrailingComma), elements); } - shared Parenthesizer::parenthesizeExpressionOfExpressionStatement(shared expression) { + node Parenthesizer::parenthesizeExpressionOfExpressionStatement(node expression) { auto emittedExpression = skipPartiallyEmittedExpressions(expression); if (auto e = to(emittedExpression)) { auto callee = e->expression; @@ -211,9 +211,9 @@ namespace tr { // function parenthesizeConciseBodyOfArrowFunction(body: Expression): Expression; // function parenthesizeConciseBodyOfArrowFunction(body: ConciseBody): ConciseBody; - shared Parenthesizer::parenthesizeConciseBodyOfArrowFunction(shared body) { + node Parenthesizer::parenthesizeConciseBodyOfArrowFunction(node body) { if (isBlock(body)) return body; - auto e = reinterpret_pointer_cast(body); + auto e = reinterpret_node(body); if (isCommaSequence(body) || getLeftmostExpression(e, /*stopAtCallExpressions*/ false)->kind == SyntaxKind::ObjectLiteralExpression) { // TODO(rbuckton): Verifiy whether `setTextRange` is needed. return setTextRange(factory->createParenthesizedExpression(e), body); @@ -233,7 +233,7 @@ namespace tr { // - The check type (the `UnionType`, above) does not allow function, constructor, or conditional types (they must be parenthesized) // - The extends type (the first `Type`, above) does not allow conditional types (they must be parenthesized). Function and constructor types are fine. // - The true and false branch types (the second and third `Type` non-terminals, above) allow any type - shared Parenthesizer::parenthesizeCheckTypeOfConditionalType(shared checkType) { + node Parenthesizer::parenthesizeCheckTypeOfConditionalType(node checkType) { switch (checkType->kind) { case SyntaxKind::FunctionType: case SyntaxKind::ConstructorType: @@ -243,7 +243,7 @@ namespace tr { return checkType; } - shared Parenthesizer::parenthesizeExtendsTypeOfConditionalType(shared extendsType) { + node Parenthesizer::parenthesizeExtendsTypeOfConditionalType(node extendsType) { switch (extendsType->kind) { case SyntaxKind::ConditionalType: return factory->createParenthesizedType(extendsType); @@ -256,7 +256,7 @@ namespace tr { // UnionType[?Extends] `|` IntersectionType[?Extends] // // - A union type constituent has the same precedence as the check type of a conditional type - shared Parenthesizer::parenthesizeConstituentTypeOfUnionType(shared type, int) { + node Parenthesizer::parenthesizeConstituentTypeOfUnionType(node type, int) { switch (type->kind) { case SyntaxKind::UnionType: // Not strictly necessary, but a union containing a union should have been flattened case SyntaxKind::IntersectionType: // Not strictly necessary, but makes generated output more readable and avoids breaks in DT tests @@ -265,7 +265,7 @@ namespace tr { return parenthesizeCheckTypeOfConditionalType(type); } - shared Parenthesizer::parenthesizeConstituentTypesOfUnionType(shared members) { - return factory->createNodeArray(sameMap(members, CALLBACK(parenthesizeConstituentTypeOfUnionType))); + node Parenthesizer::parenthesizeConstituentTypesOfUnionType(node members) { + return factory->createNodeArray(sameMap(factory, members, CALLBACK(parenthesizeConstituentTypeOfUnionType))); } } diff --git a/src/parenthesizer.h b/src/parenthesizer.h index b1215c8..48ae79d 100644 --- a/src/parenthesizer.h +++ b/src/parenthesizer.h @@ -14,7 +14,7 @@ namespace tr { struct Parenthesizer { Factory *factory; -// shared getParenthesizeLeftSideOfBinaryForOperator(SyntaxKind operatorKind) { +// node getParenthesizeLeftSideOfBinaryForOperator(SyntaxKind operatorKind) { //// binaryLeftOperandParenthesizerCache ||= new Map(); //// let parenthesizerRule = binaryLeftOperandParenthesizerCache.get(operatorKind); //// if (!parenthesizerRule) { @@ -42,7 +42,7 @@ namespace tr { * @param isLeftSideOfBinary A value indicating whether the operand is the left side of the * BinaryExpression. */ - bool binaryOperandNeedsParentheses(SyntaxKind binaryOperator, shared operand, bool isLeftSideOfBinary, sharedOpt leftOperand = nullptr) { + bool binaryOperandNeedsParentheses(SyntaxKind binaryOperator, node operand, bool isLeftSideOfBinary, optionalNode leftOperand = nullptr) { // If the operand has lower precedence, then it needs to be parenthesized to preserve the // intent of the expression. For example, if the operand is `a + b` and the operator is // `*`, then we need to parenthesize the operand to preserve the intended order of @@ -163,7 +163,7 @@ namespace tr { * It is used to determine whether the right-hand operand of a binary plus expression can be * emitted without parentheses. */ - SyntaxKind getLiteralKindOfBinaryPlusOperand(shared node) { + SyntaxKind getLiteralKindOfBinaryPlusOperand(node node) { node = to(skipPartiallyEmittedExpressions(node)); if (isLiteralKind(node->kind)) { @@ -199,19 +199,19 @@ namespace tr { * @param isLeftSideOfBinary A value indicating whether the operand is the left side of the * BinaryExpression. */ - shared parenthesizeBinaryOperand(SyntaxKind binaryOperator, shared operand, bool isLeftSideOfBinary, sharedOpt leftOperand = nullptr); + node parenthesizeBinaryOperand(SyntaxKind binaryOperator, node operand, bool isLeftSideOfBinary, optionalNode leftOperand = nullptr); - shared parenthesizeLeftSideOfBinary(SyntaxKind binaryOperator, shared leftSide); + node parenthesizeLeftSideOfBinary(SyntaxKind binaryOperator, node leftSide); - shared parenthesizeRightSideOfBinary(SyntaxKind binaryOperator, sharedOpt leftSide, shared rightSide) { + node parenthesizeRightSideOfBinary(SyntaxKind binaryOperator, optionalNode leftSide, node rightSide) { return parenthesizeBinaryOperand(binaryOperator, rightSide, /*isLeftSideOfBinary*/ false, leftSide); } - shared parenthesizeExpressionOfComputedPropertyName(shared expression); + node parenthesizeExpressionOfComputedPropertyName(node expression); - shared parenthesizeConditionOfConditionalExpression(shared condition); + node parenthesizeConditionOfConditionalExpression(node condition); - shared parenthesizeBranchOfConditionalExpression(shared branch); + node parenthesizeBranchOfConditionalExpression(node branch); // /** // * [Per the spec](https://tc39.github.io/ecma262/#prod-ExportDeclaration), `export default` accepts _AssigmentExpression_ but @@ -224,7 +224,7 @@ namespace tr { // * - FunctionExpression // * - ClassExpression // */ -// function parenthesizeExpressionOfExportDefault(shared expression): Expression { +// function parenthesizeExpressionOfExportDefault(node expression): Expression { // auto check = skipPartiallyEmittedExpressions(expression); // let needsParens = isCommaSequence(check); // if (!needsParens) { @@ -242,27 +242,27 @@ namespace tr { * Wraps an expression in parentheses if it is needed in order to use the expression for * property or element access. */ - shared parenthesizeLeftSideOfAccess(shared expression); + node parenthesizeLeftSideOfAccess(node expression); /** * Wraps an expression in parentheses if it is needed in order to use the expression * as the expression of a `NewExpression` node-> */ - shared parenthesizeExpressionOfNew(shared expression); + node parenthesizeExpressionOfNew(node expression); - shared parenthesizeOperandOfPostfixUnary(shared operand); + node parenthesizeOperandOfPostfixUnary(node operand); - shared parenthesizeOperandOfPrefixUnary(shared operand); + node parenthesizeOperandOfPrefixUnary(node operand); - shared parenthesizeExpressionForDisallowedComma(shared expression, int = 0); + node parenthesizeExpressionForDisallowedComma(node expression, int = 0); - shared parenthesizeExpressionsOfCommaDelimitedList(shared elements); + node parenthesizeExpressionsOfCommaDelimitedList(node elements); - shared parenthesizeExpressionOfExpressionStatement(shared expression); + node parenthesizeExpressionOfExpressionStatement(node expression); // function parenthesizeConciseBodyOfArrowFunction(body: Expression): Expression; // function parenthesizeConciseBodyOfArrowFunction(body: ConciseBody): ConciseBody; - shared parenthesizeConciseBodyOfArrowFunction(shared body); + node parenthesizeConciseBodyOfArrowFunction(node body); // Type[Extends] : // FunctionOrConstructorType @@ -275,27 +275,27 @@ namespace tr { // - The check type (the `UnionType`, above) does not allow function, constructor, or conditional types (they must be parenthesized) // - The extends type (the first `Type`, above) does not allow conditional types (they must be parenthesized). Function and constructor types are fine. // - The true and false branch types (the second and third `Type` non-terminals, above) allow any type - shared parenthesizeCheckTypeOfConditionalType(shared checkType); + node parenthesizeCheckTypeOfConditionalType(node checkType); - shared parenthesizeExtendsTypeOfConditionalType(shared extendsType); + node parenthesizeExtendsTypeOfConditionalType(node extendsType); // UnionType[Extends] : // `|`? IntersectionType[?Extends] // UnionType[?Extends] `|` IntersectionType[?Extends] // // - A union type constituent has the same precedence as the check type of a conditional type - shared parenthesizeConstituentTypeOfUnionType(shared type, int = 0); + node parenthesizeConstituentTypeOfUnionType(node type, int = 0); - shared parenthesizeConstituentTypesOfUnionType(shared members); + node parenthesizeConstituentTypesOfUnionType(node members); // IntersectionType[Extends] : // `&`? TypeOperator[?Extends] // IntersectionType[?Extends] `&` TypeOperator[?Extends] // // - An intersection type constituent does not allow function, constructor, conditional, or union types (they must be parenthesized) - shared parenthesizeConstituentTypeOfIntersectionType(shared type, int = 0); + node parenthesizeConstituentTypeOfIntersectionType(node type, int = 0); - shared parenthesizeConstituentTypesOfIntersectionType(shared members); + node parenthesizeConstituentTypesOfIntersectionType(node members); // TypeOperator[Extends] : // PostfixType @@ -304,9 +304,9 @@ namespace tr { // `unique` TypeOperator[?Extends] // `readonly` TypeOperator[?Extends] // - shared parenthesizeOperandOfTypeOperator(shared type); + node parenthesizeOperandOfTypeOperator(node type); - shared parenthesizeOperandOfReadonlyTypeOperator(shared type); + node parenthesizeOperandOfReadonlyTypeOperator(node type); // PostfixType : // NonArrayType @@ -321,9 +321,9 @@ namespace tr { // ArrayType : // NonArrayType `[` `]` // - shared parenthesizeNonArrayTypeOfPostfixType(shared type); + node parenthesizeNonArrayTypeOfPostfixType(node type); - shared parenthesizeElementTypeOfTupleType(shared type, int = 0) { + node parenthesizeElementTypeOfTupleType(node type, int = 0) { // if (hasJSDocPostfixQuestion(type)) return factory->createParenthesizedType(type); return type; } @@ -358,9 +358,9 @@ namespace tr { // RestType : // `...` Type[~Extends] // - shared parenthesizeElementTypesOfTupleType(shared types); + node parenthesizeElementTypesOfTupleType(node types); - bool hasJSDocPostfixQuestion(shared type) { + bool hasJSDocPostfixQuestion(node type) { if (isJSDocNullableType(type)) return to(type)->postfix; if (isNamedTupleMember(type)) return hasJSDocPostfixQuestion(to(type)->type); @@ -373,15 +373,15 @@ namespace tr { } if (isConditionalTypeNode(type)) return hasJSDocPostfixQuestion(to(type)->falseType); - if (isUnionTypeNode(type)) return hasJSDocPostfixQuestion(reinterpret_pointer_cast(last(to(type)->types))); - if (isIntersectionTypeNode(type)) return hasJSDocPostfixQuestion(reinterpret_pointer_cast(last(to(type)->types))); + if (isUnionTypeNode(type)) return hasJSDocPostfixQuestion(reinterpret_cast(last(to(type)->types))); + if (isIntersectionTypeNode(type)) return hasJSDocPostfixQuestion(reinterpret_cast(last(to(type)->types))); if (auto infer = to(type)) { return infer->typeParameter->constraint && hasJSDocPostfixQuestion(infer->typeParameter->constraint); } return false; } - shared parenthesizeTypeOfOptionalType(shared type); + node parenthesizeTypeOfOptionalType(node type); // // function parenthesizeMemberOfElementType(member: TypeNode): TypeNode { // // switch (member.kind) { @@ -404,12 +404,12 @@ namespace tr { // // return parenthesizeMemberOfElementType(member); // // } // - shared parenthesizeLeadingTypeArgument(shared node); + node parenthesizeLeadingTypeArgument(node node); - shared parenthesizeOrdinalTypeArgument(shared node, int i) { + node parenthesizeOrdinalTypeArgument(node node, int i) { return i == 0 ? parenthesizeLeadingTypeArgument(node) : node; } - sharedOpt parenthesizeTypeArguments(sharedOpt typeArguments); + optionalNode parenthesizeTypeArguments(optionalNode typeArguments); }; } diff --git a/src/parser2.cpp b/src/parser2.cpp index 48bf870..fd8aa87 100644 --- a/src/parser2.cpp +++ b/src/parser2.cpp @@ -10,7 +10,7 @@ namespace tr { return currentToken = scanner.scan(); } - optional Parser::parseErrorAtPosition(int start, int length, const shared &message, DiagnosticArg arg) { + optional Parser::parseErrorAtPosition(int start, int length, const shared_ptr &message, DiagnosticArg arg) { ZoneScoped; auto lastError = lastOrUndefined(parseDiagnostics); @@ -28,7 +28,7 @@ namespace tr { return nullopt; } - shared Parser::countNode(const shared &node) { + node Parser::countNode(const node &node) { nodeCount++; return node; } diff --git a/src/parser2.h b/src/parser2.h index c922f8c..13465a8 100644 --- a/src/parser2.h +++ b/src/parser2.h @@ -100,7 +100,7 @@ namespace tr { //// /* @internal */ //// export const parseNodeFactory = createNodeFactory(NodeFactoryFlags.NoParenthesizerRules, parseBaseNodeFactory); - inline sharedOpt visitNode(const function(shared)> &cbNode, const sharedOpt &node) { + inline optionalNode visitNode(const function(tr::node)> &cbNode, const optionalNode &node) { if (node) cbNode(node); return nullptr; } @@ -109,22 +109,22 @@ namespace tr { // return cbNode(node); // } - inline sharedOpt noop(const shared &) { + inline optionalNode noop(const node &) { return nullptr; }; - inline sharedOpt forEachChild(const shared &node, const function(shared)> &cbNode, const function(shared)> &cbNodes = noop); + inline optionalNode forEachChild(const node &node, const function(tr::node)> &cbNode, const function(tr::node)> &cbNodes = noop); - inline sharedOpt visitNodes( - const function(shared)> &cbNode, - const function(shared)> &cbNodes = noop, - const sharedOpt &nodes = nullptr + inline optionalNode visitNodes( + const function(node)> &cbNode, + const function(node)> &cbNodes = noop, + const optionalNode &nodes = nullptr ) { if (nodes) { if (cbNodes) { return cbNodes(nodes); } - for (auto &&node: nodes->list) { + for (auto node: *nodes) { auto result = cbNode(node); if (result) { return result; @@ -139,10 +139,11 @@ namespace tr { * 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. */ - inline sharedOpt forEach(const sharedOpt &array, const function(shared element, int index)> &callback) { + inline optionalNode forEach(const optionalNode &array, const function(node element, int index)> &callback) { if (array) { - for (int i = 0; i < array->list.size(); i++) { - auto result = callback(array->list[i], i); + int i = 0; + for (auto item: *array) { + auto result = callback(item, i++); if (result) { return result; } @@ -156,7 +157,7 @@ namespace tr { // * 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. // */ -// bool forEach(sharedOpt array, function element, int index)> callback) { +// bool forEach(optionalNode array, function element, int index)> callback) { // if (array) { // for (int i = 0; i < array->list.size(); i ++) { // auto result = callback((*array).list[i], i); @@ -168,16 +169,16 @@ namespace tr { // return false; // } -// inline bool some(const sharedOpt &array) { +// inline bool some(const optionalNode &array) { // if (array) { // return array->list.size() > 0; // } // return false; // } - inline bool some(const sharedOpt &array, const function value)> &predicate) { + inline bool some(const optionalNode &array, const function value)> &predicate) { if (array) { - for (auto &&v: array->list) { + for (auto v: *array) { if (predicate(v)) { return true; } @@ -187,11 +188,11 @@ namespace tr { } /** Do not use hasModifier inside the parser; it relies on parent pointers. Use this instead. */ - inline bool hasModifierOfKind(const shared &node, SyntaxKind kind) { + inline bool hasModifierOfKind(const tr::node &node, SyntaxKind kind) { return some(node->modifiers, [kind](auto m) { return m->kind == kind; }); } - inline sharedOpt isAnExternalModuleIndicatorNode(shared node, int) { + inline optionalNode isAnExternalModuleIndicatorNode(node node, int) { if (hasModifierOfKind(node, SyntaxKind::ExportKeyword) || (node->is() && isExternalModuleReference(to(node)->moduleReference)) || isImportDeclaration(node) @@ -201,7 +202,7 @@ namespace tr { return nullptr; } - inline bool isImportMeta(const shared &node) { + inline bool isImportMeta(const node &node) { if (isMetaProperty(node)) { auto meta = to(node); return meta->keywordToken == SyntaxKind::ImportKeyword && to(meta->name)->escapedText == "meta"; @@ -209,19 +210,19 @@ namespace tr { return false; } - inline sharedOpt walkTreeForImportMeta(const shared &node) { + inline optionalNode walkTreeForImportMeta(const node &node) { if (isImportMeta(node)) return node; return forEachChild(node, walkTreeForImportMeta); } - inline sharedOpt getImportMetaIfNecessary(const shared &sourceFile) { + inline optionalNode getImportMetaIfNecessary(const shared_ptr &sourceFile) { return sourceFile->flags & (int) NodeFlags::PossiblyContainsImportMeta ? - walkTreeForImportMeta(sourceFile) : + walkTreeForImportMeta(sourceFile.get()) : nullptr; } /*@internal*/ - inline sharedOpt isFileProbablyExternalModule(const shared &sourceFile) { + inline optionalNode isFileProbablyExternalModule(const shared_ptr &sourceFile) { // Try to use the first top-level import/export when available, then // fall back to looking for an 'import.meta' somewhere in the tree if necessary. auto r = forEach(sourceFile->statements, isAnExternalModuleIndicatorNode); @@ -242,85 +243,85 @@ namespace tr { * @remarks `forEachChild` must visit the children of a node in the order * that they appear in the source code. The language service depends on this property to locate nodes by position. */ - inline sharedOpt forEachChild(const shared &node, const function(shared)> &cbNode, const function(shared)> &cbNodes) { + inline optionalNode forEachChild(const node &node, const function(tr::node)> &cbNode, const function(tr::node)> &cbNodes) { if (node->kind <= SyntaxKind::LastToken) { return nullptr; } switch (node->kind) { case SyntaxKind::QualifiedName: //short-circuit evaluation is always boolean ... not last value in c++ - return visitNode(cbNode, to(node)->left) || - visitNode(cbNode, to(node)->right); + return pick(visitNode(cbNode, to(node)->left), + visitNode(cbNode, to(node)->right)); case SyntaxKind::TypeParameter: - return visitNodes(cbNode, cbNodes, to(node)->modifiers) || - visitNode(cbNode, to(node)->name) || - visitNode(cbNode, to(node)->constraint) || - visitNode(cbNode, to(node)->defaultType) || - visitNode(cbNode, to(node)->expression); + return pick(visitNodes(cbNode, cbNodes, to(node)->modifiers), + visitNode(cbNode, to(node)->name), + visitNode(cbNode, to(node)->constraint), + visitNode(cbNode, to(node)->defaultType), + visitNode(cbNode, to(node)->expression)); case SyntaxKind::ShorthandPropertyAssignment: - return visitNodes(cbNode, cbNodes, to(node)->decorators) || - visitNodes(cbNode, cbNodes, to(node)->modifiers) || - visitNode(cbNode, to(node)->name) || - visitNode(cbNode, to(node)->questionToken) || - visitNode(cbNode, to(node)->exclamationToken) || - visitNode(cbNode, to(node)->equalsToken) || - visitNode(cbNode, to(node)->objectAssignmentInitializer); + return pick(visitNodes(cbNode, cbNodes, to(node)->decorators), + visitNodes(cbNode, cbNodes, to(node)->modifiers), + visitNode(cbNode, to(node)->name), + visitNode(cbNode, to(node)->questionToken), + visitNode(cbNode, to(node)->exclamationToken), + visitNode(cbNode, to(node)->equalsToken), + visitNode(cbNode, to(node)->objectAssignmentInitializer)); case SyntaxKind::SpreadAssignment: return visitNode(cbNode, to(node)->expression); case SyntaxKind::Parameter: - return visitNodes(cbNode, cbNodes, to(node)->decorators) || - visitNodes(cbNode, cbNodes, to(node)->modifiers) || - visitNode(cbNode, to(node)->dotDotDotToken) || - visitNode(cbNode, to(node)->name) || - visitNode(cbNode, to(node)->questionToken) || - visitNode(cbNode, to(node)->type) || - visitNode(cbNode, to(node)->initializer); + return pick(visitNodes(cbNode, cbNodes, to(node)->decorators), + visitNodes(cbNode, cbNodes, to(node)->modifiers), + visitNode(cbNode, to(node)->dotDotDotToken), + visitNode(cbNode, to(node)->name), + visitNode(cbNode, to(node)->questionToken), + visitNode(cbNode, to(node)->type), + visitNode(cbNode, to(node)->initializer)); case SyntaxKind::PropertyDeclaration: - return visitNodes(cbNode, cbNodes, to(node)->decorators) || - visitNodes(cbNode, cbNodes, to(node)->modifiers) || - visitNode(cbNode, to(node)->name) || - visitNode(cbNode, to(node)->questionToken) || - visitNode(cbNode, to(node)->exclamationToken) || - visitNode(cbNode, to(node)->type) || - visitNode(cbNode, to(node)->initializer); + return pick(visitNodes(cbNode, cbNodes, to(node)->decorators), + visitNodes(cbNode, cbNodes, to(node)->modifiers), + visitNode(cbNode, to(node)->name), + visitNode(cbNode, to(node)->questionToken), + visitNode(cbNode, to(node)->exclamationToken), + visitNode(cbNode, to(node)->type), + visitNode(cbNode, to(node)->initializer)); case SyntaxKind::PropertySignature: - return visitNodes(cbNode, cbNodes, to(node)->decorators) || - visitNodes(cbNode, cbNodes, to(node)->modifiers) || - visitNode(cbNode, to(node)->name) || - visitNode(cbNode, to(node)->questionToken) || - visitNode(cbNode, to(node)->type) || - visitNode(cbNode, to(node)->initializer); + return pick(visitNodes(cbNode, cbNodes, to(node)->decorators), + visitNodes(cbNode, cbNodes, to(node)->modifiers), + visitNode(cbNode, to(node)->name), + visitNode(cbNode, to(node)->questionToken), + visitNode(cbNode, to(node)->type), + visitNode(cbNode, to(node)->initializer)); case SyntaxKind::PropertyAssignment: - return visitNodes(cbNode, cbNodes, to(node)->decorators) || - visitNodes(cbNode, cbNodes, to(node)->modifiers) || - visitNode(cbNode, to(node)->name) || - visitNode(cbNode, to(node)->questionToken) || - visitNode(cbNode, to(node)->initializer); + return pick(visitNodes(cbNode, cbNodes, to(node)->decorators), + visitNodes(cbNode, cbNodes, to(node)->modifiers), + visitNode(cbNode, to(node)->name), + visitNode(cbNode, to(node)->questionToken), + visitNode(cbNode, to(node)->initializer)); case SyntaxKind::VariableDeclaration: - return visitNodes(cbNode, cbNodes, to(node)->decorators) || - visitNodes(cbNode, cbNodes, to(node)->modifiers) || - visitNode(cbNode, to(node)->name) || - visitNode(cbNode, to(node)->exclamationToken) || - visitNode(cbNode, to(node)->type) || - visitNode(cbNode, to(node)->initializer); + return pick(visitNodes(cbNode, cbNodes, to(node)->decorators), + visitNodes(cbNode, cbNodes, to(node)->modifiers), + visitNode(cbNode, to(node)->name), + visitNode(cbNode, to(node)->exclamationToken), + visitNode(cbNode, to(node)->type), + visitNode(cbNode, to(node)->initializer)); case SyntaxKind::BindingElement: { - return visitNodes(cbNode, cbNodes, to(node)->decorators) || - visitNodes(cbNode, cbNodes, to(node)->modifiers) || - visitNode(cbNode, to(node)->dotDotDotToken) || - visitNode(cbNode, to(node)->propertyName) || - visitNode(cbNode, to(node)->name) || - visitNode(cbNode, to(node)->initializer); + return pick(visitNodes(cbNode, cbNodes, to(node)->decorators), + visitNodes(cbNode, cbNodes, to(node)->modifiers), + visitNode(cbNode, to(node)->dotDotDotToken), + visitNode(cbNode, to(node)->propertyName), + visitNode(cbNode, to(node)->name), + visitNode(cbNode, to(node)->initializer)); } case SyntaxKind::FunctionType: case SyntaxKind::ConstructorType: case SyntaxKind::CallSignature: case SyntaxKind::ConstructSignature: case SyntaxKind::IndexSignature: - return visitNodes(cbNode, cbNodes, node->decorators) || - visitNodes(cbNode, cbNodes, node->modifiers) || - visitNodes(cbNode, cbNodes, to(node)->typeParameters) || - visitNodes(cbNode, cbNodes, to(node)->parameters) || - visitNode(cbNode, to(node)->type); + return pick(visitNodes(cbNode, cbNodes, node->decorators), + visitNodes(cbNode, cbNodes, node->modifiers), + visitNodes(cbNode, cbNodes, to(node)->typeParameters), + visitNodes(cbNode, cbNodes, to(node)->parameters), + visitNode(cbNode, to(node)->type)); case SyntaxKind::MethodDeclaration: case SyntaxKind::MethodSignature: case SyntaxKind::Constructor: @@ -331,31 +332,31 @@ namespace tr { case SyntaxKind::ArrowFunction: { if (auto b = visitNodes(cbNode, cbNodes, node->decorators)) return b; - return visitNodes(cbNode, cbNodes, node->decorators) || - visitNodes(cbNode, cbNodes, node->modifiers) || - visitNode(cbNode, node->cast().asteriskToken) || - visitNode(cbNode, node->cast().name) || - visitNode(cbNode, node->cast().questionToken) || - visitNode(cbNode, node->cast().exclamationToken) || - visitNodes(cbNode, cbNodes, node->cast().typeParameters) || - visitNodes(cbNode, cbNodes, node->cast().parameters) || - visitNode(cbNode, node->cast().type) || - (node->kind == SyntaxKind::ArrowFunction ? visitNode(cbNode, to(node)->equalsGreaterThanToken) : shared(nullptr)) || - visitNode(cbNode, node->cast().body); + return pick(visitNodes(cbNode, cbNodes, node->decorators), + visitNodes(cbNode, cbNodes, node->modifiers), + visitNode(cbNode, node->cast().asteriskToken), + visitNode(cbNode, node->cast().name), + visitNode(cbNode, node->cast().questionToken), + visitNode(cbNode, node->cast().exclamationToken), + visitNodes(cbNode, cbNodes, node->cast().typeParameters), + visitNodes(cbNode, cbNodes, node->cast().parameters), + visitNode(cbNode, node->cast().type), + (node->kind == SyntaxKind::ArrowFunction ? visitNode(cbNode, to(node)->equalsGreaterThanToken) : tr::node(nullptr)), + visitNode(cbNode, node->cast().body)); } case SyntaxKind::ClassStaticBlockDeclaration: - return visitNodes(cbNode, cbNodes, to(node)->decorators) || - visitNodes(cbNode, cbNodes, to(node)->modifiers) || - visitNode(cbNode, to(node)->body); + return pick(visitNodes(cbNode, cbNodes, to(node)->decorators), + visitNodes(cbNode, cbNodes, to(node)->modifiers), + visitNode(cbNode, to(node)->body)); case SyntaxKind::TypeReference: - return visitNode(cbNode, to(node)->typeName) || - visitNodes(cbNode, cbNodes, to(node)->typeArguments); + return pick(visitNode(cbNode, to(node)->typeName), + visitNodes(cbNode, cbNodes, to(node)->typeArguments)); case SyntaxKind::TypePredicate: - return visitNode(cbNode, to(node)->assertsModifier) || - visitNode(cbNode, to(node)->parameterName) || - visitNode(cbNode, to(node)->type); + return pick(visitNode(cbNode, to(node)->assertsModifier), + visitNode(cbNode, to(node)->parameterName), + visitNode(cbNode, to(node)->type)); case SyntaxKind::TypeQuery: - return visitNode(cbNode, to(node)->exprName) || + return visitNode(cbNode, to(node)->exprName), visitNodes(cbNode, cbNodes, to(node)->typeArguments); case SyntaxKind::TypeLiteral: return visitNodes(cbNode, cbNodes, to(node)->members); @@ -368,17 +369,17 @@ namespace tr { case SyntaxKind::IntersectionType: return visitNodes(cbNode, cbNodes, to(node)->types); case SyntaxKind::ConditionalType: - return visitNode(cbNode, to(node)->checkType) || - visitNode(cbNode, to(node)->extendsType) || - visitNode(cbNode, to(node)->trueType) || - visitNode(cbNode, to(node)->falseType); + return pick(visitNode(cbNode, to(node)->checkType), + visitNode(cbNode, to(node)->extendsType), + visitNode(cbNode, to(node)->trueType), + visitNode(cbNode, to(node)->falseType)); case SyntaxKind::InferType: return visitNode(cbNode, to(node)->typeParameter); case SyntaxKind::ImportType: - return visitNode(cbNode, to(node)->argument) || - visitNode(cbNode, to(node)->assertions) || - visitNode(cbNode, to(node)->qualifier) || - visitNodes(cbNode, cbNodes, to(node)->typeArguments); + return pick(visitNode(cbNode, to(node)->argument), + visitNode(cbNode, to(node)->assertions), + visitNode(cbNode, to(node)->qualifier), + visitNodes(cbNode, cbNodes, to(node)->typeArguments)); case SyntaxKind::ImportTypeAssertionContainer: return visitNode(cbNode, to(node)->assertClause); case SyntaxKind::ParenthesizedType: @@ -386,22 +387,22 @@ namespace tr { case SyntaxKind::TypeOperator: return visitNode(cbNode, to(node)->type); case SyntaxKind::IndexedAccessType: - return visitNode(cbNode, to(node)->objectType) || - visitNode(cbNode, to(node)->indexType); + return pick(visitNode(cbNode, to(node)->objectType), + visitNode(cbNode, to(node)->indexType)); case SyntaxKind::MappedType: - return visitNode(cbNode, to(node)->readonlyToken) || - visitNode(cbNode, to(node)->typeParameter) || - visitNode(cbNode, to(node)->nameType) || - visitNode(cbNode, to(node)->questionToken) || - visitNode(cbNode, to(node)->type) || - visitNodes(cbNode, cbNodes, to(node)->members); + return pick(visitNode(cbNode, to(node)->readonlyToken), + visitNode(cbNode, to(node)->typeParameter), + visitNode(cbNode, to(node)->nameType), + visitNode(cbNode, to(node)->questionToken), + visitNode(cbNode, to(node)->type), + visitNodes(cbNode, cbNodes, to(node)->members)); case SyntaxKind::LiteralType: return visitNode(cbNode, to(node)->literal); case SyntaxKind::NamedTupleMember: - return visitNode(cbNode, to(node)->dotDotDotToken) || - visitNode(cbNode, to(node)->name) || - visitNode(cbNode, to(node)->questionToken) || - visitNode(cbNode, to(node)->type); + return pick(visitNode(cbNode, to(node)->dotDotDotToken), + visitNode(cbNode, to(node)->name), + visitNode(cbNode, to(node)->questionToken), + visitNode(cbNode, to(node)->type)); case SyntaxKind::ObjectBindingPattern: return visitNodes(cbNode, cbNodes, to(node)->elements); case SyntaxKind::ArrayBindingPattern: @@ -411,27 +412,27 @@ namespace tr { case SyntaxKind::ObjectLiteralExpression: return visitNodes(cbNode, cbNodes, to(node)->properties); case SyntaxKind::PropertyAccessExpression: - return visitNode(cbNode, to(node)->expression) || - visitNode(cbNode, to(node)->questionDotToken) || - visitNode(cbNode, to(node)->name); + return pick(visitNode(cbNode, to(node)->expression), + visitNode(cbNode, to(node)->questionDotToken), + visitNode(cbNode, to(node)->name)); case SyntaxKind::ElementAccessExpression: - return visitNode(cbNode, to(node)->expression) || - visitNode(cbNode, to(node)->questionDotToken) || - visitNode(cbNode, to(node)->argumentExpression); + return pick(visitNode(cbNode, to(node)->expression), + visitNode(cbNode, to(node)->questionDotToken), + visitNode(cbNode, to(node)->argumentExpression)); case SyntaxKind::CallExpression: case SyntaxKind::NewExpression: - return visitNode(cbNode, to(node)->expression) || - visitNode(cbNode, to(node)->questionDotToken) || - visitNodes(cbNode, cbNodes, to(node)->typeArguments) || - visitNodes(cbNode, cbNodes, to(node)->arguments); + return pick(visitNode(cbNode, to(node)->expression), + visitNode(cbNode, to(node)->questionDotToken), + visitNodes(cbNode, cbNodes, to(node)->typeArguments), + visitNodes(cbNode, cbNodes, to(node)->arguments)); case SyntaxKind::TaggedTemplateExpression: - return visitNode(cbNode, to(node)->tag) || - visitNode(cbNode, to(node)->questionDotToken) || - visitNodes(cbNode, cbNodes, to(node)->typeArguments) || - visitNode(cbNode, to(node)->templateLiteral); + return pick(visitNode(cbNode, to(node)->tag), + visitNode(cbNode, to(node)->questionDotToken), + visitNodes(cbNode, cbNodes, to(node)->typeArguments), + visitNode(cbNode, to(node)->templateLiteral)); case SyntaxKind::TypeAssertionExpression: - return visitNode(cbNode, to(node)->type) || - visitNode(cbNode, to(node)->expression); + return pick(visitNode(cbNode, to(node)->type), + visitNode(cbNode, to(node)->expression)); case SyntaxKind::ParenthesizedExpression: return visitNode(cbNode, to(node)->expression); case SyntaxKind::DeleteExpression: @@ -443,69 +444,69 @@ namespace tr { case SyntaxKind::PrefixUnaryExpression: return visitNode(cbNode, to(node)->operand); case SyntaxKind::YieldExpression: - return visitNode(cbNode, to(node)->asteriskToken) || - visitNode(cbNode, to(node)->expression); + return pick(visitNode(cbNode, to(node)->asteriskToken), + visitNode(cbNode, to(node)->expression)); case SyntaxKind::AwaitExpression: return visitNode(cbNode, to(node)->expression); case SyntaxKind::PostfixUnaryExpression: return visitNode(cbNode, to(node)->operand); case SyntaxKind::BinaryExpression: - return visitNode(cbNode, to(node)->left) || - visitNode(cbNode, to(node)->operatorToken) || - visitNode(cbNode, to(node)->right); + return pick(visitNode(cbNode, to(node)->left), + visitNode(cbNode, to(node)->operatorToken), + visitNode(cbNode, to(node)->right)); case SyntaxKind::AsExpression: - return visitNode(cbNode, to(node)->expression) || - visitNode(cbNode, to(node)->type); + return pick(visitNode(cbNode, to(node)->expression), + visitNode(cbNode, to(node)->type)); case SyntaxKind::NonNullExpression: return visitNode(cbNode, to(node)->expression); case SyntaxKind::MetaProperty: return visitNode(cbNode, to(node)->name); case SyntaxKind::ConditionalExpression: - return visitNode(cbNode, to(node)->condition) || - visitNode(cbNode, to(node)->questionToken) || - visitNode(cbNode, to(node)->whenTrue) || - visitNode(cbNode, to(node)->colonToken) || - visitNode(cbNode, to(node)->whenFalse); + return pick(visitNode(cbNode, to(node)->condition), + visitNode(cbNode, to(node)->questionToken), + visitNode(cbNode, to(node)->whenTrue), + visitNode(cbNode, to(node)->colonToken), + visitNode(cbNode, to(node)->whenFalse)); case SyntaxKind::SpreadElement: return visitNode(cbNode, to(node)->expression); case SyntaxKind::Block: case SyntaxKind::ModuleBlock: return visitNodes(cbNode, cbNodes, to(node)->statements); case SyntaxKind::SourceFile: - return visitNodes(cbNode, cbNodes, to(node)->statements) || - visitNode(cbNode, to(node)->endOfFileToken); + return pick(visitNodes(cbNode, cbNodes, to(node)->statements), + visitNode(cbNode, to(node)->endOfFileToken)); case SyntaxKind::VariableStatement: - return visitNodes(cbNode, cbNodes, to(node)->decorators) || - visitNodes(cbNode, cbNodes, to(node)->modifiers) || - visitNode(cbNode, to(node)->declarationList); + return pick(visitNodes(cbNode, cbNodes, to(node)->decorators), + visitNodes(cbNode, cbNodes, to(node)->modifiers), + visitNode(cbNode, to(node)->declarationList)); case SyntaxKind::VariableDeclarationList: return visitNodes(cbNode, cbNodes, to(node)->declarations); case SyntaxKind::ExpressionStatement: return visitNode(cbNode, to(node)->expression); case SyntaxKind::IfStatement: - return visitNode(cbNode, to(node)->expression) || - visitNode(cbNode, to(node)->thenStatement) || - visitNode(cbNode, to(node)->elseStatement); + return pick(visitNode(cbNode, to(node)->expression), + visitNode(cbNode, to(node)->thenStatement), + visitNode(cbNode, to(node)->elseStatement)); case SyntaxKind::DoStatement: - return visitNode(cbNode, to(node)->statement) || - visitNode(cbNode, to(node)->expression); + return pick(visitNode(cbNode, to(node)->statement), + visitNode(cbNode, to(node)->expression)); case SyntaxKind::WhileStatement: - return visitNode(cbNode, to(node)->expression) || - visitNode(cbNode, to(node)->statement); + return pick(visitNode(cbNode, to(node)->expression), + visitNode(cbNode, to(node)->statement)); case SyntaxKind::ForStatement: - return visitNode(cbNode, to(node)->initializer) || - visitNode(cbNode, to(node)->condition) || - visitNode(cbNode, to(node)->incrementor) || - visitNode(cbNode, to(node)->statement); + return pick(visitNode(cbNode, to(node)->initializer), + visitNode(cbNode, to(node)->condition), + visitNode(cbNode, to(node)->incrementor), + visitNode(cbNode, to(node)->statement)); case SyntaxKind::ForInStatement: - return visitNode(cbNode, to(node)->initializer) || - visitNode(cbNode, to(node)->expression) || - visitNode(cbNode, to(node)->statement); + return pick(visitNode(cbNode, to(node)->initializer), + visitNode(cbNode, to(node)->expression), + visitNode(cbNode, to(node)->statement)); case SyntaxKind::ForOfStatement: - return visitNode(cbNode, to(node)->awaitModifier) || - visitNode(cbNode, to(node)->initializer) || - visitNode(cbNode, to(node)->expression) || - visitNode(cbNode, to(node)->statement); + return pick(visitNode(cbNode, to(node)->awaitModifier), + visitNode(cbNode, to(node)->initializer), + visitNode(cbNode, to(node)->expression), + visitNode(cbNode, to(node)->statement)); case SyntaxKind::ContinueStatement: return visitNode(cbNode, to(node)->label); case SyntaxKind::BreakStatement: @@ -513,91 +514,91 @@ namespace tr { case SyntaxKind::ReturnStatement: return visitNode(cbNode, to(node)->expression); case SyntaxKind::WithStatement: - return visitNode(cbNode, to(node)->expression) || - visitNode(cbNode, to(node)->statement); + return pick(visitNode(cbNode, to(node)->expression), + visitNode(cbNode, to(node)->statement)); case SyntaxKind::SwitchStatement: - return visitNode(cbNode, to(node)->expression) || - visitNode(cbNode, to(node)->caseBlock); + return pick(visitNode(cbNode, to(node)->expression), + visitNode(cbNode, to(node)->caseBlock)); case SyntaxKind::CaseBlock: return visitNodes(cbNode, cbNodes, to(node)->clauses); case SyntaxKind::CaseClause: - return visitNode(cbNode, to(node)->expression) || - visitNodes(cbNode, cbNodes, to(node)->statements); + return pick(visitNode(cbNode, to(node)->expression), + visitNodes(cbNode, cbNodes, to(node)->statements)); case SyntaxKind::DefaultClause: return visitNodes(cbNode, cbNodes, to(node)->statements); case SyntaxKind::LabeledStatement: - return visitNode(cbNode, to(node)->label) || - visitNode(cbNode, to(node)->statement); + return pick(visitNode(cbNode, to(node)->label), + visitNode(cbNode, to(node)->statement)); case SyntaxKind::ThrowStatement: return visitNode(cbNode, to(node)->expression); case SyntaxKind::TryStatement: - return visitNode(cbNode, to(node)->tryBlock) || - visitNode(cbNode, to(node)->catchClause) || - visitNode(cbNode, to(node)->finallyBlock); + return pick(visitNode(cbNode, to(node)->tryBlock), + visitNode(cbNode, to(node)->catchClause), + visitNode(cbNode, to(node)->finallyBlock)); case SyntaxKind::CatchClause: - return visitNode(cbNode, to(node)->variableDeclaration) || - visitNode(cbNode, to(node)->block); + return pick(visitNode(cbNode, to(node)->variableDeclaration), + visitNode(cbNode, to(node)->block)); case SyntaxKind::Decorator: return visitNode(cbNode, to(node)->expression); case SyntaxKind::ClassDeclaration: - return visitNodes(cbNode, cbNodes, to(node)->decorators) || - visitNodes(cbNode, cbNodes, to(node)->modifiers) || - visitNode(cbNode, to(node)->name) || - visitNodes(cbNode, cbNodes, to(node)->typeParameters) || - visitNodes(cbNode, cbNodes, to(node)->heritageClauses) || - visitNodes(cbNode, cbNodes, to(node)->members); + return pick(visitNodes(cbNode, cbNodes, to(node)->decorators), + visitNodes(cbNode, cbNodes, to(node)->modifiers), + visitNode(cbNode, to(node)->name), + visitNodes(cbNode, cbNodes, to(node)->typeParameters), + visitNodes(cbNode, cbNodes, to(node)->heritageClauses), + visitNodes(cbNode, cbNodes, to(node)->members)); case SyntaxKind::ClassExpression: - return visitNodes(cbNode, cbNodes, to(node)->decorators) || - visitNodes(cbNode, cbNodes, to(node)->modifiers) || - visitNode(cbNode, to(node)->name) || - visitNodes(cbNode, cbNodes, to(node)->typeParameters) || - visitNodes(cbNode, cbNodes, to(node)->heritageClauses) || - visitNodes(cbNode, cbNodes, to(node)->members); + return pick(visitNodes(cbNode, cbNodes, to(node)->decorators), + visitNodes(cbNode, cbNodes, to(node)->modifiers), + visitNode(cbNode, to(node)->name), + visitNodes(cbNode, cbNodes, to(node)->typeParameters), + visitNodes(cbNode, cbNodes, to(node)->heritageClauses), + visitNodes(cbNode, cbNodes, to(node)->members)); case SyntaxKind::InterfaceDeclaration: - return visitNodes(cbNode, cbNodes, to(node)->decorators) || - visitNodes(cbNode, cbNodes, to(node)->modifiers) || - visitNode(cbNode, to(node)->name) || - visitNodes(cbNode, cbNodes, to(node)->typeParameters) || - visitNodes(cbNode, cbNodes, to(node)->heritageClauses) || - visitNodes(cbNode, cbNodes, to(node)->members); + return pick(visitNodes(cbNode, cbNodes, to(node)->decorators), + visitNodes(cbNode, cbNodes, to(node)->modifiers), + visitNode(cbNode, to(node)->name), + visitNodes(cbNode, cbNodes, to(node)->typeParameters), + visitNodes(cbNode, cbNodes, to(node)->heritageClauses), + visitNodes(cbNode, cbNodes, to(node)->members)); case SyntaxKind::TypeAliasDeclaration: - return visitNodes(cbNode, cbNodes, to(node)->decorators) || - visitNodes(cbNode, cbNodes, to(node)->modifiers) || - visitNode(cbNode, to(node)->name) || - visitNodes(cbNode, cbNodes, to(node)->typeParameters) || - visitNode(cbNode, to(node)->type); + return pick(visitNodes(cbNode, cbNodes, to(node)->decorators), + visitNodes(cbNode, cbNodes, to(node)->modifiers), + visitNode(cbNode, to(node)->name), + visitNodes(cbNode, cbNodes, to(node)->typeParameters), + visitNode(cbNode, to(node)->type)); case SyntaxKind::EnumDeclaration: - return visitNodes(cbNode, cbNodes, to(node)->decorators) || - visitNodes(cbNode, cbNodes, to(node)->modifiers) || - visitNode(cbNode, to(node)->name) || - visitNodes(cbNode, cbNodes, to(node)->members); + return pick(visitNodes(cbNode, cbNodes, to(node)->decorators), + visitNodes(cbNode, cbNodes, to(node)->modifiers), + visitNode(cbNode, to(node)->name), + visitNodes(cbNode, cbNodes, to(node)->members)); case SyntaxKind::EnumMember: - return visitNode(cbNode, to(node)->name) || - visitNode(cbNode, to(node)->initializer); + return pick(visitNode(cbNode, to(node)->name), + visitNode(cbNode, to(node)->initializer)); case SyntaxKind::ModuleDeclaration: - return visitNodes(cbNode, cbNodes, to(node)->decorators) || - visitNodes(cbNode, cbNodes, to(node)->modifiers) || - visitNode(cbNode, to(node)->name) || - visitNode(cbNode, to(node)->body); + return pick(visitNodes(cbNode, cbNodes, to(node)->decorators), + visitNodes(cbNode, cbNodes, to(node)->modifiers), + visitNode(cbNode, to(node)->name), + visitNode(cbNode, to(node)->body)); case SyntaxKind::ImportEqualsDeclaration: - return visitNodes(cbNode, cbNodes, to(node)->decorators) || - visitNodes(cbNode, cbNodes, to(node)->modifiers) || - visitNode(cbNode, to(node)->name) || - visitNode(cbNode, to(node)->moduleReference); + return pick(visitNodes(cbNode, cbNodes, to(node)->decorators), + visitNodes(cbNode, cbNodes, to(node)->modifiers), + visitNode(cbNode, to(node)->name), + visitNode(cbNode, to(node)->moduleReference)); case SyntaxKind::ImportDeclaration: - return visitNodes(cbNode, cbNodes, to(node)->decorators) || - visitNodes(cbNode, cbNodes, to(node)->modifiers) || - visitNode(cbNode, to(node)->importClause) || - visitNode(cbNode, to(node)->moduleSpecifier) || - visitNode(cbNode, to(node)->assertClause); + return pick(visitNodes(cbNode, cbNodes, to(node)->decorators), + visitNodes(cbNode, cbNodes, to(node)->modifiers), + visitNode(cbNode, to(node)->importClause), + visitNode(cbNode, to(node)->moduleSpecifier), + visitNode(cbNode, to(node)->assertClause)); case SyntaxKind::ImportClause: - return visitNode(cbNode, to(node)->name) || - visitNode(cbNode, to(node)->namedBindings); + return pick(visitNode(cbNode, to(node)->name), + visitNode(cbNode, to(node)->namedBindings)); case SyntaxKind::AssertClause: return visitNodes(cbNode, cbNodes, to(node)->elements); case SyntaxKind::AssertEntry: - return visitNode(cbNode, to(node)->name) || - visitNode(cbNode, to(node)->value); + return pick(visitNode(cbNode, to(node)->name), + visitNode(cbNode, to(node)->value)); case SyntaxKind::NamespaceExportDeclaration: return visitNode(cbNode, to(node)->name); case SyntaxKind::NamespaceImport: @@ -609,36 +610,36 @@ namespace tr { case SyntaxKind::NamedExports: return visitNodes(cbNode, cbNodes, to(node)->elements); case SyntaxKind::ExportDeclaration: - return visitNodes(cbNode, cbNodes, to(node)->decorators) || - visitNodes(cbNode, cbNodes, to(node)->modifiers) || - visitNode(cbNode, to(node)->exportClause) || - visitNode(cbNode, to(node)->moduleSpecifier) || - visitNode(cbNode, to(node)->assertClause); + return pick(visitNodes(cbNode, cbNodes, to(node)->decorators), + visitNodes(cbNode, cbNodes, to(node)->modifiers), + visitNode(cbNode, to(node)->exportClause), + visitNode(cbNode, to(node)->moduleSpecifier), + visitNode(cbNode, to(node)->assertClause)); case SyntaxKind::ImportSpecifier: - return visitNode(cbNode, to(node)->propertyName) || - visitNode(cbNode, to(node)->name); + return pick(visitNode(cbNode, to(node)->propertyName), + visitNode(cbNode, to(node)->name)); case SyntaxKind::ExportSpecifier: - return visitNode(cbNode, to(node)->propertyName) || - visitNode(cbNode, to(node)->name); + return pick(visitNode(cbNode, to(node)->propertyName), + visitNode(cbNode, to(node)->name)); case SyntaxKind::ExportAssignment: - return visitNodes(cbNode, cbNodes, to(node)->decorators) || - visitNodes(cbNode, cbNodes, to(node)->modifiers) || - visitNode(cbNode, to(node)->expression); + return pick(visitNodes(cbNode, cbNodes, to(node)->decorators), + visitNodes(cbNode, cbNodes, to(node)->modifiers), + visitNode(cbNode, to(node)->expression)); case SyntaxKind::TemplateExpression: - return visitNode(cbNode, to(node)->head) || visitNodes(cbNode, cbNodes, to(node)->templateSpans); + return visitNode(cbNode, to(node)->head), visitNodes(cbNode, cbNodes, to(node)->templateSpans); case SyntaxKind::TemplateSpan: - return visitNode(cbNode, to(node)->expression) || visitNode(cbNode, to(node)->literal); + return visitNode(cbNode, to(node)->expression), visitNode(cbNode, to(node)->literal); case SyntaxKind::TemplateLiteralType: - return visitNode(cbNode, to(node)->head) || visitNodes(cbNode, cbNodes, to(node)->templateSpans); + return visitNode(cbNode, to(node)->head), visitNodes(cbNode, cbNodes, to(node)->templateSpans); case SyntaxKind::TemplateLiteralTypeSpan: - return visitNode(cbNode, to(node)->type) || visitNode(cbNode, to(node)->literal); + return visitNode(cbNode, to(node)->type), visitNode(cbNode, to(node)->literal); case SyntaxKind::ComputedPropertyName: return visitNode(cbNode, to(node)->expression); case SyntaxKind::HeritageClause: return visitNodes(cbNode, cbNodes, to(node)->types); case SyntaxKind::ExpressionWithTypeArguments: - return visitNode(cbNode, to(node)->expression) || - visitNodes(cbNode, cbNodes, to(node)->typeArguments); + return pick(visitNode(cbNode, to(node)->expression), + visitNodes(cbNode, cbNodes, to(node)->typeArguments)); case SyntaxKind::ExternalModuleReference: return visitNode(cbNode, to(node)->expression); case SyntaxKind::MissingDeclaration: @@ -647,31 +648,31 @@ namespace tr { return visitNodes(cbNode, cbNodes, to(node)->elements); case SyntaxKind::JsxElement: - return visitNode(cbNode, to(node)->openingElement) || - visitNodes(cbNode, cbNodes, to(node)->children) || - visitNode(cbNode, to(node)->closingElement); + return pick(visitNode(cbNode, to(node)->openingElement), + visitNodes(cbNode, cbNodes, to(node)->children), + visitNode(cbNode, to(node)->closingElement)); case SyntaxKind::JsxFragment: - return visitNode(cbNode, to(node)->openingFragment) || - visitNodes(cbNode, cbNodes, to(node)->children) || - visitNode(cbNode, to(node)->closingFragment); + return pick(visitNode(cbNode, to(node)->openingFragment), + visitNodes(cbNode, cbNodes, to(node)->children), + visitNode(cbNode, to(node)->closingFragment)); case SyntaxKind::JsxSelfClosingElement: - return visitNode(cbNode, to(node)->tagName) || - visitNodes(cbNode, cbNodes, to(node)->typeArguments) || - visitNode(cbNode, to(node)->attributes); + return pick(visitNode(cbNode, to(node)->tagName), + visitNodes(cbNode, cbNodes, to(node)->typeArguments), + visitNode(cbNode, to(node)->attributes)); case SyntaxKind::JsxOpeningElement: - return visitNode(cbNode, to(node)->tagName) || - visitNodes(cbNode, cbNodes, to(node)->typeArguments) || - visitNode(cbNode, to(node)->attributes); + return pick(visitNode(cbNode, to(node)->tagName), + visitNodes(cbNode, cbNodes, to(node)->typeArguments), + visitNode(cbNode, to(node)->attributes)); case SyntaxKind::JsxAttributes: return visitNodes(cbNode, cbNodes, to(node)->properties); case SyntaxKind::JsxAttribute: - return visitNode(cbNode, to(node)->name) || - visitNode(cbNode, to(node)->initializer); + return pick(visitNode(cbNode, to(node)->name), + visitNode(cbNode, to(node)->initializer)); case SyntaxKind::JsxSpreadAttribute: return visitNode(cbNode, to(node)->expression); case SyntaxKind::JsxExpression: - return visitNode(cbNode, to(node)->dotDotDotToken) || - visitNode(cbNode, to(node)->expression); + return pick(visitNode(cbNode, to(node)->dotDotDotToken), + visitNode(cbNode, to(node)->expression)); case SyntaxKind::JsxClosingElement: return visitNode(cbNode, to(node)->tagName); @@ -681,6 +682,9 @@ namespace tr { return visitNode(cbNode, to(node)->type); case SyntaxKind::PartiallyEmittedExpression: return visitNode(cbNode, to(node)->expression); + default: { + throw std::runtime_error("forEachChild got invalid node"); + } } } @@ -765,7 +769,7 @@ namespace tr { * `getSetExternalModuleIndicator` on a valid `CompilerOptions` object. If not present, the default * check specified by `isFileProbablyExternalModule` will be used to set the field. */ - optional)>> setExternalModuleIndicator; + optional)>> setExternalModuleIndicator; }; // @@ -773,12 +777,12 @@ namespace tr { // sourceFile.externalModuleIndicator = isFileProbablyExternalModule(sourceFile); // } - inline void setExternalModuleIndicator(const shared &sourceFile) { + inline void setExternalModuleIndicator(const shared_ptr &sourceFile) { sourceFile->externalModuleIndicator = isFileProbablyExternalModule(sourceFile); } // namespace Parser { -// shared parseSourceFile(string fileName, string sourceText, ScriptTarget languageVersion, bool setParentNodes = false, optional scriptKind = {}, optional)>> setExternalModuleIndicatorOverride = {}); +// shared_ptr parseSourceFile(string fileName, string sourceText, ScriptTarget languageVersion, bool setParentNodes = false, optional scriptKind = {}, optional)>> setExternalModuleIndicatorOverride = {}); // }; // @@ -796,7 +800,7 @@ namespace tr { // } // See also `isExternalOrCommonJsModule` in utilities.ts - inline bool isExternalModule(const shared &file) { + inline bool isExternalModule(const shared_ptr &file) { return (bool) file->externalModuleIndicator; } @@ -855,7 +859,7 @@ namespace tr { // auto SourceFileConstructor: new (kind: SyntaxKind, int pos, end: number) => Node; // // tslint:enable variable-name - shared countNode(const shared &node); + node countNode(const node &node); // // Rather than using `createBaseNodeFactory` here, we establish a `BaseNodeFactory` that closes over the // // constructors above, which are reset each time `initializeState` is called. @@ -985,13 +989,13 @@ namespace tr { SyntaxKind nextTokenWithoutCheck(); - optional parseErrorAtPosition(int start, int length, const shared &message, DiagnosticArg arg = ""); + optional parseErrorAtPosition(int start, int length, const shared_ptr &message, DiagnosticArg arg = ""); - optional parseErrorAt(int start, int end, const shared &message, DiagnosticArg arg = "") { + optional parseErrorAt(int start, int end, const shared_ptr &message, DiagnosticArg arg = "") { return parseErrorAtPosition(start, end - start, message, arg); } - void scanError(const shared &message, int length) { + void scanError(const shared_ptr &message, int length) { parseErrorAtPosition(scanner.getTextPos(), length, message); } @@ -1084,7 +1088,7 @@ namespace tr { } template - shared withJSDoc(const shared &node, bool hasJSDoc) { + node withJSDoc(const node &node, bool hasJSDoc) { return node; //we do not care about JSDoc // return hasJSDoc ? addJSDocComment(node) : node; @@ -1093,7 +1097,7 @@ namespace tr { bool hasDeprecatedTag = false; template - shared addJSDocComment(shared node) { + node addJSDocComment(node node) { //no JSDoc support return node; // Debug::asserts(!node.jsDoc); // Should only be called once per node @@ -1223,15 +1227,15 @@ namespace tr { // setParentRecursive(rootNode, /*incremental*/ true); // } - shared createSourceFile( + shared_ptr createSourceFile( string fileName, ScriptTarget languageVersion, ScriptKind scriptKind, bool isDeclarationFile, - shared statements, - shared endOfFileToken, + node statements, + node endOfFileToken, int flags, - function)> setExternalModuleIndicator + function)> setExternalModuleIndicator ) { // code from createNode is inlined here so createNode won't have to deal with special case of creating source files // this is quite rare comparing to other nodes and createNode should be as fast as possible @@ -1296,7 +1300,7 @@ namespace tr { setContextFlag(val, NodeFlags::AwaitContext); } - optional parseErrorAtCurrentToken(const shared &message, DiagnosticArg arg = "") { + optional parseErrorAtCurrentToken(const shared_ptr &message, DiagnosticArg arg = "") { return parseErrorAt(scanner.getTokenPos(), scanner.getTextPos(), message, arg); } // @@ -1315,7 +1319,7 @@ namespace tr { // return result; // } - void parseErrorAtRange(shared range, const shared &message, DiagnosticArg arg = "") { + void parseErrorAtRange(node range, const shared_ptr &message, DiagnosticArg arg = "") { parseErrorAt(range->pos, range->end, message, arg); } @@ -1448,7 +1452,7 @@ namespace tr { * @param nameDiagnostic Diagnostic to report for all other cases. * @param tokenIfBlankName Current token if the name was invalid for being blank (not provided / skipped). */ - void parseErrorForInvalidName(shared nameDiagnostic, shared blankDiagnostic, SyntaxKind tokenIfBlankName) { + void parseErrorForInvalidName(shared_ptr nameDiagnostic, shared_ptr blankDiagnostic, SyntaxKind tokenIfBlankName) { if (token() == tokenIfBlankName) { parseErrorAtCurrentToken(blankDiagnostic); } else { @@ -1462,7 +1466,7 @@ namespace tr { * * @param node Node preceding the expected semicolon location. */ - void parseErrorForMissingSemicolonAfter(shared node) { + void parseErrorForMissingSemicolonAfter(node node) { // Tagged template literals are sometimes used in places where only simple strings are allowed, i.e.: // module `M1` { // ^^^^^^^^^^^ This block is parsed as a template literal like module`M1`. @@ -1560,7 +1564,7 @@ namespace tr { return true; } - void parseSemicolonAfterPropertyName(shared name, sharedOpt type, sharedOpt initializer) { + void parseSemicolonAfterPropertyName(node name, optionalNode type, optionalNode initializer) { if (token() == SyntaxKind::AtToken && !scanner.hasPrecedingLineBreak()) { parseErrorAtCurrentToken(Diagnostics::Decorators_must_precede_the_name_and_all_keywords_of_property_declarations()); return; @@ -1611,7 +1615,7 @@ namespace tr { } template - shared finishNode(shared node, int pos, optional end = {}) { + node finishNode(node node, int pos, optional end = {}) { ZoneScoped; setTextRangePosEnd(node, pos, end ? *end : scanner.getStartPos()); if (contextFlags) { @@ -1630,7 +1634,7 @@ namespace tr { } template - shared parseTokenNode() { + node parseTokenNode() { ZoneScoped; auto pos = getNodePos(); auto kind = token(); @@ -1640,7 +1644,7 @@ namespace tr { // function parseOptionalToken(t: TKind): Token; template - sharedOpt parseOptionalToken(SyntaxKind t) { + optionalNode parseOptionalToken(SyntaxKind t) { ZoneScoped; if (token() == t) { return parseTokenNode(); @@ -1673,20 +1677,20 @@ namespace tr { return tryParseSemicolon() || parseExpected(SyntaxKind::SemicolonToken); } - shared createNodeArray(const shared &array, int pos, optional end = {}, bool hasTrailingComma = false) { + node createNodeArray(const node &array, int pos, optional end = {}, bool hasTrailingComma = false) { if (!array) throw runtime_error("No array passed"); setTextRangePosEnd(array, pos, end ? *end : scanner.getStartPos()); return array; } -// shared createNodeArray(const vector> &elements, int pos, optional end = {}, bool hasTrailingComma = false) { +// node createNodeArray(const vector> &elements, int pos, optional end = {}, bool hasTrailingComma = false) { // auto array = factory.createNodeArray(elements, hasTrailingComma); // setTextRangePosEnd(array, pos, end ? *end : scanner.getStartPos()); // return array; // } // // //for empty call: createNodeArray(nullptr) -// shared createNodeArray(vector> *elements, int pos, optional end = {}, bool hasTrailingComma = false) { -// auto array = factory.createNodeArray(elements ? *elements : (vector>) {}, hasTrailingComma); +// node createNodeArray(vector> *elements, int pos, optional end = {}, bool hasTrailingComma = false) { +// auto array = factory.createNodeArray(elements ? *elements : (vector>) {}, hasTrailingComma); // setTextRangePosEnd(array, pos, end ? *end : scanner.getStartPos()); // return array; // } @@ -1694,7 +1698,7 @@ namespace tr { // function createMissingNode(kind: T["kind"], reportAtCurrentPosition: false, optional diagnosticMessage, arg0?: any): T; // function createMissingNode(kind: T["kind"], reportAtCurrentPosition: boolean, diagnosticMessage: DiagnosticMessage, arg0?: any): T; template - shared createMissingNode(SyntaxKind kind, bool reportAtCurrentPosition, const sharedOpt &diagnosticMessage = nullptr, DiagnosticArg arg = "") { + node createMissingNode(SyntaxKind kind, bool reportAtCurrentPosition, const shared_ptr &diagnosticMessage = nullptr, DiagnosticArg arg = "") { if (reportAtCurrentPosition && diagnosticMessage) { parseErrorAtPosition(scanner.getStartPos(), 0, diagnosticMessage, arg); } else if (diagnosticMessage) { @@ -1735,12 +1739,12 @@ namespace tr { return token() > SyntaxKind::LastReservedWord; } - shared parseBindingIdentifier(const sharedOpt &privateIdentifierDiagnosticMessage = nullptr) { + node parseBindingIdentifier(const shared_ptr &privateIdentifierDiagnosticMessage = nullptr) { ZoneScoped; return createIdentifier(isBindingIdentifier(), /*diagnosticMessage*/ {}, privateIdentifierDiagnosticMessage); } - shared parseIdentifierName(const sharedOpt &diagnosticMessage = nullptr) { + node parseIdentifierName(const shared_ptr &diagnosticMessage = nullptr) { return createIdentifier(tokenIsIdentifierOrKeyword(token()), diagnosticMessage); } @@ -2014,7 +2018,7 @@ namespace tr { } } - sharedOpt currentNode(ParsingContext parsingContext) { + optionalNode currentNode(ParsingContext parsingContext) { // If we don't have a cursor or the parsing context isn't reusable, there's nothing to reuse. // // If there is an outstanding parse error that we've encountered, but not attached to @@ -2590,7 +2594,7 @@ namespace tr { } } - shared consumeNode(shared node) { + node consumeNode(node node) { // Move the scanner so it is after the node we just consumed. scanner.setTextPos(node->end); nextToken(); @@ -2821,12 +2825,12 @@ namespace tr { // return parameter.initializer == undefined; // } // - sharedOpt getExpectedCommaDiagnostic(ParsingContext kind) { + shared_ptr getExpectedCommaDiagnostic(ParsingContext kind) { if (kind == ParsingContext::EnumMembers) return Diagnostics::An_enum_member_name_must_be_followed_by_a_or(); return nullptr; } - bool parseExpected(SyntaxKind kind, const sharedOpt &diagnosticMessage = nullptr, bool shouldAdvance = true) { + bool parseExpected(SyntaxKind kind, const shared_ptr &diagnosticMessage = nullptr, bool shouldAdvance = true) { if (token() == kind) { if (shouldAdvance) { nextToken(); @@ -2928,7 +2932,7 @@ namespace tr { } template - sharedOpt parseListElement(ParsingContext parsingContext, function()> parseElement) { + optionalNode parseListElement(ParsingContext parsingContext, function()> parseElement) { ZoneScoped; auto node = currentNode(parsingContext); if (node) { @@ -2939,11 +2943,11 @@ namespace tr { } // Parses a list of elements - shared parseList(ParsingContext kind, const function()> &parseElement) { + node parseList(ParsingContext kind, const function()> &parseElement) { ZoneScoped; int saveParsingContext = parsingContext; parsingContext |= 1 << (int) kind; - auto list = make_shared(); + auto list = factory.pool->construct(); auto listPos = getNodePos(); while (!isListTerminator(kind)) { @@ -2967,11 +2971,11 @@ namespace tr { // // Parses a comma-delimited list of elements // function parseDelimitedList(kind: ParsingContext, parseElement: () => T, considerSemicolonAsDelimiter?: boolean): NodeArray; // function parseDelimitedList(kind: ParsingContext, parseElement: () => T, considerSemicolonAsDelimiter?: boolean): NodeArray> | undefined; - sharedOpt parseDelimitedList(ParsingContext kind, function()> parseElement, optional considerSemicolonAsDelimiter = {}) { + optionalNode parseDelimitedList(ParsingContext kind, function()> parseElement, optional considerSemicolonAsDelimiter = {}) { ZoneScoped; auto saveParsingContext = parsingContext; parsingContext |= 1 << (int) kind; - auto list = make_shared(); + auto list = factory.pool->construct(); auto listPos = getNodePos(); int commaStart = -1; // Meaning the previous token was not a comma @@ -3041,20 +3045,20 @@ namespace tr { // isMissingList: true; // } - shared createMissingList() { - auto list = createNodeArray(make_shared(), getNodePos()); + node createMissingList() { + auto list = createNodeArray(factory.pool->construct(), getNodePos()); list->isMissingList = true; return list; } - bool isMissingList(const shared &arr) { + bool isMissingList(const node &arr) { return arr->isMissingList; } // An identifier that starts with two underscores has an extra underscore character prepended to it to avoid issues // with magic property names like '__proto__'. The 'identifiers' object is used to share a single string instance for // each identifier in order to reduce memory consumption. - shared createIdentifier(bool isIdentifier, const sharedOpt &diagnosticMessage = nullptr, const sharedOpt &privateIdentifierDiagnosticMessage = nullptr) { + node createIdentifier(bool isIdentifier, const shared_ptr &diagnosticMessage = nullptr, const shared_ptr &privateIdentifierDiagnosticMessage = nullptr) { ZoneScoped; if (isIdentifier) { identifierCount++; @@ -3090,7 +3094,7 @@ namespace tr { return createMissingNode(SyntaxKind::Identifier, reportAtCurrentPosition, diagnosticMessage ? diagnosticMessage : defaultMessage); } - shared parseIdentifier(const sharedOpt &diagnosticMessage = nullptr, const sharedOpt &privateIdentifierDiagnosticMessage = nullptr) { + node parseIdentifier(const shared_ptr &diagnosticMessage = nullptr, const shared_ptr &privateIdentifierDiagnosticMessage = nullptr) { return createIdentifier(isIdentifier(), diagnosticMessage, privateIdentifierDiagnosticMessage); } @@ -3199,7 +3203,7 @@ namespace tr { // return finishNode(factory.createQualifiedName(entity, name), entity.pos); // } - shared parseTemplateMiddleOrTemplateTail() { + node parseTemplateMiddleOrTemplateTail() { auto fragment = parseLiteralLikeNode(token()); Debug::asserts(fragment->kind == SyntaxKind::TemplateMiddle || fragment->kind == SyntaxKind::TemplateTail, "Template fragment has wrong token kind"); return fragment; @@ -3207,12 +3211,12 @@ namespace tr { // function parseExpectedToken(t: TKind, optional diagnosticMessage, arg0?: any): Token; template - shared parseExpectedToken(SyntaxKind t, const sharedOpt &diagnosticMessage = nullptr, DiagnosticArg arg0 = "") { + node parseExpectedToken(SyntaxKind t, const shared_ptr &diagnosticMessage = nullptr, DiagnosticArg arg0 = "") { if (auto a = parseOptionalToken(t)) return a; return createMissingNode(t, /*reportAtCurrentPosition*/ false, diagnosticMessage ? diagnosticMessage : Diagnostics::_0_expected(), arg0 != "" ? arg0 : tokenToString(t)); } - shared parseLiteralOfTemplateSpan(bool isTaggedTemplate) { + node parseLiteralOfTemplateSpan(bool isTaggedTemplate) { if (token() == SyntaxKind::CloseBraceToken) { reScanTemplateToken(isTaggedTemplate); return parseTemplateMiddleOrTemplateTail(); @@ -3222,21 +3226,21 @@ namespace tr { } } - shared parseTemplateSpan(bool isTaggedTemplate) { + node parseTemplateSpan(bool isTaggedTemplate) { auto pos = getNodePos(); return finishNode( factory.createTemplateSpan( - allowInAnd>(CALLBACK(parseExpression)), + allowInAnd>(CALLBACK(parseExpression)), parseLiteralOfTemplateSpan(isTaggedTemplate) ), pos ); } - shared parseTemplateSpans(bool isTaggedTemplate) { + node parseTemplateSpans(bool isTaggedTemplate) { auto pos = getNodePos(); - auto list = make_shared(); - sharedOpt node; + auto list = factory.pool->construct(); + optionalNode node = nullptr; do { node = parseTemplateSpan(isTaggedTemplate); list->push(node); @@ -3244,16 +3248,16 @@ namespace tr { return createNodeArray(list, pos); } - shared parseTemplateHead(bool isTaggedTemplate) { + node parseTemplateHead(bool isTaggedTemplate) { if (isTaggedTemplate) { reScanTemplateHeadOrNoSubstitutionTemplate(); } - shared fragment = parseLiteralLikeNode(token()); + node fragment = parseLiteralLikeNode(token()); // Debug::asserts(fragment.kind == SyntaxKind::TemplateHead, "Template head has wrong token kind"); - return reinterpret_pointer_cast(fragment); + return reinterpret_node(fragment); } - shared parseTemplateExpression(bool isTaggedTemplate) { + node parseTemplateExpression(bool isTaggedTemplate) { auto pos = getNodePos(); return finishNode( factory.createTemplateExpression( @@ -3264,9 +3268,9 @@ namespace tr { ); } - shared parseEntityName(bool allowReservedWords, const sharedOpt &diagnosticMessage = nullptr) { + node parseEntityName(bool allowReservedWords, const shared_ptr &diagnosticMessage = nullptr) { auto pos = getNodePos(); - shared entity = allowReservedWords ? parseIdentifierName(diagnosticMessage) : parseIdentifier(diagnosticMessage); + node entity = allowReservedWords ? parseIdentifierName(diagnosticMessage) : parseIdentifier(diagnosticMessage); auto dotPos = getNodePos(); while (parseOptional(SyntaxKind::DotToken)) { if (token() == SyntaxKind::LessThanToken) { @@ -3290,18 +3294,18 @@ namespace tr { // TYPES - shared parseEntityNameOfTypeReference() { + node parseEntityNameOfTypeReference() { return parseEntityName(/*allowReservedWords*/ true, Diagnostics::Type_expected()); } - sharedOpt parseTypeArgumentsOfTypeReference() { + optionalNode parseTypeArgumentsOfTypeReference() { if (!scanner.hasPrecedingLineBreak() && reScanLessThanToken() == SyntaxKind::LessThanToken) { return parseBracketedList(ParsingContext::TypeArguments, CALLBACK(parseType), SyntaxKind::LessThanToken, SyntaxKind::GreaterThanToken); } return nullptr; } - shared parseTypeReference() { + node parseTypeReference() { auto pos = getNodePos(); return finishNode( factory.createTypeReferenceNode( @@ -3313,13 +3317,13 @@ namespace tr { } // If true, we should abort parsing an error function. - bool typeHasArrowFunctionBlockingParseError(shared node) { + bool typeHasArrowFunctionBlockingParseError(node node) { switch (node->kind) { case SyntaxKind::TypeReference: return nodeIsMissing(to(node)->typeName); case SyntaxKind::FunctionType: case SyntaxKind::ConstructorType: { - auto f = reinterpret_pointer_cast(node); + auto f = reinterpret_node(node); return isMissingList(f->parameters) || typeHasArrowFunctionBlockingParseError(f->type); } case SyntaxKind::ParenthesizedType: @@ -3329,12 +3333,12 @@ namespace tr { } } - shared parseThisTypePredicate(shared lhs) { + node parseThisTypePredicate(node lhs) { nextToken(); return finishNode(factory.createTypePredicateNode(/*assertsModifier*/ {}, lhs, parseType()), lhs->pos); } - shared parseThisTypeNode() { + node parseThisTypeNode() { auto pos = getNodePos(); nextToken(); return finishNode(factory.createThisTypeNode(), pos); @@ -3443,12 +3447,12 @@ namespace tr { // return type; // } - shared parseTypeQuery() { + node parseTypeQuery() { auto pos = getNodePos(); parseExpected(SyntaxKind::TypeOfKeyword); auto entityName = parseEntityName(/*allowReservedWords*/ true); // Make sure we perform ASI to prevent parsing the next line's type arguments as part of an instantiation expression. - sharedOpt typeArguments = !scanner.hasPrecedingLineBreak() ? tryParseTypeArguments() : nullptr; + optionalNode typeArguments = !scanner.hasPrecedingLineBreak() ? tryParseTypeArguments() : nullptr; return finishNode(factory.createTypeQueryNode(entityName, typeArguments), pos); } @@ -3467,7 +3471,7 @@ namespace tr { return token() == SyntaxKind::QuestionDotToken && lookAhead(CALLBACK(nextTokenIsIdentifierOrKeywordOrOpenBracketOrTemplate)); } - bool tryReparseOptionalChain(shared node) { + bool tryReparseOptionalChain(node node) { if (node->flags & (int) NodeFlags::OptionalChain) { return true; } @@ -3490,7 +3494,7 @@ namespace tr { return false; } - shared parsePropertyAccessExpressionRest(int pos, const shared &expression, const sharedOpt &questionDotToken) { + node parsePropertyAccessExpressionRest(int pos, const node &expression, const optionalNode &questionDotToken) { auto name = parseRightSideOfDot(/*allowIdentifierNames*/ true, /*allowPrivateIdentifiers*/ true); auto isOptionalChain = questionDotToken || tryReparseOptionalChain(expression); auto propertyAccess = isOptionalChain ? @@ -3502,14 +3506,14 @@ namespace tr { return finishNode(propertyAccess, pos); } - shared parseElementAccessExpressionRest(int pos, const shared &expression, const sharedOpt &questionDotToken) { - sharedOpt argumentExpression; + node parseElementAccessExpressionRest(int pos, const node &expression, const optionalNode &questionDotToken) { + optionalNode argumentExpression = nullptr; if (token() == SyntaxKind::CloseBracketToken) { argumentExpression = createMissingNode(SyntaxKind::Identifier, /*reportAtCurrentPosition*/ true, Diagnostics::An_element_access_expression_should_take_an_argument()); } else { - auto argument = allowInAnd>(CALLBACK(parseExpression)); + auto argument = allowInAnd>(CALLBACK(parseExpression)); if (isStringOrNumericLiteralLike(argument)) { - reinterpret_pointer_cast(argument)->text = internIdentifier(reinterpret_pointer_cast(argument)->text); + reinterpret_node(argument)->text = internIdentifier(reinterpret_node(argument)->text); } argumentExpression = argument; } @@ -3522,10 +3526,10 @@ namespace tr { return finishNode(factory.createElementAccessExpression(expression, argumentExpression), pos); } - shared parseTaggedTemplateRest(int pos, shared tag, sharedOpt questionDotToken, sharedOpt typeArguments = {}) { - shared templateLiteral = token() == SyntaxKind::NoSubstitutionTemplateLiteral ? - (shared) (reScanTemplateHeadOrNoSubstitutionTemplate(), parseLiteralNode()) : - (shared) parseTemplateExpression(/*isTaggedTemplate*/ true); + node parseTaggedTemplateRest(int pos, node tag, optionalNode questionDotToken, optionalNode typeArguments = {}) { + node templateLiteral = token() == SyntaxKind::NoSubstitutionTemplateLiteral ? + (node) (reScanTemplateHeadOrNoSubstitutionTemplate(), parseLiteralNode()) : + (node) parseTemplateExpression(/*isTaggedTemplate*/ true); auto tagExpression = factory.createTaggedTemplateExpression( tag, typeArguments, @@ -3550,7 +3554,7 @@ namespace tr { return !isStartOfExpression(); } - sharedOpt parseTypeArgumentsInExpression() { + optionalNode parseTypeArgumentsInExpression() { if ((contextFlags & (int) NodeFlags::JavaScriptFile) != 0) { // TypeArguments must not be parsed in JavaScript files to avoid ambiguity with binary operators. return nullptr; @@ -3574,9 +3578,9 @@ namespace tr { return typeArguments && canFollowTypeArgumentsInExpression() ? typeArguments : nullptr; } - shared parseMemberExpressionRest(int pos, shared expression, bool allowOptionalChain) { + node parseMemberExpressionRest(int pos, node expression, bool allowOptionalChain) { while (true) { - sharedOpt questionDotToken; + optionalNode questionDotToken = nullptr; auto isPropertyAccess = false; if (allowOptionalChain && isStartOfOptionalPropertyOrElementAccessChain()) { questionDotToken = parseExpectedToken(SyntaxKind::QuestionDotToken); @@ -3610,18 +3614,18 @@ namespace tr { expression = finishNode(factory.createNonNullExpression(expression), pos); continue; } - auto typeArguments = tryParse>(CALLBACK(parseTypeArgumentsInExpression)); + auto typeArguments = tryParse>(CALLBACK(parseTypeArgumentsInExpression)); if (typeArguments) { expression = finishNode(factory.createExpressionWithTypeArguments(expression, typeArguments), pos); continue; } } - return reinterpret_pointer_cast(expression); + return reinterpret_node(expression); } } - shared parseDecoratorExpression() { + node parseDecoratorExpression() { if (inAwaitContext() && token() == SyntaxKind::AwaitKeyword) { // `@await` is is disallowed in an [Await] context, but can cause parsing to go off the rails // This simply parses the missing identifier and moves on. @@ -3634,22 +3638,22 @@ namespace tr { return parseLeftHandSideExpressionOrHigher(); } - sharedOpt tryParseDecorator() { + optionalNode tryParseDecorator() { auto pos = getNodePos(); if (!parseOptional(SyntaxKind::AtToken)) { return nullptr; } - auto expression = doInDecoratorContext>(CALLBACK(parseDecoratorExpression)); + auto expression = doInDecoratorContext>(CALLBACK(parseDecoratorExpression)); return finishNode(factory.createDecorator(expression), pos); } - sharedOpt parseDecorators() { + optionalNode parseDecorators() { ZoneScoped; auto pos = getNodePos(); - sharedOpt decorator; - sharedOpt list; - while (decorator = tryParseDecorator()) { - if (!list) list = make_shared(); + optionalNode decorator = nullptr; + optionalNode list = nullptr; + while ((decorator = tryParseDecorator())) { + if (!list) list = factory.pool->construct(); list->push(decorator); } if (!list) return nullptr; @@ -3660,7 +3664,7 @@ namespace tr { return isModifierKind(token()) && tryParse(CALLBACK(nextTokenCanFollowModifier)); } - sharedOpt tryParseModifier(bool permitInvalidConstAsModifier = false, bool stopOnStartOfClassStaticBlock = false, bool hasSeenStaticModifier = false) { + optionalNode tryParseModifier(bool permitInvalidConstAsModifier = false, bool stopOnStartOfClassStaticBlock = false, bool hasSeenStaticModifier = false) { ZoneScoped; const auto pos = getNodePos(); const auto kind = token(); @@ -3691,15 +3695,15 @@ namespace tr { * * In such situations, 'permitInvalidConstAsModifier' should be set to true. */ - sharedOpt parseModifiers(bool permitInvalidConstAsModifier = false, bool stopOnStartOfClassStaticBlock = false) { + optionalNode parseModifiers(bool permitInvalidConstAsModifier = false, bool stopOnStartOfClassStaticBlock = false) { ZoneScoped; const auto pos = getNodePos(); auto hasSeenStatic = false; - sharedOpt list; - sharedOpt modifier; + optionalNode list = nullptr; + optionalNode modifier = nullptr; while ((modifier = tryParseModifier(permitInvalidConstAsModifier, stopOnStartOfClassStaticBlock, hasSeenStatic))) { if (modifier->kind == SyntaxKind::StaticKeyword) hasSeenStatic = true; - if (!list) list = make_shared(); + if (!list) list = factory.pool->construct(); list->push(modifier); } if (list) return createNodeArray(list, pos); @@ -3713,7 +3717,7 @@ namespace tr { return isBindingIdentifier() || token() == SyntaxKind::OpenBracketToken || token() == SyntaxKind::OpenBraceToken; } - shared parseNameOfParameter(const sharedOpt &modifiers) { + node parseNameOfParameter(const optionalNode &modifiers) { ZoneScoped; // FormalParameter [Yield,Await]: // BindingElement[?Yield,?Await] @@ -3732,14 +3736,14 @@ namespace tr { return name; } - sharedOpt parseInitializer() { + optionalNode parseInitializer() { ZoneScoped; return parseOptional(SyntaxKind::EqualsToken) ? parseAssignmentExpressionOrHigher() : nullptr; } // function parseParameterWorker(inOuterAwaitContext: boolean): ParameterDeclaration; // function parseParameterWorker(inOuterAwaitContext: boolean, allowAmbiguity: false): ParameterDeclaration | undefined; - sharedOpt parseParameterWorker(bool inOuterAwaitContext, bool allowAmbiguity = true) { + optionalNode parseParameterWorker(bool inOuterAwaitContext, bool allowAmbiguity = true) { auto pos = getNodePos(); auto hasJSDoc = hasPrecedingJSDocComment(); @@ -3747,7 +3751,7 @@ namespace tr { // BindingElement[?Yield,?Await] // Decorators are parsed in the outer [Await] context, the rest of the parameter is parsed in the function's [Await] context. - auto decorators = inOuterAwaitContext ? doInAwaitContext>(CALLBACK(parseDecorators)) : parseDecorators(); + auto decorators = inOuterAwaitContext ? doInAwaitContext>(CALLBACK(parseDecorators)) : parseDecorators(); if (token() == SyntaxKind::ThisKeyword) { auto node = factory.createParameterDeclaration( @@ -3761,7 +3765,7 @@ namespace tr { ); if (decorators && !decorators->empty()) { - parseErrorAtRange(decorators->list[0], Diagnostics::Decorators_may_not_be_applied_to_this_parameters()); + parseErrorAtRange(decorators->head, Diagnostics::Decorators_may_not_be_applied_to_this_parameters()); } return withJSDoc(finishNode(node, pos), hasJSDoc); @@ -3796,11 +3800,11 @@ namespace tr { return node; } - shared parseParameter(bool inOuterAwaitContext) { + node parseParameter(bool inOuterAwaitContext) { return parseParameterWorker(inOuterAwaitContext); } - sharedOpt parseParameterForSpeculation(bool inOuterAwaitContext) { + optionalNode parseParameterForSpeculation(bool inOuterAwaitContext) { return parseParameterWorker(inOuterAwaitContext, /*allowAmbiguity*/ false); } @@ -3821,9 +3825,9 @@ namespace tr { // function parseReturnType(returnToken: SyntaxKind::EqualsGreaterThanToken, isType: boolean): TypeNode; // function parseReturnType(returnToken: SyntaxKind::ColonToken | SyntaxKind::EqualsGreaterThanToken, isType: boolean): TypeNode | undefined; - sharedOpt parseReturnType(SyntaxKind returnToken, bool isType) { + optionalNode parseReturnType(SyntaxKind returnToken, bool isType) { if (shouldParseReturnType(returnToken, isType)) { - return allowConditionalTypesAnd>(CALLBACK(parseTypeOrTypePredicate)); + return allowConditionalTypesAnd>(CALLBACK(parseTypeOrTypePredicate)); } return nullptr; } @@ -3839,7 +3843,7 @@ namespace tr { parseSemicolon(); } - shared parseArrayBindingElement() { + node parseArrayBindingElement() { auto pos = getNodePos(); if (token() == SyntaxKind::CommaToken) { return finishNode(factory.createOmittedExpression(), pos); @@ -3850,7 +3854,7 @@ namespace tr { return finishNode(factory.createBindingElement(dotDotDotToken, /*propertyName*/ {}, name, initializer), pos); } - shared parseArrayBindingPattern() { + node parseArrayBindingPattern() { ZoneScoped; auto pos = getNodePos(); parseExpected(SyntaxKind::OpenBracketToken); @@ -3865,9 +3869,9 @@ namespace tr { return substring(tokenText, 1, tokenText.size() - (scanner.isUnterminated() ? 0 : isLast ? 1 : 2)); } - shared parseLiteralLikeNode(SyntaxKind kind) { + node parseLiteralLikeNode(SyntaxKind kind) { auto pos = getNodePos(); - shared node = + node node = isTemplateLiteralKind(kind) ? factory.createTemplateLiteralLikeNode(kind, scanner.getTokenValue(), getTemplateLiteralRawText(kind), scanner.getTokenFlags() & (int) TokenFlags::TemplateLiteralLikeFlags) : // Octal literals are not allowed in strict mode or ES5 // Note that theoretically the following condition would hold true literals like 009, @@ -3892,11 +3896,11 @@ namespace tr { return finishNode(node, pos); } - shared parseLiteralNode() { + node parseLiteralNode() { return parseLiteralLikeNode(token()); } - shared parseComputedPropertyName() { + node parseComputedPropertyName() { // PropertyName [Yield]: // LiteralPropertyName // ComputedPropertyName[?Yield] @@ -3905,7 +3909,7 @@ namespace tr { // We parse any expression (including a comma expression). But the grammar // says that only an assignment expression is allowed, so the grammar checker // will error if it sees a comma expression. - auto expression = allowInAnd>(CALLBACK(parseExpression)); + auto expression = allowInAnd>(CALLBACK(parseExpression)); parseExpected(SyntaxKind::CloseBracketToken); return finishNode(factory.createComputedPropertyName(expression), pos); } @@ -3919,14 +3923,14 @@ namespace tr { return *privateIdentifier; } - shared parsePrivateIdentifier() { + node parsePrivateIdentifier() { auto pos = getNodePos(); auto node = factory.createPrivateIdentifier(internPrivateIdentifier(scanner.getTokenText())); nextToken(); return finishNode(node, pos); } - shared parsePropertyNameWorker(bool allowComputedPropertyNames) { + node parsePropertyNameWorker(bool allowComputedPropertyNames) { if (token() == SyntaxKind::StringLiteral || token() == SyntaxKind::NumericLiteral) { auto node = parseLiteralNode(); node->text = internIdentifier(node->text); @@ -3941,17 +3945,17 @@ namespace tr { return parseIdentifierName(); } - shared parsePropertyName() { + node parsePropertyName() { return parsePropertyNameWorker(/*allowComputedPropertyNames*/ true); } - shared parseObjectBindingElement() { + node parseObjectBindingElement() { ZoneScoped; auto pos = getNodePos(); auto dotDotDotToken = parseOptionalToken(SyntaxKind::DotDotDotToken); auto tokenIsIdentifier = isBindingIdentifier(); - sharedOpt propertyName = parsePropertyName(); - sharedOpt name; + optionalNode propertyName = parsePropertyName(); + optionalNode name = nullptr; if (tokenIsIdentifier && token() != SyntaxKind::ColonToken) { name = propertyName; propertyName = nullptr; @@ -3963,7 +3967,7 @@ namespace tr { return finishNode(factory.createBindingElement(dotDotDotToken, propertyName, name, initializer), pos); } - shared parseObjectBindingPattern() { + node parseObjectBindingPattern() { ZoneScoped; auto pos = getNodePos(); parseExpected(SyntaxKind::OpenBraceToken); @@ -3972,7 +3976,7 @@ namespace tr { return finishNode(factory.createObjectBindingPattern(elements), pos); } - shared> parseIdentifierOrPattern(const shared &privateIdentifierDiagnosticMessage = nullptr) { + node> parseIdentifierOrPattern(const shared_ptr &privateIdentifierDiagnosticMessage = nullptr) { ZoneScoped; if (token() == SyntaxKind::OpenBracketToken) { return parseArrayBindingPattern(); @@ -4045,13 +4049,13 @@ namespace tr { return token() == SyntaxKind::NewKeyword || (token() == SyntaxKind::AbstractKeyword && lookAhead(CALLBACK(nextTokenIsNewKeyword))); } - sharedOpt parseModifiersForConstructorType() { - sharedOpt modifiers; + optionalNode parseModifiersForConstructorType() { + optionalNode modifiers = nullptr; if (token() == SyntaxKind::AbstractKeyword) { auto pos = getNodePos(); nextToken(); auto modifier = finishNode(factory.createToken(SyntaxKind::AbstractKeyword), pos); - auto list = make_shared(); + auto list = factory.pool->construct(); list->push(modifier); modifiers = createNodeArray(list, pos); } @@ -4093,7 +4097,7 @@ namespace tr { } } - shared parseRightSideOfDot(bool allowIdentifierNames, bool allowPrivateIdentifiers) { + node parseRightSideOfDot(bool allowIdentifierNames, bool allowPrivateIdentifiers) { // Technically a keyword is valid here as all identifiers and keywords are identifier names. // However, often we'll encounter this in error situations when the identifier or keyword // is actually starting another valid construct. @@ -4126,13 +4130,13 @@ namespace tr { if (token() == SyntaxKind::PrivateIdentifier) { auto node = parsePrivateIdentifier(); - return allowPrivateIdentifiers ? (shared) node : createMissingNode(SyntaxKind::Identifier, /*reportAtCurrentPosition*/ true, Diagnostics::Identifier_expected()); + return allowPrivateIdentifiers ? (tr::node) node : createMissingNode(SyntaxKind::Identifier, /*reportAtCurrentPosition*/ true, Diagnostics::Identifier_expected()); } return allowIdentifierNames ? parseIdentifierName() : parseIdentifier(); } - shared parseJsxElementName() { + node parseJsxElementName() { auto pos = getNodePos(); scanJsxIdentifier(); // JsxElement can have name in the form of @@ -4140,14 +4144,14 @@ namespace tr { // primaryExpression in the form of an identifier and "this" keyword // We can't just simply use parseLeftHandSideExpressionOrHigher because then we will start consider class,function etc as a keyword // We only want to consider "this" as a primaryExpression - shared expression = token() == SyntaxKind::ThisKeyword ? (shared) parseTokenNode() : parseIdentifierName(); + node expression = token() == SyntaxKind::ThisKeyword ? (node) parseTokenNode() : parseIdentifierName(); while (parseOptional(SyntaxKind::DotToken)) { expression = finishNode(factory.createPropertyAccessExpression(expression, parseRightSideOfDot(/*allowIdentifierNames*/ true, /*allowPrivateIdentifiers*/ false)), pos); } return expression; } - shared parseBracketedList(ParsingContext kind, function()> parseElement, SyntaxKind open, SyntaxKind close) { + node parseBracketedList(ParsingContext kind, function()> parseElement, SyntaxKind open, SyntaxKind close) { if (parseExpected(open)) { auto result = parseDelimitedList(kind, parseElement); parseExpected(close); @@ -4157,7 +4161,7 @@ namespace tr { return createMissingList(); } - sharedOpt tryParseTypeArguments() { + optionalNode tryParseTypeArguments() { if (token() == SyntaxKind::LessThanToken) return parseBracketedList(ParsingContext::TypeArguments, CALLBACK(parseType), SyntaxKind::LessThanToken, SyntaxKind::GreaterThanToken); return nullptr; } @@ -4166,14 +4170,14 @@ namespace tr { return currentToken = scanner.scanJsxAttributeValue(); } - sharedOpt parseJsxExpression(bool inExpressionContext) { + optionalNode parseJsxExpression(bool inExpressionContext) { auto pos = getNodePos(); if (!parseExpected(SyntaxKind::OpenBraceToken)) { return nullptr; } - sharedOpt dotDotDotToken; - sharedOpt expression; + optionalNode dotDotDotToken = nullptr; + optionalNode expression = nullptr; if (token() != SyntaxKind::CloseBraceToken) { dotDotDotToken = parseOptionalToken(SyntaxKind::DotDotDotToken); // Only an AssignmentExpression is valid here per the JSX spec, @@ -4192,14 +4196,14 @@ namespace tr { return finishNode(factory.createJsxExpression(dotDotDotToken, expression), pos); } - shared parseJsxText() { + node parseJsxText() { auto pos = getNodePos(); auto node = factory.createJsxText(scanner.getTokenValue(), currentToken == SyntaxKind::JsxTextAllWhiteSpaces); currentToken = scanner.scanJsxToken(); return finishNode(node, pos); } - sharedOpt parseJsxChild(shared openingTag, SyntaxKind token) { + optionalNode parseJsxChild(node openingTag, SyntaxKind token) { switch (token) { case SyntaxKind::EndOfFileToken: // If we hit EOF, issue the error at the tag that lacks the closing element @@ -4231,7 +4235,7 @@ namespace tr { } /** @internal */ - bool tagNamesAreEquivalent(shared lhs, shared rhs) { + bool tagNamesAreEquivalent(node lhs, node rhs) { if (lhs->kind != rhs->kind) { return false; } @@ -4256,8 +4260,8 @@ namespace tr { return false; } - shared parseJsxChildren(shared openingTag) { - auto list = make_shared(); + node parseJsxChildren(node openingTag) { + auto list = factory.pool->construct(); auto listPos = getNodePos(); auto saveParsingContext = parsingContext; parsingContext |= 1 << (int) ParsingContext::JsxChildren; @@ -4279,7 +4283,7 @@ namespace tr { return createNodeArray(list, listPos); } - shared parseJsxClosingElement(shared open, bool inExpressionContext) { + node parseJsxClosingElement(node open, bool inExpressionContext) { auto pos = getNodePos(); parseExpected(SyntaxKind::LessThanSlashToken); auto tagName = parseJsxElementName(); @@ -4294,7 +4298,7 @@ namespace tr { return finishNode(factory.createJsxClosingElement(tagName), pos); } - shared parseJsxClosingFragment(bool inExpressionContext) { + node parseJsxClosingFragment(bool inExpressionContext) { auto pos = getNodePos(); parseExpected(SyntaxKind::LessThanSlashToken); if (tokenIsIdentifierOrKeyword(token())) { @@ -4311,17 +4315,17 @@ namespace tr { return finishNode(factory.createJsxJsxClosingFragment(), pos); } - shared - parseJsxElementOrSelfClosingElementOrFragment(bool inExpressionContext, optional topInvalidNodePosition = {}, sharedOpt openingTag = {}) { + node + parseJsxElementOrSelfClosingElementOrFragment(bool inExpressionContext, optional topInvalidNodePosition = {}, optionalNode openingTag = {}) { auto pos = getNodePos(); auto _opening = parseJsxOpeningOrSelfClosingElementOrOpeningFragment(inExpressionContext); - sharedOpt result; //JsxElement | JsxSelfClosingElement | JsxFragment + optionalNode result = nullptr; //JsxElement | JsxSelfClosingElement | JsxFragment if (_opening->kind == SyntaxKind::JsxOpeningElement) { - auto opening = reinterpret_pointer_cast(_opening); + auto opening = reinterpret_node(_opening); auto children = parseJsxChildren(opening); - sharedOpt closingElement; // JsxClosingElement; + optionalNode closingElement = nullptr; // JsxClosingElement; - auto lastChild = children->list[children->length() - 1]; + auto lastChild = children->last; if (lastChild && lastChild->kind == SyntaxKind::JsxElement && !tagNamesAreEquivalent(getTagName(to(lastChild)->openingElement), getTagName(to(lastChild)->closingElement)) && tagNamesAreEquivalent(getTagName(opening), getTagName(to(lastChild)->closingElement))) { @@ -4329,7 +4333,7 @@ namespace tr { // restructure (
(......
)) --> (
(......)
) // (no need to error; the parent will error) auto jsxElement = to(lastChild); - auto end = jsxElement->children->end; + auto end = jsxElement->children->posEnd; auto newLast = finishNode(factory.createJsxElement( jsxElement->openingElement, jsxElement->children, @@ -4337,10 +4341,11 @@ namespace tr { jsxElement->openingElement->pos, end); - auto c = children->slice(0, children->length() - 1); - c.push_back(newLast); - children = createNodeArray(make_shared(c), children->pos, end); - closingElement = jsxElement->closingElement; + //todo: We do not do anything here yet since NodeArray is not capable of doing that easily + //auto c = children->slice(0, children->length() - 1); + //c.push_back(newLast); + //children = createNodeArray(factory.pool->construct(c), children->pos, end); + //closingElement = jsxElement->closingElement; } else { closingElement = parseJsxClosingElement(opening, inExpressionContext); if (!tagNamesAreEquivalent(getTagName(opening), getTagName(closingElement))) { @@ -4355,7 +4360,7 @@ namespace tr { } result = finishNode(factory.createJsxElement(opening, children, closingElement), pos); } else if (_opening->kind == SyntaxKind::JsxOpeningFragment) { - auto opening = reinterpret_pointer_cast(_opening); + auto opening = reinterpret_node(_opening); result = finishNode(factory.createJsxFragment(opening, parseJsxChildren(opening), parseJsxClosingFragment(inExpressionContext)), pos); } else { assert(_opening->kind == SyntaxKind::JsxSelfClosingElement); @@ -4384,7 +4389,7 @@ namespace tr { return result; } - sharedOpt parseJsxAttributeValue() { + optionalNode parseJsxAttributeValue() { if (token() == SyntaxKind::EqualsToken) { if (scanJsxAttributeValue() == SyntaxKind::StringLiteral) { return parseLiteralNode(); @@ -4400,7 +4405,7 @@ namespace tr { return nullptr; } - shared parseJsxSpreadAttribute() { + node parseJsxSpreadAttribute() { auto pos = getNodePos(); parseExpected(SyntaxKind::OpenBraceToken); parseExpected(SyntaxKind::DotDotDotToken); @@ -4409,7 +4414,7 @@ namespace tr { return finishNode(factory.createJsxSpreadAttribute(expression), pos); } - shared parseJsxAttribute() { + node parseJsxAttribute() { if (token() == SyntaxKind::OpenBraceToken) { return parseJsxSpreadAttribute(); } @@ -4419,12 +4424,12 @@ namespace tr { return finishNode(factory.createJsxAttribute(parseIdentifierName(), parseJsxAttributeValue()), pos); } - shared parseJsxAttributes() { + node parseJsxAttributes() { auto pos = getNodePos(); return finishNode(factory.createJsxAttributes(parseList(ParsingContext::JsxAttributes, CALLBACK(parseJsxAttribute))), pos); } - shared parseJsxOpeningOrSelfClosingElementOrOpeningFragment(bool inExpressionContext) { + node parseJsxOpeningOrSelfClosingElementOrOpeningFragment(bool inExpressionContext) { auto pos = getNodePos(); parseExpected(SyntaxKind::LessThanToken); @@ -4435,10 +4440,10 @@ namespace tr { return finishNode(factory.createJsxOpeningFragment(), pos); } auto tagName = parseJsxElementName(); - sharedOpt typeArguments = (contextFlags & (int) NodeFlags::JavaScriptFile) == 0 ? tryParseTypeArguments() : nullptr; + optionalNode typeArguments = (contextFlags & (int) NodeFlags::JavaScriptFile) == 0 ? tryParseTypeArguments() : nullptr; auto attributes = parseJsxAttributes(); - sharedOpt node; + optionalNode node = nullptr; if (token() == SyntaxKind::GreaterThanToken) { // Closing tag, so scan the immediately-following text with the JSX scanning instead @@ -4471,7 +4476,7 @@ namespace tr { return nextToken() == SyntaxKind::DotToken; } - sharedOpt parseTypeParameters() { + optionalNode parseTypeParameters() { if (token() == SyntaxKind::LessThanToken) { return parseBracketedList(ParsingContext::TypeParameters, CALLBACK(parseTypeParameter), SyntaxKind::LessThanToken, SyntaxKind::GreaterThanToken); } @@ -4480,7 +4485,7 @@ namespace tr { // function parseParametersWorker(SignatureFlags flags, allowAmbiguity: true): NodeArray; // function parseParametersWorker(SignatureFlags flags, allowAmbiguity: false): NodeArray | undefined; - sharedOpt parseParametersWorker(int flags, bool allowAmbiguity) { + optionalNode parseParametersWorker(int flags, bool allowAmbiguity) { // FormalParameters [Yield,Await]: (modified) // [empty] // FormalParameterList[?Yield,Await] @@ -4500,9 +4505,9 @@ namespace tr { setYieldContext(!!(flags & (int) SignatureFlags::Yield)); setAwaitContext(!!(flags & (int) SignatureFlags::Await)); - sharedOpt parameters = flags & (int) SignatureFlags::JSDoc ? - make_shared() : //we ignore JSDoc, parseDelimitedList(ParsingContext::JSDocParameters, parseJSDocParameter) : - parseDelimitedList(ParsingContext::Parameters, [this, &allowAmbiguity, savedAwaitContext]()->sharedOpt { return allowAmbiguity ? parseParameter(savedAwaitContext) : parseParameterForSpeculation(savedAwaitContext); }); + optionalNode parameters = flags & (int) SignatureFlags::JSDoc ? + factory.pool->construct() : //we ignore JSDoc, parseDelimitedList(ParsingContext::JSDocParameters, parseJSDocParameter) : + parseDelimitedList(ParsingContext::Parameters, [this, &allowAmbiguity, savedAwaitContext]()->optionalNode { return allowAmbiguity ? parseParameter(savedAwaitContext) : parseParameterForSpeculation(savedAwaitContext); }); setYieldContext(savedYieldContext); setAwaitContext(savedAwaitContext); @@ -4510,7 +4515,7 @@ namespace tr { return parameters; } - shared parseParameters(int flags) { + node parseParameters(int flags) { // FormalParameters [Yield,Await]: (modified) // [empty] // FormalParameterList[?Yield,Await] @@ -4533,11 +4538,11 @@ namespace tr { return parameters; } - shared parseParameters(SignatureFlags flags) { + node parseParameters(SignatureFlags flags) { return parseParameters((int) flags); } - shared parseSignatureMember(SyntaxKind kind) { + node parseSignatureMember(SyntaxKind kind) { auto pos = getNodePos(); auto hasJSDoc = hasPrecedingJSDocComment(); if (kind == SyntaxKind::ConstructSignature) { @@ -4548,9 +4553,9 @@ namespace tr { auto parameters = parseParameters(SignatureFlags::Type); auto type = parseReturnType(SyntaxKind::ColonToken, /*isType*/ true); parseTypeMemberSemicolon(); - shared node = kind == SyntaxKind::CallSignature - ? (shared) factory.createCallSignature(typeParameters, parameters, type) - : (shared) factory.createConstructSignature(typeParameters, parameters, type); + node node = kind == SyntaxKind::CallSignature + ? (tr::node) factory.createCallSignature(typeParameters, parameters, type) + : (tr::node) factory.createConstructSignature(typeParameters, parameters, type); return withJSDoc(finishNode(node, pos), hasJSDoc); } @@ -4572,7 +4577,7 @@ namespace tr { } } - shared parseBlock(bool ignoreMissingOpenBrace, const sharedOpt &diagnosticMessage = nullptr) { + node parseBlock(bool ignoreMissingOpenBrace, const shared_ptr &diagnosticMessage = nullptr) { auto pos = getNodePos(); auto hasJSDoc = hasPrecedingJSDocComment(); auto openBracePosition = scanner.getTokenPos(); @@ -4594,7 +4599,7 @@ namespace tr { } } - shared parseFunctionBlock(int flags, const sharedOpt &diagnosticMessage = nullptr) { + node parseFunctionBlock(int flags, const shared_ptr &diagnosticMessage = nullptr) { auto savedYieldContext = inYieldContext(); setYieldContext(!!(flags & (int) SignatureFlags::Yield)); @@ -4624,7 +4629,7 @@ namespace tr { return block; } - sharedOpt parseFunctionBlockOrSemicolon(int flags, const sharedOpt &diagnosticMessage = nullptr) { + optionalNode parseFunctionBlockOrSemicolon(int flags, const shared_ptr &diagnosticMessage = nullptr) { if (token() != SyntaxKind::OpenBraceToken && canParseSemicolon()) { parseSemicolon(); return nullptr; @@ -4633,15 +4638,15 @@ namespace tr { return parseFunctionBlock(flags, diagnosticMessage); } - shared parseAccessorDeclaration(int pos, bool hasJSDoc, sharedOpt decorators, sharedOpt modifiers, SyntaxKind kind) { + node parseAccessorDeclaration(int pos, bool hasJSDoc, optionalNode decorators, optionalNode modifiers, SyntaxKind kind) { auto name = parsePropertyName(); auto typeParameters = parseTypeParameters(); auto parameters = parseParameters(SignatureFlags::None); auto type = parseReturnType(SyntaxKind::ColonToken, /*isType*/ false); auto body = parseFunctionBlockOrSemicolon((int) SignatureFlags::None); - shared node = kind == SyntaxKind::GetAccessor - ? (shared) factory.createGetAccessorDeclaration(decorators, modifiers, name, parameters, type, body) - : (shared) factory.createSetAccessorDeclaration(decorators, modifiers, name, parameters, body); + node node = kind == SyntaxKind::GetAccessor + ? (tr::node) factory.createGetAccessorDeclaration(decorators, modifiers, name, parameters, type, body) + : (tr::node) factory.createSetAccessorDeclaration(decorators, modifiers, name, parameters, body); // Keep track of `typeParameters` (for both) and `type` (for setters) if they were parsed those indicate grammar errors if (node->is()) { to(node)->typeParameters = typeParameters; @@ -4711,18 +4716,18 @@ namespace tr { return token() == SyntaxKind::OpenBracketToken && lookAhead(CALLBACK(isUnambiguouslyIndexSignature)); } - shared parseIndexSignatureDeclaration(int pos, bool hasJSDoc, sharedOpt decorators, sharedOpt modifiers) { - auto parameters = parseBracketedList(ParsingContext::Parameters, [this]()->shared { return parseParameter(/*inOuterAwaitContext*/ false); }, SyntaxKind::OpenBracketToken, SyntaxKind::CloseBracketToken); + node parseIndexSignatureDeclaration(int pos, bool hasJSDoc, optionalNode decorators, optionalNode modifiers) { + auto parameters = parseBracketedList(ParsingContext::Parameters, [this]()->node { return parseParameter(/*inOuterAwaitContext*/ false); }, SyntaxKind::OpenBracketToken, SyntaxKind::CloseBracketToken); auto type = parseTypeAnnotation(); parseTypeMemberSemicolon(); auto node = factory.createIndexSignature(decorators, modifiers, parameters, type); return withJSDoc(finishNode(node, pos), hasJSDoc); } - shared parsePropertyOrMethodSignature(int pos, bool hasJSDoc, sharedOpt modifiers) { + node parsePropertyOrMethodSignature(int pos, bool hasJSDoc, optionalNode modifiers) { auto name = parsePropertyName(); auto questionToken = parseOptionalToken(SyntaxKind::QuestionToken); - shared node; + node node; if (token() == SyntaxKind::OpenParenToken || token() == SyntaxKind::LessThanToken) { // Method signatures don't exist in expression contexts. So they have neither // [Yield] nor [Await] @@ -4743,7 +4748,7 @@ namespace tr { return withJSDoc(finishNode(node, pos), hasJSDoc); } - shared parseTypeMember() { + node parseTypeMember() { if (token() == SyntaxKind::OpenParenToken || token() == SyntaxKind::LessThanToken) { return parseSignatureMember(SyntaxKind::CallSignature); } @@ -4767,8 +4772,8 @@ namespace tr { return parsePropertyOrMethodSignature(pos, hasJSDoc, modifiers); } - shared parseObjectTypeMembers() { - shared members; + node parseObjectTypeMembers() { + node members; if (parseExpected(SyntaxKind::OpenBraceToken)) { members = parseList(ParsingContext::TypeMembers, CALLBACK(parseTypeMember)); parseExpected(SyntaxKind::CloseBraceToken); @@ -4778,42 +4783,42 @@ namespace tr { return members; } - shared parseTypeLiteral() { + node parseTypeLiteral() { auto pos = getNodePos(); return finishNode(factory.createTypeLiteralNode(parseObjectTypeMembers()), pos); } - shared parseSpreadElement() { + node parseSpreadElement() { auto pos = getNodePos(); parseExpected(SyntaxKind::DotDotDotToken); auto expression = parseAssignmentExpressionOrHigher(); return finishNode(factory.createSpreadElement(expression), pos); } - shared parseArgumentOrArrayLiteralElement() { + node parseArgumentOrArrayLiteralElement() { if (token() == SyntaxKind::DotDotDotToken) return parseSpreadElement(); if (token() == SyntaxKind::CommaToken) return finishNode(factory.createOmittedExpression(), getNodePos()); return parseAssignmentExpressionOrHigher(); } - shared parseArgumentExpression() { - return doOutsideOfContext>(disallowInAndDecoratorContext, CALLBACK(parseArgumentOrArrayLiteralElement)); + node parseArgumentExpression() { + return doOutsideOfContext>(disallowInAndDecoratorContext, CALLBACK(parseArgumentOrArrayLiteralElement)); } - shared parseArgumentList() { + node parseArgumentList() { parseExpected(SyntaxKind::OpenParenToken); auto result = parseDelimitedList(ParsingContext::ArgumentExpressions, CALLBACK(parseArgumentExpression)); parseExpected(SyntaxKind::CloseParenToken); return result; } - shared parseCallExpressionRest(int pos, shared expression) { + node parseCallExpressionRest(int pos, node expression) { while (true) { expression = parseMemberExpressionRest(pos, expression, /*allowOptionalChain*/ true); - sharedOpt typeArguments; + optionalNode typeArguments = nullptr; auto questionDotToken = parseOptionalToken(SyntaxKind::QuestionDotToken); if (questionDotToken) { - typeArguments = tryParse>(CALLBACK(parseTypeArgumentsInExpression)); + typeArguments = tryParse>(CALLBACK(parseTypeArgumentsInExpression)); if (isTemplateStartOfTaggedTemplate()) { expression = parseTaggedTemplateRest(pos, expression, questionDotToken, typeArguments); continue; @@ -4842,16 +4847,16 @@ namespace tr { return expression; } - shared parseParenthesizedExpression() { + node parseParenthesizedExpression() { auto pos = getNodePos(); auto hasJSDoc = hasPrecedingJSDocComment(); parseExpected(SyntaxKind::OpenParenToken); - auto expression = allowInAnd>(CALLBACK(parseExpression)); + auto expression = allowInAnd>(CALLBACK(parseExpression)); parseExpected(SyntaxKind::CloseParenToken); return withJSDoc(finishNode(factory.createParenthesizedExpression(expression), pos), hasJSDoc); } - shared parseArrayLiteralExpression() { + node parseArrayLiteralExpression() { auto pos = getNodePos(); auto openBracketPosition = scanner.getTokenPos(); auto openBracketParsed = parseExpected(SyntaxKind::OpenBracketToken); @@ -4861,16 +4866,16 @@ namespace tr { return finishNode(factory.createArrayLiteralExpression(elements, multiLine), pos); } - shared parseMethodDeclaration( + node parseMethodDeclaration( int pos, bool hasJSDoc, - sharedOpt decorators, - sharedOpt modifiers, - sharedOpt asteriskToken, - shared name, - sharedOpt questionToken, - sharedOpt exclamationToken, - const sharedOpt &diagnosticMessage = nullptr + optionalNode decorators, + optionalNode modifiers, + optionalNode asteriskToken, + node name, + optionalNode questionToken, + optionalNode exclamationToken, + const shared_ptr &diagnosticMessage = nullptr ) { auto isGenerator = asteriskToken ? SignatureFlags::Yield : SignatureFlags::None; auto isAsync = some(modifiers, isAsyncModifier) ? SignatureFlags::Await : SignatureFlags::None; @@ -4894,7 +4899,7 @@ namespace tr { return withJSDoc(finishNode(node, pos), hasJSDoc); } - shared parseObjectLiteralElement() { + node parseObjectLiteralElement() { ZoneScoped; auto pos = getNodePos(); auto hasJSDoc = hasPrecedingJSDocComment(); @@ -4931,11 +4936,11 @@ namespace tr { // CoverInitializedName[Yield] : // IdentifierReference[?Yield] Initializer[In, ?Yield] // this is necessary because ObjectLiteral productions are also used to cover grammar for ObjectAssignmentPattern - sharedOpt node; //: Mutable; + optionalNode node = nullptr; //: Mutable; auto isShorthandPropertyAssignment = tokenIsIdentifier && (token() != SyntaxKind::ColonToken); if (isShorthandPropertyAssignment) { auto equalsToken = parseOptionalToken(SyntaxKind::EqualsToken); - sharedOpt objectAssignmentInitializer = equalsToken ? allowInAnd>(CALLBACK(parseAssignmentExpressionOrHigher)) : nullptr; + optionalNode objectAssignmentInitializer = equalsToken ? allowInAnd>(CALLBACK(parseAssignmentExpressionOrHigher)) : nullptr; auto n = factory.createShorthandPropertyAssignment(name, objectAssignmentInitializer); // Save equals token for error reporting. // TODO(rbuckton): Consider manufacturing this when we need to report an error as it is otherwise not useful. @@ -4945,7 +4950,7 @@ namespace tr { node = n; } else { parseExpected(SyntaxKind::ColonToken); - auto initializer = allowInAnd>(CALLBACK(parseAssignmentExpressionOrHigher)); + auto initializer = allowInAnd>(CALLBACK(parseAssignmentExpressionOrHigher)); auto n = factory.createPropertyAssignment(name, initializer); n->questionToken = questionToken; n->exclamationToken = exclamationToken; @@ -4957,7 +4962,7 @@ namespace tr { return withJSDoc(finishNode(node, pos), hasJSDoc); } - shared parseObjectLiteralExpression() { + node parseObjectLiteralExpression() { auto pos = getNodePos(); auto openBracePosition = scanner.getTokenPos(); auto openBraceParsed = parseExpected(SyntaxKind::OpenBraceToken); @@ -4967,11 +4972,11 @@ namespace tr { return finishNode(factory.createObjectLiteralExpression(properties, multiLine), pos); } - sharedOpt parseOptionalBindingIdentifier() { + optionalNode parseOptionalBindingIdentifier() { return isBindingIdentifier() ? parseBindingIdentifier() : nullptr; } - shared parseFunctionExpression() { + node parseFunctionExpression() { // GeneratorExpression: // function* BindingIdentifier [Yield][opt](FormalParameters[Yield]){ GeneratorBody } // @@ -4987,9 +4992,9 @@ namespace tr { auto asteriskToken = parseOptionalToken(SyntaxKind::AsteriskToken); auto isGenerator = asteriskToken ? SignatureFlags::Yield : SignatureFlags::None; auto isAsync = some(modifiers, isAsyncModifier) ? SignatureFlags::Await : SignatureFlags::None; - auto name = (int) isGenerator && (int) isAsync ? doInYieldAndAwaitContext>(CALLBACK(parseOptionalBindingIdentifier)) : - (int) isGenerator ? doInYieldContext>(CALLBACK(parseOptionalBindingIdentifier)) : - (int) isAsync ? doInAwaitContext>(CALLBACK(parseOptionalBindingIdentifier)) : + auto name = (int) isGenerator && (int) isAsync ? doInYieldAndAwaitContext>(CALLBACK(parseOptionalBindingIdentifier)) : + (int) isGenerator ? doInYieldContext>(CALLBACK(parseOptionalBindingIdentifier)) : + (int) isAsync ? doInAwaitContext>(CALLBACK(parseOptionalBindingIdentifier)) : parseOptionalBindingIdentifier(); auto typeParameters = parseTypeParameters(); @@ -5007,7 +5012,7 @@ namespace tr { return token() == SyntaxKind::ImplementsKeyword && lookAhead(CALLBACK(nextTokenIsIdentifierOrKeyword)); } - sharedOpt parseNameOfClassDeclarationOrExpression() { + optionalNode parseNameOfClassDeclarationOrExpression() { // implements is a future reserved word so // 'class implements' might mean either // - class expression with omitted name, 'implements' starts heritage clause @@ -5018,17 +5023,17 @@ namespace tr { : nullptr; } - shared parseExpressionWithTypeArguments() { + node parseExpressionWithTypeArguments() { auto pos = getNodePos(); auto expression = parseLeftHandSideExpressionOrHigher(); if (expression->kind == SyntaxKind::ExpressionWithTypeArguments) { - return reinterpret_pointer_cast(expression); + return reinterpret_node(expression); } auto typeArguments = tryParseTypeArguments(); return finishNode(factory.createExpressionWithTypeArguments(expression, typeArguments), pos); } - shared parseHeritageClause() { + node parseHeritageClause() { auto pos = getNodePos(); auto tok = token(); Debug::asserts(tok == SyntaxKind::ExtendsKeyword || tok == SyntaxKind::ImplementsKeyword); // isListElement() should ensure this. @@ -5037,7 +5042,7 @@ namespace tr { return finishNode(factory.createHeritageClause(tok, types), pos); } - sharedOpt parseHeritageClauses() { + optionalNode parseHeritageClauses() { // ClassTail[Yield,Await] : (Modified) See 14.5 // ClassHeritage[?Yield,?Await]opt { ClassBody[?Yield,?Await]opt } @@ -5048,7 +5053,7 @@ namespace tr { return nullptr; } - shared parseClassStaticBlockBody() { + node parseClassStaticBlockBody() { auto savedYieldContext = inYieldContext(); auto savedAwaitContext = inAwaitContext(); @@ -5063,7 +5068,7 @@ namespace tr { return body; } - shared parseClassStaticBlockDeclaration(int pos, bool hasJSDoc, sharedOpt decorators, sharedOpt modifiers) { + node parseClassStaticBlockDeclaration(int pos, bool hasJSDoc, optionalNode decorators, optionalNode modifiers) { parseExpectedToken(SyntaxKind::StaticKeyword); auto body = parseClassStaticBlockBody(); return withJSDoc(finishNode(factory.createClassStaticBlockDeclaration(decorators, modifiers, body), pos), hasJSDoc); @@ -5082,8 +5087,8 @@ namespace tr { return false; } - sharedOpt tryParseConstructorDeclaration(int pos, bool hasJSDoc, sharedOpt decorators, sharedOpt modifiers) { - return tryParse>([this, &decorators, &modifiers, &pos, &hasJSDoc]()->sharedOpt { + optionalNode tryParseConstructorDeclaration(int pos, bool hasJSDoc, optionalNode decorators, optionalNode modifiers) { + return tryParse>([this, &decorators, &modifiers, &pos, &hasJSDoc]()->optionalNode { if (parseConstructorName()) { auto typeParameters = parseTypeParameters(); auto parameters = parseParameters(SignatureFlags::None); @@ -5099,31 +5104,31 @@ namespace tr { }); } - bool isDeclareModifier(shared modifier) { + bool isDeclareModifier(node modifier) { return modifier->kind == SyntaxKind::DeclareKeyword; } - shared parsePropertyDeclaration( + node parsePropertyDeclaration( int pos, bool hasJSDoc, - sharedOpt decorators, - sharedOpt modifiers, - shared name, - sharedOpt questionToken + optionalNode decorators, + optionalNode modifiers, + node name, + optionalNode questionToken ) { - sharedOpt exclamationToken = !questionToken && !scanner.hasPrecedingLineBreak() ? parseOptionalToken(SyntaxKind::ExclamationToken) : nullptr; + optionalNode exclamationToken = !questionToken && !scanner.hasPrecedingLineBreak() ? parseOptionalToken(SyntaxKind::ExclamationToken) : nullptr; auto type = parseTypeAnnotation(); - auto initializer = doOutsideOfContext>((int) NodeFlags::YieldContext | (int) NodeFlags::AwaitContext | (int) NodeFlags::DisallowInContext, CALLBACK(parseInitializer)); + auto initializer = doOutsideOfContext>((int) NodeFlags::YieldContext | (int) NodeFlags::AwaitContext | (int) NodeFlags::DisallowInContext, CALLBACK(parseInitializer)); parseSemicolonAfterPropertyName(name, type, initializer); - auto node = factory.createPropertyDeclaration(decorators, modifiers, name, questionToken ? (shared) questionToken : (shared) exclamationToken, type, initializer); + auto node = factory.createPropertyDeclaration(decorators, modifiers, name, questionToken ? (tr::node) questionToken : (tr::node) exclamationToken, type, initializer); return withJSDoc(finishNode(node, pos), hasJSDoc); } - shared parsePropertyOrMethodDeclaration( + node parsePropertyOrMethodDeclaration( int pos, bool hasJSDoc, - sharedOpt decorators, - sharedOpt modifiers + optionalNode decorators, + optionalNode modifiers ) { auto asteriskToken = parseOptionalToken(SyntaxKind::AsteriskToken); auto name = parsePropertyName(); @@ -5136,7 +5141,7 @@ namespace tr { return parsePropertyDeclaration(pos, hasJSDoc, decorators, modifiers, name, questionToken); } - shared parseClassElement() { + node parseClassElement() { auto pos = getNodePos(); if (token() == SyntaxKind::SemicolonToken) { nextToken(); @@ -5178,10 +5183,10 @@ namespace tr { token() == SyntaxKind::OpenBracketToken) { auto isAmbient = some(modifiers, CALLBACK(isDeclareModifier)); if (isAmbient && modifiers) { - for (auto &&m: modifiers->list) { + for (auto m: *modifiers) { m->flags |= (int) NodeFlags::Ambient; } - return doInsideOfContext>((int) NodeFlags::Ambient, [&]() { + return doInsideOfContext>((int) NodeFlags::Ambient, [&]() { return parsePropertyOrMethodDeclaration(pos, hasJSDoc, decorators, modifiers); }); } else { @@ -5199,11 +5204,11 @@ namespace tr { throw runtime_error("Should not have attempted to parse class member declaration."); } - shared parseClassMembers() { + node parseClassMembers() { return parseList(ParsingContext::ClassMembers, CALLBACK(parseClassElement)); } - shared parseClassDeclarationOrExpression(int pos, bool hasJSDoc, sharedOpt decorators, sharedOpt modifiers, SyntaxKind kind) { + node parseClassDeclarationOrExpression(int pos, bool hasJSDoc, optionalNode decorators, optionalNode modifiers, SyntaxKind kind) { auto savedAwaitContext = inAwaitContext(); parseExpected(SyntaxKind::ClassKeyword); @@ -5213,7 +5218,7 @@ namespace tr { if (some(modifiers, isExportModifier)) setAwaitContext(/*value*/ true); auto heritageClauses = parseHeritageClauses(); - shared members; + node members; if (parseExpected(SyntaxKind::OpenBraceToken)) { // ClassTail[Yield,Await] : (Modified) See 14.5 // ClassHeritage[?Yield,?Await]opt { ClassBody[?Yield,?Await]opt } @@ -5224,16 +5229,16 @@ namespace tr { } setAwaitContext(savedAwaitContext); auto node = kind == SyntaxKind::ClassDeclaration - ? (shared) factory.createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members) - : (shared) factory.createClassExpression(decorators, modifiers, name, typeParameters, heritageClauses, members); + ? (tr::node) factory.createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members) + : (tr::node) factory.createClassExpression(decorators, modifiers, name, typeParameters, heritageClauses, members); return withJSDoc(finishNode(node, pos), hasJSDoc); } - shared parseClassExpression() { - return reinterpret_pointer_cast(parseClassDeclarationOrExpression(getNodePos(), hasPrecedingJSDocComment(), /*decorators*/ {}, /*modifiers*/ {}, SyntaxKind::ClassExpression)); + node parseClassExpression() { + return reinterpret_node(parseClassDeclarationOrExpression(getNodePos(), hasPrecedingJSDocComment(), /*decorators*/ {}, /*modifiers*/ {}, SyntaxKind::ClassExpression)); } - shared parseNewExpressionOrNewDotTarget() { + node parseNewExpressionOrNewDotTarget() { auto pos = getNodePos(); parseExpected(SyntaxKind::NewKeyword); if (parseOptional(SyntaxKind::DotToken)) { @@ -5241,20 +5246,20 @@ namespace tr { return finishNode(factory.createMetaProperty(SyntaxKind::NewKeyword, name), pos); } auto expressionPos = getNodePos(); - shared expression = parseMemberExpressionRest(expressionPos, parsePrimaryExpression(), /*allowOptionalChain*/ false); - sharedOpt typeArguments; + node expression = parseMemberExpressionRest(expressionPos, parsePrimaryExpression(), /*allowOptionalChain*/ false); + optionalNode typeArguments = nullptr; // Absorb type arguments into NewExpression when preceding expression is ExpressionWithTypeArguments if (expression->kind == SyntaxKind::ExpressionWithTypeArguments) { typeArguments = to(expression)->typeArguments; expression = to(expression)->expression; } - sharedOpt argumentList; + optionalNode argumentList = nullptr; if (token() == SyntaxKind::OpenParenToken) argumentList = parseArgumentList(); return finishNode(factory.createNewExpression(expression, typeArguments, argumentList), pos); } - shared parsePrimaryExpression() { + node parsePrimaryExpression() { switch (token()) { case SyntaxKind::NumericLiteral: case SyntaxKind::BigIntLiteral: @@ -5303,7 +5308,7 @@ namespace tr { return parseIdentifier(Diagnostics::Expression_expected()); } - shared parseMemberExpressionOrHigher() { + node parseMemberExpressionOrHigher() { ZoneScoped; // Note: to make our lives simpler, we decompose the NewExpression productions and // place ObjectCreationExpression and FunctionExpression into PrimaryExpression. @@ -5357,13 +5362,13 @@ namespace tr { return parseMemberExpressionRest(pos, expression, /*allowOptionalChain*/ true); } - shared parseSuperExpression() { + node parseSuperExpression() { ZoneScoped; auto pos = getNodePos(); auto expression = parseTokenNode(); if (token() == SyntaxKind::LessThanToken) { auto startPos = getNodePos(); - auto typeArguments = tryParse>(CALLBACK(parseTypeArgumentsInExpression)); + auto typeArguments = tryParse>(CALLBACK(parseTypeArgumentsInExpression)); if (typeArguments) { parseErrorAt(startPos, getNodePos(), Diagnostics::super_may_not_use_type_arguments()); } @@ -5380,7 +5385,7 @@ namespace tr { return finishNode(factory.createPropertyAccessExpression(expression, parseRightSideOfDot(/*allowIdentifierNames*/ true, /*allowPrivateIdentifiers*/ true)), pos); } - shared parseLeftHandSideExpressionOrHigher() { + node parseLeftHandSideExpressionOrHigher() { ZoneScoped; // Original Ecma: // LeftHandSideExpression: See 11.2 @@ -5414,7 +5419,7 @@ namespace tr { // 3)we have a MemberExpression which either completes the LeftHandSideExpression, // or starts the beginning of the first four CallExpression productions. auto pos = getNodePos(); - sharedOpt expression; + optionalNode expression = nullptr; if (token() == SyntaxKind::ImportKeyword) { if (lookAhead(CALLBACK(nextTokenIsOpenParenOrLessThan))) { // We don't want to eagerly consume all import keyword as import call expression so we look ahead to find "(" @@ -5443,18 +5448,18 @@ namespace tr { return parseCallExpressionRest(pos, expression); } - shared makeAsExpression(shared left, shared right) { + node makeAsExpression(node left, node right) { return finishNode(factory.createAsExpression(left, right), left->pos); } - shared parseBinaryExpressionOrHigher(int precedence) { + node parseBinaryExpressionOrHigher(int precedence) { ZoneScoped; auto pos = getNodePos(); auto leftOperand = parseUnaryExpressionOrHigher(); return parseBinaryExpressionRest(precedence, leftOperand, pos); } - shared parseBinaryExpressionRest(int precedence, shared leftOperand, int pos) { + node parseBinaryExpressionRest(int precedence, node leftOperand, int pos) { ZoneScoped; while (true) { // We either have a binary operator here, or we're finished. We call @@ -5528,11 +5533,11 @@ namespace tr { * 5) --LeftHandSideExpression[?yield] * In TypeScript (2), (3) are parsed as PostfixUnaryExpression. (4), (5) are parsed as PrefixUnaryExpression */ - shared parseUpdateExpression() { + node parseUpdateExpression() { ZoneScoped; if (token() == SyntaxKind::PlusPlusToken || token() == SyntaxKind::MinusMinusToken) { auto pos = getNodePos(); - return finishNode(factory.createPrefixUnaryExpression(token(), nextTokenAnd>(CALLBACK(parseLeftHandSideExpressionOrHigher))), pos); + return finishNode(factory.createPrefixUnaryExpression(token(), nextTokenAnd>(CALLBACK(parseLeftHandSideExpressionOrHigher))), pos); } else if (languageVariant == LanguageVariant::JSX && token() == SyntaxKind::LessThanToken && lookAhead(CALLBACK(nextTokenIsIdentifierOrKeywordOrGreaterThan))) { // JSXElement is part of primaryExpression return parseJsxElementOrSelfClosingElementOrFragment(/*inExpressionContext*/ true); @@ -5550,29 +5555,29 @@ namespace tr { return expression; } - shared parsePrefixUnaryExpression() { + node parsePrefixUnaryExpression() { auto pos = getNodePos(); - return finishNode(factory.createPrefixUnaryExpression(token(), nextTokenAnd>(CALLBACK(parseSimpleUnaryExpression))), pos); + return finishNode(factory.createPrefixUnaryExpression(token(), nextTokenAnd>(CALLBACK(parseSimpleUnaryExpression))), pos); } - shared parseDeleteExpression() { + node parseDeleteExpression() { auto pos = getNodePos(); - return finishNode(factory.createDeleteExpression(nextTokenAnd>(CALLBACK(parseSimpleUnaryExpression))), pos); + return finishNode(factory.createDeleteExpression(nextTokenAnd>(CALLBACK(parseSimpleUnaryExpression))), pos); } - shared parseTypeOfExpression() { + node parseTypeOfExpression() { auto pos = getNodePos(); - return finishNode(factory.createTypeOfExpression(nextTokenAnd>(CALLBACK(parseSimpleUnaryExpression))), pos); + return finishNode(factory.createTypeOfExpression(nextTokenAnd>(CALLBACK(parseSimpleUnaryExpression))), pos); } - shared parseVoidExpression() { + node parseVoidExpression() { auto pos = getNodePos(); - return finishNode(factory.createVoidExpression(nextTokenAnd>(CALLBACK(parseSimpleUnaryExpression))), pos); + return finishNode(factory.createVoidExpression(nextTokenAnd>(CALLBACK(parseSimpleUnaryExpression))), pos); } - shared parseAwaitExpression() { + node parseAwaitExpression() { auto pos = getNodePos(); - return finishNode(factory.createAwaitExpression(nextTokenAnd>(CALLBACK(parseSimpleUnaryExpression))), pos); + return finishNode(factory.createAwaitExpression(nextTokenAnd>(CALLBACK(parseSimpleUnaryExpression))), pos); } bool isAwaitExpression() { @@ -5602,7 +5607,7 @@ namespace tr { * 8) ! UnaryExpression[?yield] * 9) [+Await] await UnaryExpression[?yield] */ - shared parseSimpleUnaryExpression() { + node parseSimpleUnaryExpression() { ZoneScoped; switch (token()) { case SyntaxKind::PlusToken: @@ -5627,11 +5632,11 @@ namespace tr { } // falls through default: - return reinterpret_pointer_cast(parseUpdateExpression()); + return reinterpret_node(parseUpdateExpression()); } } - shared parseTypeAssertion() { + node parseTypeAssertion() { auto pos = getNodePos(); parseExpected(SyntaxKind::LessThanToken); auto type = parseType(); @@ -5648,7 +5653,7 @@ namespace tr { * 2) UpdateExpression[?Yield] ** ExponentiationExpression[?Yield] * */ - shared parseUnaryExpressionOrHigher() { + node parseUnaryExpressionOrHigher() { ZoneScoped; /** * ES7 UpdateExpression: @@ -5690,13 +5695,13 @@ namespace tr { return simpleUnaryExpression; } - shared parseTypeParameter() { + node parseTypeParameter() { auto pos = getNodePos(); auto modifiers = parseModifiers(); auto name = parseIdentifier(); - sharedOpt constraint; - sharedOpt expression; + optionalNode constraint = nullptr; + optionalNode expression = nullptr; if (parseOptional(SyntaxKind::ExtendsKeyword)) { // It's not uncommon for people to write improper constraints to a generic. If the @@ -5717,7 +5722,7 @@ namespace tr { } } - sharedOpt defaultType; + optionalNode defaultType = nullptr; if (parseOptional(SyntaxKind::EqualsToken)) defaultType = parseType(); auto node = factory.createTypeParameterDeclaration(modifiers, name, constraint, defaultType); @@ -5725,7 +5730,7 @@ namespace tr { return finishNode(node, pos); } - shared parseFunctionOrConstructorType() { + node parseFunctionOrConstructorType() { auto pos = getNodePos(); auto hasJSDoc = hasPrecedingJSDocComment(); auto modifiers = parseModifiersForConstructorType(); @@ -5734,21 +5739,21 @@ namespace tr { auto parameters = parseParameters(SignatureFlags::Type); auto type = parseReturnType(SyntaxKind::EqualsGreaterThanToken, /*isType*/ false); auto node = isConstructorType - ? (shared) factory.createConstructorTypeNode1(modifiers, typeParameters, parameters, type) - : (shared) factory.createFunctionTypeNode(typeParameters, parameters, type); + ? (tr::node) factory.createConstructorTypeNode1(modifiers, typeParameters, parameters, type) + : (tr::node) factory.createFunctionTypeNode(typeParameters, parameters, type); if (!isConstructorType) node->modifiers = modifiers; return withJSDoc(finishNode(node, pos), hasJSDoc); } - shared parseTypeOperator(SyntaxKind operatorKind) { + node parseTypeOperator(SyntaxKind operatorKind) { auto pos = getNodePos(); parseExpected(operatorKind); return finishNode(factory.createTypeOperatorNode(operatorKind, parseTypeOperatorOrHigher()), pos); } - sharedOpt tryParseConstraintOfInferType() { + optionalNode tryParseConstraintOfInferType() { if (parseOptional(SyntaxKind::ExtendsKeyword)) { - auto constraint = disallowConditionalTypesAnd>(CALLBACK(parseType)); + auto constraint = disallowConditionalTypesAnd>(CALLBACK(parseType)); if (inDisallowConditionalTypesContext() || token() != SyntaxKind::QuestionToken) { return constraint; } @@ -5756,38 +5761,38 @@ namespace tr { return nullptr; } - shared parseTypeParameterOfInferType() { + node parseTypeParameterOfInferType() { auto pos = getNodePos(); auto name = parseIdentifier(); - auto constraint = tryParse>(CALLBACK(tryParseConstraintOfInferType)); + auto constraint = tryParse>(CALLBACK(tryParseConstraintOfInferType)); auto node = factory.createTypeParameterDeclaration(/*modifiers*/ {}, name, constraint); return finishNode(node, pos); } - shared parseInferType() { + node parseInferType() { auto pos = getNodePos(); parseExpected(SyntaxKind::InferKeyword); return finishNode(factory.createInferTypeNode(parseTypeParameterOfInferType()), pos); } - sharedOpt parseKeywordAndNoDot() { + optionalNode parseKeywordAndNoDot() { auto node = parseTokenNode(); return token() == SyntaxKind::DotToken ? nullptr : node; } - shared parseJSDocAllType() { + node parseJSDocAllType() { throw runtime_error("JSDoc not supported"); // auto pos = getNodePos(); // nextToken(); // return finishNode(factory.createJSDocAllType(), pos); } - shared parseLiteralTypeNode(optional negative = {}) { + node parseLiteralTypeNode(optional negative = {}) { auto pos = getNodePos(); if (negative && *negative) { nextToken(); } - shared expression = + node expression = token() == SyntaxKind::TrueKeyword || token() == SyntaxKind::FalseKeyword || token() == SyntaxKind::NullKeyword ? parseTokenNode() : parseLiteralLikeNode(token()); @@ -5802,16 +5807,16 @@ namespace tr { return token() == SyntaxKind::ImportKeyword; } - shared parseAssertEntry() { + node parseAssertEntry() { ZoneScoped; auto pos = getNodePos(); - shared name = tokenIsIdentifierOrKeyword(token()) ? (shared) parseIdentifierName() : (shared) parseLiteralLikeNode(SyntaxKind::StringLiteral); + node name = tokenIsIdentifierOrKeyword(token()) ? (node) parseIdentifierName() : (node) parseLiteralLikeNode(SyntaxKind::StringLiteral); parseExpected(SyntaxKind::ColonToken); auto value = parseAssignmentExpressionOrHigher(); return finishNode(factory.createAssertEntry(name, value), pos); } - shared parseAssertClause(optional skipAssertKeyword = {}) { + node parseAssertClause(optional skipAssertKeyword = {}) { auto pos = getNodePos(); if (!isTrue(skipAssertKeyword)) { parseExpected(SyntaxKind::AssertKeyword); @@ -5836,7 +5841,7 @@ namespace tr { } } - shared parseImportTypeAssertions() { + node parseImportTypeAssertions() { auto pos = getNodePos(); auto openBracePosition = scanner.getTokenPos(); parseExpected(SyntaxKind::OpenBraceToken); @@ -5856,19 +5861,19 @@ namespace tr { return finishNode(factory.createImportTypeAssertionContainer(clause, multiLine), pos); } - shared parseImportType() { + node parseImportType() { sourceFlags |= (int) NodeFlags::PossiblyContainsDynamicImport; auto pos = getNodePos(); auto isTypeOf = parseOptional(SyntaxKind::TypeOfKeyword); parseExpected(SyntaxKind::ImportKeyword); parseExpected(SyntaxKind::OpenParenToken); auto type = parseType(); - sharedOpt assertions; + optionalNode assertions = nullptr; if (parseOptional(SyntaxKind::CommaToken)) { assertions = parseImportTypeAssertions(); } parseExpected(SyntaxKind::CloseParenToken); - sharedOpt qualifier = parseOptional(SyntaxKind::DotToken) ? parseEntityNameOfTypeReference() : nullptr; + optionalNode qualifier = parseOptional(SyntaxKind::DotToken) ? parseEntityNameOfTypeReference() : nullptr; auto typeArguments = parseTypeArgumentsOfTypeReference(); return finishNode(factory.createImportTypeNode(type, assertions, qualifier, typeArguments, isTypeOf), pos); } @@ -5884,7 +5889,7 @@ namespace tr { return token() == SyntaxKind::OpenBracketToken && nextTokenIsIdentifier() && nextToken() == SyntaxKind::InKeyword; } - shared parseMappedTypeParameter() { + node parseMappedTypeParameter() { auto pos = getNodePos(); auto name = parseIdentifierName(); parseExpected(SyntaxKind::InKeyword); @@ -5892,10 +5897,10 @@ namespace tr { return finishNode(factory.createTypeParameterDeclaration(/*modifiers*/ {}, name, type, /*defaultType*/ {}), pos); } - shared parseMappedType() { + node parseMappedType() { auto pos = getNodePos(); parseExpected(SyntaxKind::OpenBraceToken); - sharedOpt readonlyToken; //: ReadonlyKeyword | PlusToken | MinusToken | undefined; + optionalNode readonlyToken = nullptr; //: ReadonlyKeyword | PlusToken | MinusToken | undefined; if (token() == SyntaxKind::ReadonlyKeyword || token() == SyntaxKind::PlusToken || token() == SyntaxKind::MinusToken) { readonlyToken = parseTokenNode(); if (readonlyToken->kind != SyntaxKind::ReadonlyKeyword) { @@ -5904,9 +5909,9 @@ namespace tr { } parseExpected(SyntaxKind::OpenBracketToken); auto typeParameter = parseMappedTypeParameter(); - sharedOpt nameType = parseOptional(SyntaxKind::AsKeyword) ? parseType() : nullptr; + optionalNode nameType = parseOptional(SyntaxKind::AsKeyword) ? parseType() : nullptr; parseExpected(SyntaxKind::CloseBracketToken); - sharedOpt questionToken; //: QuestionToken | PlusToken | MinusToken | undefined; + optionalNode questionToken = nullptr; //: QuestionToken | PlusToken | MinusToken | undefined; if (token() == SyntaxKind::QuestionToken || token() == SyntaxKind::PlusToken || token() == SyntaxKind::MinusToken) { questionToken = parseTokenNode(); if (questionToken->kind != SyntaxKind::QuestionToken) { @@ -5931,7 +5936,7 @@ namespace tr { return tokenIsIdentifierOrKeyword(token()) && isNextTokenColonOrQuestionColon(); } - shared parseTupleElementType() { + node parseTupleElementType() { auto pos = getNodePos(); if (parseOptional(SyntaxKind::DotDotDotToken)) { return finishNode(factory.createRestTypeNode(parseType()), pos); @@ -5946,7 +5951,7 @@ namespace tr { return type; } - shared parseTupleElementNameOrTupleElementType() { + node parseTupleElementNameOrTupleElementType() { if (lookAhead(CALLBACK(isTupleElementName))) { auto pos = getNodePos(); auto hasJSDoc = hasPrecedingJSDocComment(); @@ -5961,7 +5966,7 @@ namespace tr { return parseTupleElementType(); } - shared parseTupleType() { + node parseTupleType() { auto pos = getNodePos(); return finishNode( factory.createTupleTypeNode( @@ -5971,7 +5976,7 @@ namespace tr { ); } - shared parseParenthesizedType() { + node parseParenthesizedType() { auto pos = getNodePos(); parseExpected(SyntaxKind::OpenParenToken); auto type = parseType(); @@ -5979,15 +5984,15 @@ namespace tr { return finishNode(factory.createParenthesizedType(type), pos); } - shared parseAssertsTypePredicate() { + node parseAssertsTypePredicate() { auto pos = getNodePos(); auto assertsModifier = parseExpectedToken(SyntaxKind::AssertsKeyword); - shared parameterName = token() == SyntaxKind::ThisKeyword ? (shared) parseThisTypeNode() : (shared) parseIdentifier(); - sharedOpt type = parseOptional(SyntaxKind::IsKeyword) ? parseType() : nullptr; + node parameterName = token() == SyntaxKind::ThisKeyword ? (node) parseThisTypeNode() : (node) parseIdentifier(); + optionalNode type = parseOptional(SyntaxKind::IsKeyword) ? parseType() : nullptr; return finishNode(factory.createTypePredicateNode(assertsModifier, parameterName, type), pos); } - shared parseTemplateTypeSpan() { + node parseTemplateTypeSpan() { auto pos = getNodePos(); return finishNode( factory.createTemplateLiteralTypeSpan( @@ -5998,10 +6003,10 @@ namespace tr { ); } - shared parseTemplateTypeSpans() { + node parseTemplateTypeSpans() { auto pos = getNodePos(); - auto list = make_shared(); - shared node; + auto list = factory.pool->construct(); + node node; do { node = parseTemplateTypeSpan(); list->push(node); @@ -6009,7 +6014,7 @@ namespace tr { return createNodeArray(list, pos); } - shared parseTemplateType() { + node parseTemplateType() { auto pos = getNodePos(); return finishNode( factory.createTemplateLiteralType( @@ -6020,7 +6025,7 @@ namespace tr { ); } - shared parseNonArrayType() { + node parseNonArrayType() { switch (token()) { case SyntaxKind::AnyKeyword: case SyntaxKind::UnknownKeyword: @@ -6033,7 +6038,7 @@ namespace tr { case SyntaxKind::NeverKeyword: case SyntaxKind::ObjectKeyword: { // If these are followed by a dot, then parse these out as a dotted type reference instead. - if (auto a = tryParse>(CALLBACK(parseKeywordAndNoDot))) return a; + if (auto a = tryParse>(CALLBACK(parseKeywordAndNoDot))) return a; return parseTypeReference(); } case SyntaxKind::AsteriskEqualsToken: @@ -6098,7 +6103,7 @@ namespace tr { } } - shared parsePostfixTypeOrHigher() { + node parsePostfixTypeOrHigher() { auto pos = getNodePos(); auto type = parseNonArrayType(); while (!scanner.hasPrecedingLineBreak()) { @@ -6135,7 +6140,7 @@ namespace tr { return type; } - shared parseTypeOperatorOrHigher() { + node parseTypeOperatorOrHigher() { auto operatorToken = token(); switch (operatorToken) { case SyntaxKind::KeyOfKeyword: @@ -6145,16 +6150,16 @@ namespace tr { case SyntaxKind::InferKeyword: return parseInferType(); } - return allowConditionalTypesAnd>(CALLBACK(parsePostfixTypeOrHigher)); + return allowConditionalTypesAnd>(CALLBACK(parsePostfixTypeOrHigher)); } - sharedOpt parseFunctionOrConstructorTypeToError(bool isInUnionType) { + optionalNode parseFunctionOrConstructorTypeToError(bool isInUnionType) { // the function type and constructor type shorthand notation // are not allowed directly in unions and intersections, but we'll // try to parse them gracefully and issue a helpful message. if (isStartOfFunctionTypeOrConstructorType()) { auto type = parseFunctionOrConstructorType(); - shared diagnostic; + shared_ptr diagnostic; if (isFunctionTypeNode(type)) { diagnostic = isInUnionType ? Diagnostics::Function_type_notation_must_be_parenthesized_when_used_in_a_union_type() @@ -6170,17 +6175,17 @@ namespace tr { return nullptr; } - shared parseUnionOrIntersectionType( + node parseUnionOrIntersectionType( SyntaxKind operatorKind, - function()> parseConstituentType, - function(shared)> createTypeNode //: (types: NodeArray) => UnionOrIntersectionTypeNode + function()> parseConstituentType, + function(node)> createTypeNode //: (types: NodeArray) => UnionOrIntersectionTypeNode ) { auto pos = getNodePos(); auto isUnionType = operatorKind == SyntaxKind::BarToken; auto hasLeadingOperator = parseOptional(operatorKind); - sharedOpt type = hasLeadingOperator ? parseFunctionOrConstructorTypeToError(isUnionType) : parseConstituentType(); + optionalNode type = hasLeadingOperator ? parseFunctionOrConstructorTypeToError(isUnionType) : parseConstituentType(); if (token() == operatorKind || hasLeadingOperator) { - auto types = make_shared(type); + auto types = factory.pool->construct(type); while (parseOptional(operatorKind)) { if (auto a = parseFunctionOrConstructorTypeToError(isUnionType)) { types->push(a); @@ -6193,18 +6198,18 @@ namespace tr { return type; } - shared parseIntersectionTypeOrHigher() { + node parseIntersectionTypeOrHigher() { return parseUnionOrIntersectionType(SyntaxKind::AmpersandToken, CALLBACK(parseTypeOperatorOrHigher), CALLBACK(factory.createIntersectionTypeNode)); } - shared parseUnionTypeOrHigher() { + node parseUnionTypeOrHigher() { return parseUnionOrIntersectionType(SyntaxKind::BarToken, CALLBACK(parseIntersectionTypeOrHigher), CALLBACK(factory.createUnionTypeNode)); } - shared parseType() { + node parseType() { ZoneScoped; if (contextFlags & (int) NodeFlags::TypeExcludesFlags) { - return doOutsideOfContext>(NodeFlags::TypeExcludesFlags, CALLBACK(parseType)); + return doOutsideOfContext>(NodeFlags::TypeExcludesFlags, CALLBACK(parseType)); } if (isStartOfFunctionTypeOrConstructorType()) { @@ -6214,17 +6219,17 @@ namespace tr { auto type = parseUnionTypeOrHigher(); if (!inDisallowConditionalTypesContext() && !scanner.hasPrecedingLineBreak() && parseOptional(SyntaxKind::ExtendsKeyword)) { // The type following 'extends' is not permitted to be another conditional type - auto extendsType = disallowConditionalTypesAnd>(CALLBACK(parseType)); + auto extendsType = disallowConditionalTypesAnd>(CALLBACK(parseType)); parseExpected(SyntaxKind::QuestionToken); - auto trueType = allowConditionalTypesAnd>(CALLBACK(parseType)); + auto trueType = allowConditionalTypesAnd>(CALLBACK(parseType)); parseExpected(SyntaxKind::ColonToken); - auto falseType = allowConditionalTypesAnd>(CALLBACK(parseType)); + auto falseType = allowConditionalTypesAnd>(CALLBACK(parseType)); return finishNode(factory.createConditionalTypeNode(type, extendsType, trueType, falseType), pos); } return type; } - sharedOpt parseTypeAnnotation() { + optionalNode parseTypeAnnotation() { ZoneScoped; return parseOptional(SyntaxKind::ColonToken) ? parseType() : nullptr; } @@ -6281,7 +6286,7 @@ namespace tr { // } // } // - sharedOpt parseTypePredicatePrefix() { + optionalNode parseTypePredicatePrefix() { auto id = parseIdentifier(); if (token() == SyntaxKind::IsKeyword && !scanner.hasPrecedingLineBreak()) { nextToken(); @@ -6290,9 +6295,9 @@ namespace tr { return nullptr; } - shared parseTypeOrTypePredicate() { + node parseTypeOrTypePredicate() { auto pos = getNodePos(); - sharedOpt typePredicateVariable = isIdentifier() ? tryParse>(CALLBACK(parseTypePredicatePrefix)) : nullptr; + optionalNode typePredicateVariable = isIdentifier() ? tryParse>(CALLBACK(parseTypePredicatePrefix)) : nullptr; auto type = parseType(); if (typePredicateVariable) { return finishNode(factory.createTypePredicateNode(/*assertsModifier*/ {}, typePredicateVariable, type), pos); @@ -6301,12 +6306,12 @@ namespace tr { } } - shared makeBinaryExpression(shared left, shared operatorNode, shared right, int pos) { + node makeBinaryExpression(node left, node operatorNode, node right, int pos) { auto n = factory.createBinaryExpression(left, operatorNode, right); return finishNode(n, pos); } - shared parseExpression() { + node parseExpression() { ZoneScoped; // Expression[in]: // AssignmentExpression[in] @@ -6320,7 +6325,7 @@ namespace tr { auto pos = getNodePos(); auto expr = parseAssignmentExpressionOrHigher(); - sharedOpt operatorToken; + optionalNode operatorToken = nullptr; while ((operatorToken = parseOptionalToken(SyntaxKind::CommaToken))) { expr = makeBinaryExpression(expr, operatorToken, parseAssignmentExpressionOrHigher(), pos); } @@ -6364,7 +6369,7 @@ namespace tr { return false; } - shared parseYieldExpression() { + node parseYieldExpression() { ZoneScoped; auto pos = getNodePos(); @@ -6535,19 +6540,19 @@ namespace tr { return Tristate::False; } - sharedOpt parseModifiersForArrowFunction() { + optionalNode parseModifiersForArrowFunction() { if (token() == SyntaxKind::AsyncKeyword) { auto pos = getNodePos(); nextToken(); auto modifier = finishNode(factory.createToken(SyntaxKind::AsyncKeyword), pos); - auto list = make_shared(); + auto list = factory.pool->construct(); list->push(modifier); return factory.createNodeArray(list, pos); } return nullptr; } - shared parseArrowFunctionExpressionBody(bool isAsync) { + node parseArrowFunctionExpressionBody(bool isAsync) { if (token() == SyntaxKind::OpenBraceToken) { return parseFunctionBlock(isAsync ? (int) SignatureFlags::Await : (int) SignatureFlags::None); } @@ -6577,13 +6582,13 @@ namespace tr { auto savedTopLevel = topLevel; topLevel = false; auto node = isAsync - ? doInAwaitContext>(CALLBACK(parseAssignmentExpressionOrHigher)) - : doOutsideOfAwaitContext>(CALLBACK(parseAssignmentExpressionOrHigher)); + ? doInAwaitContext>(CALLBACK(parseAssignmentExpressionOrHigher)) + : doOutsideOfAwaitContext>(CALLBACK(parseAssignmentExpressionOrHigher)); topLevel = savedTopLevel; return node; } - sharedOpt parseParenthesizedArrowFunctionExpression(bool allowAmbiguity) { + optionalNode parseParenthesizedArrowFunctionExpression(bool allowAmbiguity) { auto pos = getNodePos(); auto hasJSDoc = hasPrecedingJSDocComment(); auto modifiers = parseModifiersForArrowFunction(); @@ -6597,7 +6602,7 @@ namespace tr { // close paren. auto typeParameters = parseTypeParameters(); - shared parameters; + node parameters; if (!parseExpected(SyntaxKind::OpenParenToken)) { if (!allowAmbiguity) { return nullptr; @@ -6657,7 +6662,7 @@ namespace tr { return withJSDoc(finishNode(node, pos), hasJSDoc); } - sharedOpt parsePossibleParenthesizedArrowFunctionExpression() { + optionalNode parsePossibleParenthesizedArrowFunctionExpression() { auto tokenPos = scanner.getTokenPos(); if (has(notParenthesizedArrow, tokenPos)) { return nullptr; @@ -6671,7 +6676,7 @@ namespace tr { return result; } - sharedOpt tryParseParenthesizedArrowFunctionExpression() { + optionalNode tryParseParenthesizedArrowFunctionExpression() { ZoneScoped; auto triState = isParenthesizedArrowFunctionExpression(); if (triState == Tristate::False) { @@ -6685,7 +6690,7 @@ namespace tr { // expression instead. return triState == Tristate::True ? parseParenthesizedArrowFunctionExpression(/*allowAmbiguity*/ true) : - tryParse>(CALLBACK(parsePossibleParenthesizedArrowFunctionExpression)); + tryParse>(CALLBACK(parsePossibleParenthesizedArrowFunctionExpression)); } Tristate isUnParenthesizedAsyncArrowFunctionWorker() { @@ -6709,7 +6714,7 @@ namespace tr { return Tristate::False; } - shared parseSimpleArrowFunctionExpression(int pos, shared identifier, sharedOpt asyncModifier) { + node parseSimpleArrowFunctionExpression(int pos, node identifier, optionalNode asyncModifier) { ZoneScoped; Debug::asserts(token() == SyntaxKind::EqualsGreaterThanToken, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); auto parameter = factory.createParameterDeclaration( @@ -6723,7 +6728,7 @@ namespace tr { ); finishNode(parameter, identifier->pos); - auto parameters = createNodeArray(make_shared(parameter), parameter->pos, parameter->end); + auto parameters = createNodeArray(factory.pool->construct(parameter), parameter->pos, parameter->end); auto equalsGreaterThanToken = parseExpectedToken(SyntaxKind::EqualsGreaterThanToken); auto body = parseArrowFunctionExpressionBody(/*isAsync*/ !!asyncModifier); @@ -6731,7 +6736,7 @@ namespace tr { return addJSDocComment(finishNode(node, pos)); } - sharedOpt tryParseAsyncSimpleArrowFunctionExpression() { + optionalNode tryParseAsyncSimpleArrowFunctionExpression() { ZoneScoped; // We do a check here so that we won't be doing unnecessarily call to "lookAhead" if (token() == SyntaxKind::AsyncKeyword) { @@ -6745,7 +6750,7 @@ namespace tr { return nullptr; } - shared parseConditionalExpressionRest(shared leftOperand, int pos) { + node parseConditionalExpressionRest(node leftOperand, int pos) { ZoneScoped; // Note: we are passed in an expression which was produced from parseBinaryExpressionOrHigher. auto questionToken = parseOptionalToken(SyntaxKind::QuestionToken); @@ -6755,12 +6760,12 @@ namespace tr { // Note: we explicitly 'allowIn' in the whenTrue part of the condition expression, and // we do not that for the 'whenFalse' part. - sharedOpt colonToken; + optionalNode colonToken = nullptr; return finishNode( factory.createConditionalExpression( leftOperand, questionToken, - doOutsideOfContext>(disallowInAndDecoratorContext, CALLBACK(parseAssignmentExpressionOrHigher)), + doOutsideOfContext>(disallowInAndDecoratorContext, CALLBACK(parseAssignmentExpressionOrHigher)), colonToken = parseExpectedToken(SyntaxKind::ColonToken), nodeIsPresent(colonToken) ? parseAssignmentExpressionOrHigher() @@ -6770,7 +6775,7 @@ namespace tr { ); } - shared parseAssignmentExpressionOrHigher() { + node parseAssignmentExpressionOrHigher() { ZoneScoped; // AssignmentExpression[in,yield]: // 1) ConditionalExpression[?in,?yield] @@ -6835,20 +6840,20 @@ namespace tr { return parseConditionalExpressionRest(expr, pos); } - shared parseEmptyStatement() { + node parseEmptyStatement() { auto pos = getNodePos(); auto hasJSDoc = hasPrecedingJSDocComment(); parseExpected(SyntaxKind::SemicolonToken); return withJSDoc(finishNode(factory.createEmptyStatement(), pos), hasJSDoc); } - shared parseIfStatement() { + node parseIfStatement() { auto pos = getNodePos(); auto hasJSDoc = hasPrecedingJSDocComment(); parseExpected(SyntaxKind::IfKeyword); auto openParenPosition = scanner.getTokenPos(); auto openParenParsed = parseExpected(SyntaxKind::OpenParenToken); - auto expression = allowInAnd>(CALLBACK(parseExpression)); + auto expression = allowInAnd>(CALLBACK(parseExpression)); parseExpectedMatchingBrackets(SyntaxKind::OpenParenToken, SyntaxKind::CloseParenToken, openParenParsed, openParenPosition); auto thenStatement = parseStatement(); auto elseStatement = parseOptional(SyntaxKind::ElseKeyword) ? parseStatement() : nullptr; @@ -6863,7 +6868,7 @@ namespace tr { // parseExpected(SyntaxKind::WhileKeyword); // auto openParenPosition = scanner.getTokenPos(); // auto openParenParsed = parseExpected(SyntaxKind::OpenParenToken); -// auto expression = allowInAnd>(parseExpression); +// auto expression = allowInAnd>(parseExpression); // parseExpectedMatchingBrackets(SyntaxKind::OpenParenToken, SyntaxKind::CloseParenToken, openParenParsed, openParenPosition); // // // From: https://mail.mozilla.org/pipermail/es-discuss/2011-August/016188.html @@ -6880,7 +6885,7 @@ namespace tr { // parseExpected(SyntaxKind::WhileKeyword); // auto openParenPosition = scanner.getTokenPos(); // auto openParenParsed = parseExpected(SyntaxKind::OpenParenToken); -// auto expression = allowInAnd>(parseExpression); +// auto expression = allowInAnd>(parseExpression); // parseExpectedMatchingBrackets(SyntaxKind::OpenParenToken, SyntaxKind::CloseParenToken, openParenParsed, openParenPosition); // auto statement = parseStatement(); // return withJSDoc(finishNode(factory.createWhileStatement(expression, statement), pos), hasJSDoc); @@ -6899,7 +6904,7 @@ namespace tr { // initializer = parseVariableDeclarationList(/*inForStatementInitializer*/ true); // } // else { -// initializer = disallowInAnd>(parseExpression); +// initializer = disallowInAnd>(parseExpression); // } // } // @@ -6910,18 +6915,18 @@ namespace tr { // node = factory.createForOfStatement(awaitToken, initializer, expression, parseStatement()); // } // else if (parseOptional(SyntaxKind::InKeyword)) { -// auto expression = allowInAnd>(parseExpression); +// auto expression = allowInAnd>(parseExpression); // parseExpected(SyntaxKind::CloseParenToken); // node = factory.createForInStatement(initializer, expression, parseStatement()); // } // else { // parseExpected(SyntaxKind::SemicolonToken); // auto condition = token() != SyntaxKind::SemicolonToken && token() != SyntaxKind::CloseParenToken -// ? allowInAnd>(parseExpression) +// ? allowInAnd>(parseExpression) // : undefined; // parseExpected(SyntaxKind::SemicolonToken); // auto incrementor = token() != SyntaxKind::CloseParenToken -// ? allowInAnd>(parseExpression) +// ? allowInAnd>(parseExpression) // : undefined; // parseExpected(SyntaxKind::CloseParenToken); // node = factory.createForStatement(initializer, condition, incrementor, parseStatement()); @@ -6944,11 +6949,11 @@ namespace tr { // return withJSDoc(finishNode(node, pos), hasJSDoc); // } - shared parseReturnStatement() { + node parseReturnStatement() { auto pos = getNodePos(); auto hasJSDoc = hasPrecedingJSDocComment(); parseExpected(SyntaxKind::ReturnKeyword); - shared expression = canParseSemicolon() ? nullptr : allowInAnd>(CALLBACK(parseExpression)); + node expression = canParseSemicolon() ? nullptr : allowInAnd>(CALLBACK(parseExpression)); parseSemicolon(); return withJSDoc(finishNode(factory.createReturnStatement(expression), pos), hasJSDoc); } @@ -6959,7 +6964,7 @@ namespace tr { // parseExpected(SyntaxKind::WithKeyword); // auto openParenPosition = scanner.getTokenPos(); // auto openParenParsed = parseExpected(SyntaxKind::OpenParenToken); -// auto expression = allowInAnd>(parseExpression); +// auto expression = allowInAnd>(parseExpression); // parseExpectedMatchingBrackets(SyntaxKind::OpenParenToken, SyntaxKind::CloseParenToken, openParenParsed, openParenPosition); // auto statement = doInsideOfContext(NodeFlags::InWithStatement, parseStatement); // return withJSDoc(finishNode(factory.createWithStatement(expression, statement), pos), hasJSDoc); @@ -6969,7 +6974,7 @@ namespace tr { // auto pos = getNodePos(); // auto hasJSDoc = hasPrecedingJSDocComment(); // parseExpected(SyntaxKind::CaseKeyword); -// auto expression = allowInAnd>(parseExpression); +// auto expression = allowInAnd>(parseExpression); // parseExpected(SyntaxKind::ColonToken); // auto statements = parseList(ParsingContext::SwitchClauseStatements, parseStatement); // return withJSDoc(finishNode(factory.createCaseClause(expression, statements), pos), hasJSDoc); @@ -7000,7 +7005,7 @@ namespace tr { // auto hasJSDoc = hasPrecedingJSDocComment(); // parseExpected(SyntaxKind::SwitchKeyword); // parseExpected(SyntaxKind::OpenParenToken); -// auto expression = allowInAnd>(parseExpression); +// auto expression = allowInAnd>(parseExpression); // parseExpected(SyntaxKind::CloseParenToken); // auto caseBlock = parseCaseBlock(); // return withJSDoc(finishNode(factory.createSwitchStatement(expression, caseBlock), pos), hasJSDoc); @@ -7019,7 +7024,7 @@ namespace tr { // // directly as that might consume an expression on the following line. // // Instead, we create a "missing" identifier, but don't report an error. The actual error // // will be reported in the grammar walker. -// auto expression = scanner.hasPrecedingLineBreak() ? undefined : allowInAnd>(parseExpression); +// auto expression = scanner.hasPrecedingLineBreak() ? undefined : allowInAnd>(parseExpression); // if (expression == undefined) { // identifierCount++; // expression = finishNode(factory.createIdentifier(""), getNodePos()); @@ -7076,15 +7081,15 @@ namespace tr { // return withJSDoc(finishNode(factory.createDebuggerStatement(), pos), hasJSDoc); // } - shared parseExpressionOrLabeledStatement() { + node parseExpressionOrLabeledStatement() { // Avoiding having to do the lookahead for a labeled statement by just trying to parse // out an expression, seeing if it is identifier and then seeing if it is followed by // a colon. auto pos = getNodePos(); auto hasJSDoc = hasPrecedingJSDocComment(); - shared node; + node node; auto hasParen = token() == SyntaxKind::OpenParenToken; - auto expression = allowInAnd>(CALLBACK(parseExpression)); + auto expression = allowInAnd>(CALLBACK(parseExpression)); if (tr::isIdentifier(expression) && parseOptional(SyntaxKind::ColonToken)) { node = factory.createLabeledStatement(expression, parseStatement()); } else { @@ -7104,18 +7109,18 @@ namespace tr { return nextTokenIsIdentifier() && nextToken() == SyntaxKind::CloseParenToken; } - shared parseVariableDeclaration(optional allowExclamation = {}) { + node parseVariableDeclaration(optional allowExclamation = {}) { ZoneScoped; const auto pos = getNodePos(); const auto hasJSDoc = hasPrecedingJSDocComment(); const auto name = parseIdentifierOrPattern(Diagnostics::Private_identifiers_are_not_allowed_in_variable_declarations()); - sharedOpt exclamationToken; + optionalNode exclamationToken = nullptr; if (isTrue(allowExclamation) && name->kind == SyntaxKind::Identifier && token() == SyntaxKind::ExclamationToken && !scanner.hasPrecedingLineBreak()) { exclamationToken = parseTokenNode(); } const auto type = parseTypeAnnotation(); - sharedOpt initializer = isInOrOfKeyword(token()) ? nullptr : parseInitializer(); + optionalNode initializer = isInOrOfKeyword(token()) ? nullptr : parseInitializer(); const auto node = factory.createVariableDeclaration(name, exclamationToken, type, initializer); return withJSDoc(finishNode(node, pos), hasJSDoc); } @@ -7124,7 +7129,7 @@ namespace tr { return parseVariableDeclaration(/*allowExclamation*/ true); } - shared parseVariableDeclarationList(bool inForStatementInitializer) { + node parseVariableDeclarationList(bool inForStatementInitializer) { ZoneScoped; auto pos = getNodePos(); @@ -7153,7 +7158,7 @@ namespace tr { // So we need to look ahead to determine if 'of' should be treated as a keyword in // this context. // The checker will then give an error that there is an empty declaration list. - shared declarations; + node declarations; if (token() == SyntaxKind::OfKeyword && lookAhead(CALLBACK(canFollowContextualOfKeyword))) { declarations = createMissingList(); } else { @@ -7172,7 +7177,7 @@ namespace tr { return finishNode(factory.createVariableDeclarationList(declarations, flags), pos); } - shared parseVariableStatement(int pos, bool hasJSDoc, const sharedOpt &decorators, const sharedOpt &modifiers) { + node parseVariableStatement(int pos, bool hasJSDoc, const optionalNode &decorators, const optionalNode &modifiers) { ZoneScoped; auto declarationList = parseVariableDeclarationList(/*inForStatementInitializer*/ false); parseSemicolon(); @@ -7193,7 +7198,7 @@ namespace tr { return lookAhead(CALLBACK(nextTokenIsBindingIdentifierOrStartOfDestructuring)); } - shared parseFunctionDeclaration(int pos, bool hasJSDoc, sharedOpt decorators, sharedOpt modifiers) { + node parseFunctionDeclaration(int pos, bool hasJSDoc, optionalNode decorators, optionalNode modifiers) { auto savedAwaitContext = inAwaitContext(); auto modifierFlags = modifiersToFlags(modifiers); @@ -7213,7 +7218,7 @@ namespace tr { return withJSDoc(finishNode(node, pos), hasJSDoc); } - shared parseDeclaration() { + node parseDeclaration() { ZoneScoped; // TODO: Can we hold onto the parsed decorators/modifiers and advance the scanner // if we can't reuse the declaration, so that we don't do this work twice? @@ -7221,7 +7226,7 @@ namespace tr { // `parseListElement` attempted to get the reused node at this position, // but the ambient context flag was not yet set, so the node appeared // not reusable in that context. - auto a = lookAhead>([this]() { + auto a = lookAhead>([this]() { parseDecorators(); return parseModifiers(); }); @@ -7238,18 +7243,18 @@ namespace tr { auto decorators = parseDecorators(); auto modifiers = parseModifiers(); if (isAmbient) { - for (auto &&m: modifiers->list) { + for (auto m: *modifiers) { m->flags |= (int) NodeFlags::Ambient; } - return doInsideOfContext>((int) NodeFlags::Ambient, [this, &pos, &hasJSDoc, &decorators, &modifiers]() { return parseDeclarationWorker(pos, hasJSDoc, decorators, modifiers); }); + return doInsideOfContext>((int) NodeFlags::Ambient, [this, &pos, &hasJSDoc, &decorators, &modifiers]() { return parseDeclarationWorker(pos, hasJSDoc, decorators, modifiers); }); } else { return parseDeclarationWorker(pos, hasJSDoc, decorators, modifiers); } } - sharedOpt tryReuseAmbientDeclaration() { + optionalNode tryReuseAmbientDeclaration() { ZoneScoped; - return doInsideOfContext>((int) NodeFlags::Ambient, [this]()->sharedOpt { + return doInsideOfContext>((int) NodeFlags::Ambient, [this]()->optionalNode { auto node = currentNode((ParsingContext) parsingContext); if (node) { return to(consumeNode(node)); @@ -7258,7 +7263,7 @@ namespace tr { }); } - shared parseDeclarationWorker(int pos, bool hasJSDoc, sharedOpt decorators, sharedOpt modifiers) { + node parseDeclarationWorker(int pos, bool hasJSDoc, optionalNode decorators, optionalNode modifiers) { ZoneScoped; switch (token()) { case SyntaxKind::VarKeyword: @@ -7307,7 +7312,7 @@ namespace tr { throw runtime_error("not implemented"); } - shared parseStatement() { + node parseStatement() { ZoneScoped; switch (token()) { case SyntaxKind::SemicolonToken: @@ -7380,7 +7385,7 @@ namespace tr { return to(parseExpressionOrLabeledStatement()); } - shared parseSourceFileWorker(ScriptTarget languageVersion, bool setParentNodes, ScriptKind scriptKind, function)> setExternalModuleIndicator) { + shared_ptr parseSourceFileWorker(ScriptTarget languageVersion, bool setParentNodes, ScriptKind scriptKind, function)> setExternalModuleIndicator) { ZoneScoped; auto isDeclarationFile = isDeclarationFileName(fileName); if (isDeclarationFile) { @@ -7426,11 +7431,11 @@ namespace tr { } // DECLARATIONS - shared parseClassDeclaration(int pos, bool hasJSDoc, sharedOpt decorators, sharedOpt modifiers) { + node parseClassDeclaration(int pos, bool hasJSDoc, optionalNode decorators, optionalNode modifiers) { return to(parseClassDeclarationOrExpression(pos, hasJSDoc, decorators, modifiers, SyntaxKind::ClassDeclaration)); } -// function parseInterfaceDeclaration(int pos, bool hasJSDoc, sharedOpt decorators, sharedOpt modifiers): InterfaceDeclaration { +// function parseInterfaceDeclaration(int pos, bool hasJSDoc, optionalNode decorators, optionalNode modifiers): InterfaceDeclaration { // parseExpected(SyntaxKind::InterfaceKeyword); // auto name = parseIdentifier(); // auto typeParameters = parseTypeParameters(); @@ -7440,12 +7445,12 @@ namespace tr { // return withJSDoc(finishNode(node, pos), hasJSDoc); // } - shared parseTypeAliasDeclaration(int pos, bool hasJSDoc, const sharedOpt &decorators, const sharedOpt &modifiers) { + node parseTypeAliasDeclaration(int pos, bool hasJSDoc, const optionalNode &decorators, const optionalNode &modifiers) { parseExpected(SyntaxKind::TypeKeyword); auto name = parseIdentifier(); auto typeParameters = parseTypeParameters(); parseExpected(SyntaxKind::EqualsToken); - shared type = token() == SyntaxKind::IntrinsicKeyword ? tryParse>(CALLBACK(parseKeywordAndNoDot)) : parseType(); + node type = token() == SyntaxKind::IntrinsicKeyword ? tryParse>(CALLBACK(parseKeywordAndNoDot)) : parseType(); parseSemicolon(); auto node = factory.createTypeAliasDeclaration(decorators, modifiers, name, typeParameters, type); return withJSDoc(finishNode(node, pos), hasJSDoc); @@ -7463,7 +7468,7 @@ namespace tr { // return withJSDoc(finishNode(factory.createEnumMember(name, initializer), pos), hasJSDoc); // } // -// function parseEnumDeclaration(int pos, bool hasJSDoc, sharedOpt decorators, sharedOpt modifiers): EnumDeclaration { +// function parseEnumDeclaration(int pos, bool hasJSDoc, optionalNode decorators, optionalNode modifiers): EnumDeclaration { // parseExpected(SyntaxKind::EnumKeyword); // auto name = parseIdentifier(); // auto members; @@ -7491,7 +7496,7 @@ namespace tr { // return finishNode(factory.createModuleBlock(statements), pos); // } // -// function parseModuleOrNamespaceDeclaration(int pos, bool hasJSDoc, sharedOpt decorators, sharedOpt modifiers, flags: NodeFlags): ModuleDeclaration { +// function parseModuleOrNamespaceDeclaration(int pos, bool hasJSDoc, optionalNode decorators, optionalNode modifiers, flags: NodeFlags): ModuleDeclaration { // // If we are parsing a dotted namespace name, we want to // // propagate the 'Namespace' flag across the names if set. // auto namespaceFlag = flags & NodeFlags::Namespace; @@ -7503,7 +7508,7 @@ namespace tr { // return withJSDoc(finishNode(node, pos), hasJSDoc); // } // -// function parseAmbientExternalModuleDeclaration(int pos, bool hasJSDoc, sharedOpt decorators, sharedOpt modifiers): ModuleDeclaration { +// function parseAmbientExternalModuleDeclaration(int pos, bool hasJSDoc, optionalNode decorators, optionalNode modifiers): ModuleDeclaration { // auto flags: NodeFlags = 0; // auto name; // if (token() == SyntaxKind::GlobalKeyword) { @@ -7526,7 +7531,7 @@ namespace tr { // return withJSDoc(finishNode(node, pos), hasJSDoc); // } // -// function parseModuleDeclaration(int pos, bool hasJSDoc, sharedOpt decorators, sharedOpt modifiers): ModuleDeclaration { +// function parseModuleDeclaration(int pos, bool hasJSDoc, optionalNode decorators, optionalNode modifiers): ModuleDeclaration { // auto flags: NodeFlags = 0; // if (token() == SyntaxKind::GlobalKeyword) { // // global augmentation @@ -7544,7 +7549,7 @@ namespace tr { // return parseModuleOrNamespaceDeclaration(pos, hasJSDoc, decorators, modifiers, flags); // } // -// function parseNamespaceExportDeclaration(int pos, bool hasJSDoc, sharedOpt decorators, sharedOpt modifiers): NamespaceExportDeclaration { +// function parseNamespaceExportDeclaration(int pos, bool hasJSDoc, optionalNode decorators, optionalNode modifiers): NamespaceExportDeclaration { // parseExpected(SyntaxKind::AsKeyword); // parseExpected(SyntaxKind::NamespaceKeyword); // auto name = parseIdentifier(); @@ -7556,7 +7561,7 @@ namespace tr { // return withJSDoc(finishNode(node, pos), hasJSDoc); // } // -// function parseImportDeclarationOrImportEqualsDeclaration(int pos, bool hasJSDoc, sharedOpt decorators, sharedOpt modifiers): ImportEqualsDeclaration | ImportDeclaration { +// function parseImportDeclarationOrImportEqualsDeclaration(int pos, bool hasJSDoc, optionalNode decorators, optionalNode modifiers): ImportEqualsDeclaration | ImportDeclaration { // parseExpected(SyntaxKind::ImportKeyword); // // auto afterImportPos = scanner.getStartPos(); @@ -7613,7 +7618,7 @@ namespace tr { // return token() == SyntaxKind::CommaToken || token() == SyntaxKind::FromKeyword; // } // -// function parseImportEqualsDeclaration(int pos, bool hasJSDoc, sharedOpt decorators, sharedOpt modifiers, identifier: Identifier, isTypeOnly: boolean): ImportEqualsDeclaration { +// function parseImportEqualsDeclaration(int pos, bool hasJSDoc, optionalNode decorators, optionalNode modifiers, identifier: Identifier, isTypeOnly: boolean): ImportEqualsDeclaration { // parseExpected(SyntaxKind::EqualsToken); // auto moduleReference = parseModuleReference(); // parseSemicolon(); @@ -7795,7 +7800,7 @@ namespace tr { // return finishNode(factory.createNamespaceExport(parseIdentifierName()), pos); // } // -// function parseExportDeclaration(int pos, bool hasJSDoc, sharedOpt decorators, sharedOpt modifiers): ExportDeclaration { +// function parseExportDeclaration(int pos, bool hasJSDoc, optionalNode decorators, optionalNode modifiers): ExportDeclaration { // auto savedAwaitContext = inAwaitContext(); // setAwaitContext(/*value*/ true); // auto exportClause: NamedExportBindings | undefined; @@ -7829,7 +7834,7 @@ namespace tr { // return withJSDoc(finishNode(node, pos), hasJSDoc); // } // -// function parseExportAssignment(int pos, bool hasJSDoc, sharedOpt decorators, sharedOpt modifiers): ExportAssignment { +// function parseExportAssignment(int pos, bool hasJSDoc, optionalNode decorators, optionalNode modifiers): ExportAssignment { // auto savedAwaitContext = inAwaitContext(); // setAwaitContext(/*value*/ true); // auto isExportEquals: boolean | undefined; @@ -8882,7 +8887,7 @@ namespace tr { // } // } - shared parseSourceFile(const string &fileName, const string &sourceText, ScriptTarget languageVersion, bool setParentNodes, optional _scriptKind, optional)>> setExternalModuleIndicatorOverride) { + shared_ptr parseSourceFile(const string &fileName, const string &sourceText, ScriptTarget languageVersion, bool setParentNodes, optional _scriptKind, optional)>> setExternalModuleIndicatorOverride) { ZoneScoped; auto scriptKind = ensureScriptKind(fileName, _scriptKind); @@ -8899,8 +8904,11 @@ namespace tr { // } initializeState(fileName, sourceText, languageVersion, scriptKind); + //each new SourceFile gets its own memory pool for its nodes + factory.pool = new PoolBand(); auto result = parseSourceFileWorker(languageVersion, setParentNodes, scriptKind, setExternalModuleIndicatorOverride ? *setExternalModuleIndicatorOverride : setExternalModuleIndicator); + result->pool = factory.pool; clearState(); @@ -9870,7 +9878,7 @@ namespace tr { // return argMap; // } - inline shared createSourceFile( + inline shared_ptr createSourceFile( string fileName, string sourceText, variant languageVersionOrOptions, @@ -9879,8 +9887,8 @@ namespace tr { ) { // tracing?.push(tracing.Phase.Parse, "createSourceFile", { path: fileName }, /*separateBeginAndEnd*/ true); // performance.mark("beforeParse"); - shared result; - optional)>> overrideSetExternalModuleIndicator; + shared_ptr result; + optional)>> overrideSetExternalModuleIndicator; optional format; Parser parser; @@ -9899,7 +9907,7 @@ namespace tr { if (languageVersion == ScriptTarget::JSON) { result = parser.parseSourceFile(fileName, sourceText, languageVersion, setParentNodes, ScriptKind::JSON, {}); } else { - optional)>> setIndicator = !format.has_value() ? overrideSetExternalModuleIndicator : [format, overrideSetExternalModuleIndicator](shared file) { + optional)>> setIndicator = !format.has_value() ? overrideSetExternalModuleIndicator : [format, overrideSetExternalModuleIndicator](shared_ptr file) { file->impliedNodeFormat = format; if (overrideSetExternalModuleIndicator) { (*overrideSetExternalModuleIndicator)(file); diff --git a/src/path.cpp b/src/path.cpp index ddee996..a0a0e59 100644 --- a/src/path.cpp +++ b/src/path.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "path.h" namespace tr { @@ -78,7 +76,7 @@ namespace tr { // URL auto schemeEnd = path.find(urlSchemeSeparator); if (schemeEnd != string::npos) { - auto authorityStart = schemeEnd + urlSchemeSeparatorSize; + auto authorityStart = schemeEnd + 3; auto authorityEnd = path.find(directorySeparator, authorityStart); if (authorityEnd != string::npos) { // URL: "file:///", "file://server/", "file://server/path" // For local "file" URLs, include the leading DOS volume (if present). diff --git a/src/path.h b/src/path.h index 2965540..93e9469 100644 --- a/src/path.h +++ b/src/path.h @@ -14,7 +14,6 @@ namespace tr { constexpr static auto directorySeparator = "/"; constexpr static auto altDirectorySeparator = "\\"; constexpr static auto urlSchemeSeparator = "://"; - constexpr static auto urlSchemeSeparatorSize = sizeof(urlSchemeSeparator) / sizeof(char); static const regex relativePathSegmentRegExp("/(?:\\/\\/)|(?:^|\\/)\\.\\.?(?:$|\\/)/"); diff --git a/src/pool_band.h b/src/pool_band.h new file mode 100644 index 0000000..0e11e3c --- /dev/null +++ b/src/pool_band.h @@ -0,0 +1,97 @@ +#pragma once + +#include +#include +#include +#include +#include +#include + +class PoolBand { +public: + union Slot { + struct Pointer { + Slot *prev; + Slot *next; + } pointer; + }; + + typedef Slot *slot_pointer; + + size_t blockSize; + + explicit PoolBand(size_t blockSize = 1024 * 100): blockSize(blockSize) {} + + ~PoolBand() noexcept { + slot_pointer curr = currentBlock; + while (curr != nullptr) { + slot_pointer prev = curr->pointer.prev; + operator delete(reinterpret_cast(curr)); + curr = prev; + } + } + + unsigned int active = 0; + unsigned int blocks = 0; + + template + T *allocate() { + active++; + auto size = sizeof(T); + //std::cout<<"allocate "<end) { + allocateBlock(); + } + auto res = reinterpret_cast(currentSlot); + currentSlot += size; + return res; + } + + template + T *construct(Args &&... args) { + auto result = allocate(); + new(result) T(std::forward(args)...); + return result; + } + + template + void destruct(T *p) { + p->~T(); + //deallocate(p); + } + + void clear() { + active = 0; + if (firstBlock) initializeBlock(firstBlock); + } +private: + slot_pointer currentBlock = nullptr; + slot_pointer firstBlock = nullptr; + + char *currentSlot = nullptr; + char *end = nullptr; + + void allocateBlock() { + if (currentBlock && reinterpret_cast(currentBlock)->pointer.next) { + initializeBlock(reinterpret_cast(currentBlock)->pointer.next); + } else { + blocks++; + // Allocate space for the new block and store a pointer to the previous one + auto newBlock = reinterpret_cast(operator new(sizeof(Slot) + blockSize)); + reinterpret_cast(newBlock)->pointer = {.prev = currentBlock, .next = nullptr}; + setNextBlock(reinterpret_cast(newBlock)); + } + } + + void setNextBlock(slot_pointer nextBlock) { + if (currentBlock) currentBlock->pointer.next = nextBlock; + if (!firstBlock) firstBlock = nextBlock; + initializeBlock(nextBlock); + } + + void initializeBlock(slot_pointer nextBlock) { + currentBlock = nextBlock; + currentSlot = reinterpret_cast(nextBlock) + sizeof(Slot); + end = currentSlot + blockSize; + } +}; \ No newline at end of file diff --git a/src/scanner.cpp b/src/scanner.cpp index d62de1c..9332f25 100644 --- a/src/scanner.cpp +++ b/src/scanner.cpp @@ -424,7 +424,7 @@ namespace tr { return false; } - int Scanner::error(const shared &message, int errPos, int length) { + int Scanner::error(const shared_ptr &message, int errPos, int length) { if (errPos == -1) errPos = pos; cout << "Error: " << message->code << ": " << message->message << " at " << errPos << "\n"; @@ -752,6 +752,7 @@ namespace tr { if (match[1] == "ts-expect-error") return CommentDirectiveType::ExpectError; if (match[1] == "ts-ignore") return CommentDirectiveType::Ignore; } + return nullopt; } SyntaxKind Scanner::scanJsxAttributeValue() { diff --git a/src/scanner.h b/src/scanner.h index 55e0bff..9dc3234 100644 --- a/src/scanner.h +++ b/src/scanner.h @@ -19,7 +19,7 @@ namespace tr { }; using ErrorCallback = function< - void(const shared + void(const shared_ptr &message, int length )>; @@ -668,7 +668,7 @@ namespace tr { bool isOctalDigit(const CharCode &code); - int error(const shared &message, int errPos = -1, int length = -1); + int error(const shared_ptr &message, int errPos = -1, int length = -1); vector appendIfCommentDirective(vector &commentDirectives, const string &text, const regex &commentDirectiveRegEx, int lineStart); diff --git a/src/tests/CmakeLists.txt b/src/tests/CMakeLists.txt similarity index 98% rename from src/tests/CmakeLists.txt rename to src/tests/CMakeLists.txt index 6648ab1..9136ca8 100644 --- a/src/tests/CmakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 3.10) project(Tests) diff --git a/src/tests/test_bench.cpp b/src/tests/test_bench.cpp index cbdb722..7662bfb 100644 --- a/src/tests/test_bench.cpp +++ b/src/tests/test_bench.cpp @@ -154,7 +154,7 @@ TEST(bench, types) { }); bench("simple type array", 1000, [&] { - auto simpleTypes = vector>(); + auto simpleTypes = vector>(); simpleTypes.reserve(1000); for (auto i = 0; i < 1000; i++) { simpleTypes.emplace_back(); @@ -188,7 +188,7 @@ TEST(bench, types) { }); bench("string type array", 1000, [&] { - auto simpleTypes = vector>(); + auto simpleTypes = vector>(); simpleTypes.reserve(1000); for (auto i = 0; i < 1000; i++) { simpleTypes.emplace_back(); @@ -203,7 +203,7 @@ TEST(bench, types) { }); bench("string literal type array", 1000, [&] { - auto simpleTypes = vector>(); + auto simpleTypes = vector>(); simpleTypes.reserve(1000); for (auto i = 0; i < 1000; i++) { simpleTypes.emplace_back(); diff --git a/src/tests/test_core.cpp b/src/tests/test_core.cpp index 4b67bc7..20f5794 100644 --- a/src/tests/test_core.cpp +++ b/src/tests/test_core.cpp @@ -61,13 +61,13 @@ struct OptionalRef: public optional { //}; TEST(core, optionalNode) { - sharedOpt i; + optionalNode i; EXPECT_EQ(!!i, false); i = make_shared(); EXPECT_EQ(!!i, true); - auto fn = [](sharedOpt node) { + auto fn = [](optionalNode node) { node->to().escapedText = "changed"; }; @@ -121,7 +121,7 @@ TEST(core, switchString) { EXPECT_EQ(i, 2); } -shared visitNode(const function(shared)> &cbNode, sharedOpt node) { +node visitNode(const function(node)> &cbNode, optionalNode node) { if (! node) return nullptr; return cbNode(node); } @@ -147,7 +147,7 @@ TEST(core, nodeVisitAlternative) { // return nullopt; //}; -void acceptShared(shared node) { +void acceptShared(node node) { if (node->is()) { node->to().escapedText = "changed"; } @@ -168,10 +168,10 @@ TEST(core, passNodeToShared) { } TEST(core, logicalOrOverload) { - sharedOpt empty; - sharedOpt a = make_shared(); - sharedOpt b = make_shared(); - sharedOpt c = make_shared(); + optionalNode empty; + optionalNode a = make_shared(); + optionalNode b = make_shared(); + optionalNode c = make_shared(); EXPECT_EQ(a.get(), a.get()); EXPECT_EQ(a.get(), (a || b).get()); @@ -201,20 +201,20 @@ TEST(core, logicalOrOverload) { //NodeUnion has no type related semantics, just meta-data -SyntaxKind takeUnion(shared node) { +SyntaxKind takeUnion(node node) { return node->kind; } -SyntaxKind takeNode(shared node) { +SyntaxKind takeNode(node node) { return node->kind; } -SyntaxKind takeOptionalNode(sharedOpt node) { +SyntaxKind takeOptionalNode(optionalNode node) { if (node) return node->kind; return SyntaxKind::Unknown; } -SyntaxKind takeOptionalNodeUnion(sharedOpt node) { +SyntaxKind takeOptionalNodeUnion(optionalNode node) { if (node) return node->kind; return SyntaxKind::Unknown; } @@ -246,25 +246,25 @@ TEST(core, ParameterDeclaration) { } TEST(core, nodeUnion) { - shared i1 = make_shared(); + node i1 = make_shared(); EXPECT_EQ(takeUnion(i1), SyntaxKind::Identifier); EXPECT_EQ(takeNode(i1), SyntaxKind::Identifier); EXPECT_EQ(takeOptionalNode(i1), SyntaxKind::Identifier); EXPECT_EQ(takeOptionalNodeUnion(i1), SyntaxKind::Identifier); - shared i2(new SourceFile); + node i2(new SourceFile); EXPECT_EQ(takeUnion(i2), SyntaxKind::SourceFile); EXPECT_EQ(takeNode(i2), SyntaxKind::SourceFile); EXPECT_EQ(takeOptionalNode(i2), SyntaxKind::SourceFile); EXPECT_EQ(takeOptionalNodeUnion(i2), SyntaxKind::SourceFile); - sharedOpt o1(new Identifier); + optionalNode o1(new Identifier); EXPECT_EQ(takeUnion(o1), SyntaxKind::Identifier); EXPECT_EQ(takeNode(o1), SyntaxKind::Identifier); EXPECT_EQ(takeOptionalNode(o1), SyntaxKind::Identifier); EXPECT_EQ(takeOptionalNodeUnion(o1), SyntaxKind::Identifier); - sharedOpt o2; + optionalNode o2; EXPECT_EQ(takeOptionalNode(o2), SyntaxKind::Unknown); EXPECT_EQ(takeOptionalNodeUnion(o2), SyntaxKind::Unknown); } diff --git a/src/tests/test_pool_array.cpp b/src/tests/test_pool_array.cpp index 91e99bc..776669b 100644 --- a/src/tests/test_pool_array.cpp +++ b/src/tests/test_pool_array.cpp @@ -1,5 +1,4 @@ #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN - #include #include @@ -19,31 +18,31 @@ TEST_CASE("basic") { TEST_CASE("block creation") { PoolArray pool; - REQUIRE(pool.pool(1).blocks == 0); + REQUIRE(pool.getPool(1).blocks == 0); REQUIRE(pool.active == 0); auto p1 = pool.allocate(1); REQUIRE(pool.active == 1); - REQUIRE(pool.pool(1).blocks == 1); + REQUIRE(pool.getPool(1).blocks == 1); auto p2 = pool.allocate(1); - REQUIRE(pool.pool(1).blocks == 1); + REQUIRE(pool.getPool(1).blocks == 1); REQUIRE(pool.active == 2); pool.deallocate(p1); - REQUIRE(pool.pool(1).blocks == 1); + REQUIRE(pool.getPool(1).blocks == 1); REQUIRE(pool.active == 1); pool.deallocate(p2); - REQUIRE(pool.pool(1).blocks == 1); + REQUIRE(pool.getPool(1).blocks == 1); REQUIRE(pool.active == 0); auto p3 = pool.allocate(1); REQUIRE(pool.active == 1); - REQUIRE(pool.pool(1).blocks == 1); + REQUIRE(pool.getPool(1).blocks == 1); auto p4 = pool.allocate(1); - REQUIRE(pool.pool(1).blocks == 1); + REQUIRE(pool.getPool(1).blocks == 1); REQUIRE(pool.active == 2); } @@ -51,46 +50,46 @@ TEST_CASE("multi pool") { PoolArray pool; auto p1 = pool.construct(2); REQUIRE(pool.active == 2); - REQUIRE(pool.pool(2).blocks == 1); + REQUIRE(pool.getPool(2).blocks == 1); auto p2 = pool.construct(3); REQUIRE(pool.active == 5); - REQUIRE(pool.pool(2).blocks == 1); - REQUIRE(pool.pool(4).blocks == 1); + REQUIRE(pool.getPool(2).blocks == 1); + REQUIRE(pool.getPool(4).blocks == 1); pool.destruct(p2); REQUIRE(pool.active == 2); - REQUIRE(pool.pool(2).blocks == 1); - REQUIRE(pool.pool(4).blocks == 1); + REQUIRE(pool.getPool(2).blocks == 1); + REQUIRE(pool.getPool(4).blocks == 1); } TEST_CASE("mixed") { PoolArray pool; - REQUIRE(pool.pool(1).blocks == 0); + REQUIRE(pool.getPool(1).blocks == 0); REQUIRE(pool.active == 0); auto p1 = pool.allocate(1); - REQUIRE(pool.pool(1).blocks == 1); + REQUIRE(pool.getPool(1).blocks == 1); REQUIRE(pool.active == 1); auto p2 = pool.allocate(2); - REQUIRE(pool.pool(1).blocks == 1); + REQUIRE(pool.getPool(1).blocks == 1); REQUIRE(pool.active == 3); pool.deallocate(p1); - REQUIRE(pool.pool(1).blocks == 1); + REQUIRE(pool.getPool(1).blocks == 1); REQUIRE(pool.active == 2); pool.deallocate(p2); - REQUIRE(pool.pool(1).blocks == 1); + REQUIRE(pool.getPool(1).blocks == 1); REQUIRE(pool.active == 0); auto p3 = pool.allocate(1); - REQUIRE(pool.pool(1).blocks == 1); + REQUIRE(pool.getPool(1).blocks == 1); REQUIRE(pool.active == 1); pool.deallocate(p3); - REQUIRE(pool.pool(1).blocks == 1); + REQUIRE(pool.getPool(1).blocks == 1); REQUIRE(pool.active == 0); } @@ -99,19 +98,19 @@ TEST_CASE("allocator2") { auto p1 = pool.allocate(1); auto p2 = pool.allocate(1); REQUIRE(pool.active == 2); - REQUIRE(pool.pool(1).blocks == 1); + REQUIRE(pool.getPool(1).blocks == 1); auto p3 = pool.allocate(1); REQUIRE(pool.active == 3); - REQUIRE(pool.pool(1).blocks == 2); + REQUIRE(pool.getPool(1).blocks == 2); auto p4 = pool.allocate(1); REQUIRE(pool.active == 4); - REQUIRE(pool.pool(1).blocks == 2); + REQUIRE(pool.getPool(1).blocks == 2); auto p5 = pool.allocate(1); REQUIRE(pool.active == 5); - REQUIRE(pool.pool(1).blocks == 3); + REQUIRE(pool.getPool(1).blocks == 3); } TEST_CASE("allocator3") { @@ -120,41 +119,41 @@ TEST_CASE("allocator3") { auto p1 = pool.allocate(1); auto p2 = pool.allocate(1); REQUIRE(pool.active == 2); - REQUIRE(pool.pool(1).blocks == 1); + REQUIRE(pool.getPool(1).blocks == 1); auto p3 = pool.allocate(1); REQUIRE(pool.active == 3); - REQUIRE(pool.pool(1).blocks == 2); + REQUIRE(pool.getPool(1).blocks == 2); auto p4 = pool.allocate(1); REQUIRE(pool.active == 4); - REQUIRE(pool.pool(1).blocks == 2); + REQUIRE(pool.getPool(1).blocks == 2); } { pool.clear(); auto p1 = pool.allocate(1); REQUIRE(pool.active == 1); - REQUIRE(pool.pool(1).blocks == 2); + REQUIRE(pool.getPool(1).blocks == 2); auto p2 = pool.allocate(1); REQUIRE(pool.active == 2); - REQUIRE(pool.pool(1).blocks == 2); + REQUIRE(pool.getPool(1).blocks == 2); //now block 2 should be reused auto p3 = pool.allocate(1); REQUIRE(pool.active == 3); - REQUIRE(pool.pool(1).blocks == 2); + REQUIRE(pool.getPool(1).blocks == 2); //now block 2 should be reused auto p4 = pool.allocate(1); REQUIRE(pool.active == 4); - REQUIRE(pool.pool(1).blocks == 2); + REQUIRE(pool.getPool(1).blocks == 2); //now block 3 should be created auto p5 = pool.allocate(1); REQUIRE(pool.active == 5); - REQUIRE(pool.pool(1).blocks == 3); + REQUIRE(pool.getPool(1).blocks == 3); } } @@ -202,7 +201,7 @@ TEST_CASE("allocator5") { auto p6 = pool.construct(1); p6[0].i = 6; REQUIRE(pool.active == 6); - REQUIRE(pool.pool(1).blocks == 3); + REQUIRE(pool.getPool(1).blocks == 3); REQUIRE(p1[0].i == 1); REQUIRE(p2[0].i == 2); diff --git a/src/tests/test_pool_band.cpp b/src/tests/test_pool_band.cpp new file mode 100644 index 0000000..2a49759 --- /dev/null +++ b/src/tests/test_pool_band.cpp @@ -0,0 +1,170 @@ +#define CATCH_CONFIG_MAIN +#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN +#include +#include +#include "../pool_band.h" +#include + +struct Item { + std::string_view title; + std::vector jopp; + unsigned int i; +}; + +TEST_CASE("allocator1") { + PoolBand pool(sizeof(Item) * 3); + REQUIRE(pool.blocks == 0); + REQUIRE(pool.active == 0); + + auto p1 = pool.allocate(); + p1->title = "1"; + p1->i = 1; + REQUIRE(pool.active == 1); + REQUIRE(pool.blocks == 1); + + auto p2 = pool.allocate(); + p2->title = "2"; + p2->i = 2; + REQUIRE(pool.active == 2); + REQUIRE(pool.blocks == 1); + + auto p3 = pool.allocate(); + p3->title = "3"; + p3->i = 3; + REQUIRE(pool.active == 3); + REQUIRE(pool.blocks == 1); + + auto p4 = pool.allocate(); + p4->title = "4"; + p4->i = 4; + REQUIRE(pool.active == 4); + REQUIRE(pool.blocks == 2); + + REQUIRE(p1->title == "1"); + REQUIRE(p2->title == "2"); + REQUIRE(p3->title == "3"); + REQUIRE(p4->title == "4"); + + REQUIRE(p1->i == 1); + REQUIRE(p2->i == 2); + REQUIRE(p3->i == 3); + REQUIRE(p4->i == 4); +} + +//TEST_CASE("allocator2") { +// PoolSingle pool; +// auto p1 = pool.allocate(); +// auto p2 = pool.allocate(); +// REQUIRE(pool.active == 2); +// REQUIRE(pool.blocks == 1); +// +// auto p3 = pool.allocate(); +// REQUIRE(pool.active == 3); +// REQUIRE(pool.blocks == 2); +// +// auto p4 = pool.allocate(); +// REQUIRE(pool.active == 4); +// REQUIRE(pool.blocks == 2); +// +// auto p5 = pool.allocate(); +// REQUIRE(pool.active == 5); +// REQUIRE(pool.blocks == 3); +//} +// +//TEST_CASE("allocator3") { +// PoolSingle pool; +// { +// auto p1 = pool.allocate(); +// auto p2 = pool.allocate(); +// REQUIRE(pool.active == 2); +// REQUIRE(pool.blocks == 1); +// +// auto p3 = pool.allocate(); +// REQUIRE(pool.active == 3); +// REQUIRE(pool.blocks == 2); +// +// auto p4 = pool.allocate(); +// REQUIRE(pool.active == 4); +// REQUIRE(pool.blocks == 2); +// } +// +// { +// pool.clear(); +// auto p1 = pool.allocate(); +// REQUIRE(pool.active == 1); +// REQUIRE(pool.blocks == 2); +// +// auto p2 = pool.allocate(); +// REQUIRE(pool.active == 2); +// REQUIRE(pool.blocks == 2); +// +// //now block 2 should be reused +// auto p3 = pool.allocate(); +// REQUIRE(pool.active == 3); +// REQUIRE(pool.blocks == 2); +// +// //now block 2 should be reused +// auto p4 = pool.allocate(); +// REQUIRE(pool.active == 4); +// REQUIRE(pool.blocks == 2); +// +// //now block 3 should be created +// auto p5 = pool.allocate(); +// REQUIRE(pool.active == 5); +// REQUIRE(pool.blocks == 3); +// } +//} +// +//TEST_CASE("allocator4") { +// PoolSingle pool; +// pool.clear(); +// +// auto p1 = pool.newElement(); +// REQUIRE(p1->i == 0); +// REQUIRE(p1->title == ""); +// +// auto p2 = pool.newElement(); +// REQUIRE(p2->i == 0); +// REQUIRE(p2->title == ""); +// p2->i = 2; +// REQUIRE(p2->i == 2); +// +// pool.deleteElement(p2); +// +// auto p3 = pool.newElement(); +// REQUIRE(p3 == p2); +// REQUIRE(p3->i == 0); +// REQUIRE(p3->title == ""); +//} +// +//TEST_CASE("allocator5") { +// PoolSingle pool; +// pool.clear(); +// +// auto p1 = pool.newElement(); +// p1->i = 1; +// auto p2 = pool.newElement(); +// p2->i = 2; +// +// auto p3 = pool.newElement(); +// p3->i = 3; +// auto p4 = pool.newElement(); +// p4->i = 4; +// +// auto p5 = pool.newElement(); +// p5->i = 5; +// auto p6_ = pool.newElement(); +// pool.deleteElement(p6_); +// +// auto p6 = pool.newElement(); +// p6->i = 6; +// REQUIRE(pool.active == 6); +// REQUIRE(pool.blocks == 3); +// +// REQUIRE(p1->i == 1); +// REQUIRE(p2->i == 2); +// REQUIRE(p3->i == 3); +// REQUIRE(p4->i == 4); +// REQUIRE(p5->i == 5); +// REQUIRE(p6->i == 6); +//} \ No newline at end of file diff --git a/src/tests/test_pool_single.cpp b/src/tests/test_pool_single.cpp index 9bbc5c2..2dbf278 100644 --- a/src/tests/test_pool_single.cpp +++ b/src/tests/test_pool_single.cpp @@ -1,6 +1,7 @@ #define CATCH_CONFIG_MAIN +#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN +#include -#include #include #include "../checker/pool_single.h" #include diff --git a/src/tests/test_vm2.cpp b/src/tests/test_vm2.cpp index cb46f46..e8fabcd 100644 --- a/src/tests/test_vm2.cpp +++ b/src/tests/test_vm2.cpp @@ -559,74 +559,6 @@ const var1: StringToNum<'999', []> = 1002; usleep(100000); } -TEST_CASE("function1") { - string code = R"( - function doIt(v: T) { - } - const a = doIt; - a(23); -)"; - test(code, 0); - testBench(code, 0); -} - -TEST_CASE("function2") { - string code = R"( - function doIt(v: T) { - } - doIt(23); - doIt<34>(33); -)"; - test(code, 1); - testBench(code, 1); -} - -TEST_CASE("function3") { - ZoneScoped; - string code = R"( - function doIt() { - return 1; - } - const var1: number = doIt(); - const var2: string = doIt(); -)"; - test(code, 1); - testBench(code, 1); -} - -TEST_CASE("function4") { - string code = R"( - function doIt(v: number) { - if (v == 1) return 'yes'; - if (v == 2) return 'yes'; - if (v == 3) return 'yes'; - if (v == 4) return 'yes'; - if (v == 5) return 'yes'; - if (v == 6) return 'yes'; - if (v == 7) return 'yes'; - if (v == 8) return 'yes'; - if (v == 9) return 'yes'; - if (v == 10) return 'yes'; - return 1; - } - const var1: number | string = doIt(0); - const var2: number = doIt(0); -)"; - test(code, 1); - testBench(code, 1); -} - -TEST_CASE("function5") { - string code = R"( - function doIt(): string { - return 1; - } - doIt(); -)"; - test(code, 1); - testBench(code, 1); -} - TEST_CASE("controlFlow1") { string code = R"( function boolFunc(t: true) {} @@ -643,123 +575,6 @@ TEST_CASE("controlFlow1") { test(code, 2); testBench(code, 2); } - -TEST_CASE("class1") { - string code = R"( - class MyDate { - static now(): number { - return 0; - } - } - const now: number = MyDate.now(); - const now2: string = MyDate.now(); -)"; - test(code, 1); - testBench(code, 1); -} - -TEST_CASE("class2") { - string code = R"( - class MyDate { - now(): number { - return 0; - } - } - const now: number = new MyDate().now(); - const now2: string = new MyDate().now(); -)"; - test(code, 1); - testBench(code, 1); -} - -TEST_CASE("class3") { - string code = R"( - class MyDate { - now(): T { - return 0; - } - } - const now: number = new MyDate().now(); - const now2: string = new MyDate().now(); -)"; - test(code, 1); - testBench(code, 1); -} - -//todo: requires handling Constructor, ThisKeyword, ThisType -// this['item'] relies on `item`, since we can't enforce the order in compile time, we convert all properties/methods to subroutines and call them however they are referenced, -// and detect circular dependencies in the runtime. -// How do we pass `this`? As first TypeArgument, or in a Slot? -// `this` could change, e.g. `new (MyDate & {now: () => string})` -// https://www.typescriptlang.org/play?#code/FAMwrgdgxgLglgewgAggCgJQC5VgLYBGApgE7IDewy1yJRMYJKADANzAC+wwUANgIYBnQcgCyATwAi-GEQpUaEBAHdMOCPmJlKNXbXqMW7XVwXUYCNchgALOCIBkFJauzJBMEnAgBzDvL0aOgYmazsRIWR+CHFjGlNdAHpEsPtkKCQAN1IYEVs5YMNrcQAHOQso5AATIhBSOirkJDk4GDNkAgErACUDJgAVUqIAHlt7AG0AchdJgF0APgDA-RCjdq5TZOKyyuQAXjEpGTknchccTH3Fjy9fLi2MiA9q4-3UImVD6Vl2HiRnghvCAfL7HTAAOgsmF+j2e51whFIbwI4Jc0O4sJgqBUACZ1JokQcUZ1+NCgA -TEST_CASE("class4") { - string code = R"( - class MyDate { - constructor(public item: T) {} - now(): this['item'] { - return this.item; - } - } - const now: number = new MyDate(123).now(); - const now2: string = new MyDate('123').now(); -)"; - test(code, 1); - testBench(code, 1); -} - -//todo: instance class from value arguments. does this work for functions already? -TEST_CASE("class41") { - string code = R"( - class MyDate { - constructor(public item: T) {} - now(): T { - return this.item; - } - } - const now: number = new MyDate(123).now(); - const now2: string = new MyDate('123').now(); -)"; - test(code, 1); - testBench(code, 1); -} - -TEST_CASE("class5") { - string code = R"( - class Data { - constructor(public item: T) {} - } - - class MyDate extends Data { - now(): this['item'] { - return this.item; - } - } - const now: number = new MyDate('123').now(); - const now2: string = new MyDate('123').now(); -)"; - test(code, 1); - testBench(code, 1); -} - -TEST_CASE("class6") { - string code = R"( - class Data { - constructor(public item: T) {} - } - - class MyDate extends Data { - public item: number; - now(): this['item'] { - return this.item; - } - } - const now: number = new MyDate(123).now(); - const now2: string = new MyDate('123').now(); -)"; - test(code, 1); - testBench(code, 1); -} - TEST_CASE("vm2Cartesian") { { vm2::CartesianProduct cartesian; diff --git a/src/tests/test_vm2_class.cpp b/src/tests/test_vm2_class.cpp new file mode 100644 index 0000000..92b8e71 --- /dev/null +++ b/src/tests/test_vm2_class.cpp @@ -0,0 +1,150 @@ +#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN +#include +#include + +#include "../core.h" +#include "../hash.h" +#include "../checker/compiler.h" +#include "../checker/vm2.h" +#include "./utils.h" + +using namespace tr; +using namespace tr::vm2; + +TEST_CASE("class1") { + string code = R"( + class MyDate { + static now(): number { + return 0; + } + } + const now: number = MyDate.now(); + const now2: string = MyDate.now(); +)"; + test(code, 1); + testBench(code, 1); +} + +TEST_CASE(" class2") { + string code = R"( + class MyDate { + now(): number { + return 0; + } + } + const now: number = new MyDate().now(); + const now2: string = new MyDate().now(); +)"; + test(code, 1); + testBench(code, 1); +} + +TEST_CASE("class3") { + string code = R"( + class MyDate { + now(): T { + return 0; + } + } + const now: number = new MyDate().now(); + const now2: string = new MyDate().now(); + const now3: number = new MyDate().now(); +)"; + test(code, 1); + testBench(code, 1); +} + +//todo: requires handling Constructor, ThisKeyword, ThisType +// this['item'] relies on `item`, since we can't enforce the order in compile time, we convert all properties/methods to subroutines and call them however they are referenced, +// and detect circular dependencies in the runtime. +// How do we pass `this`? As first TypeArgument, or in a Slot? +// `this` could change, e.g. `new (MyDate & {now: () => string})` +// https://www.typescriptlang.org/play?#code/FAMwrgdgxgLglgewgAggCgJQC5VgLYBGApgE7IDewy1yJRMYJKADANzAC+wwUANgIYBnQcgCyATwAi-GEQpUaEBAHdMOCPmJlKNXbXqMW7XVwXUYCNchgALOCIBkFJauzJBMEnAgBzDvL0aOgYmazsRIWR+CHFjGlNdAHpEsPtkKCQAN1IYEVs5YMNrcQAHOQso5AATIhBSOirkJDk4GDNkAgErACUDJgAVUqIAHlt7AG0AchdJgF0APgDA-RCjdq5TZOKyyuQAXjEpGTknchccTH3Fjy9fLi2MiA9q4-3UImVD6Vl2HiRnghvCAfL7HTAAOgsmF+j2e51whFIbwI4Jc0O4sJgqBUACZ1JokQcUZ1+NCgA +TEST_CASE("class4") { + string code = R"( + class MyDate { + constructor(public item: T) {} + now(): this['item'] { + return this.item; + } + } + const now: number = new MyDate(123).now(); + const now2: string = new MyDate('123').now(); +)"; + test(code, 1); + testBench(code, 1); +} + +//todo: instance class from value arguments. does this work for functions already? -> no +//todo: infer type arguments from constructor. Maybe put the constructor signature in its own subroutine +// which we can call. Result would be that we have all type arguments +TEST_CASE("class41") { + string code = R"( + class MyDate { + constructor(public item: T) {} + now(): T { + return this.item; + } + } + const now: number = new MyDate(123).now(); + const now2: string = new MyDate('123').now(); +)"; + test(code, 0); + testBench(code, 0); +} + +//todo: Needs to resolve Base constructor and executes it to populate T +TEST_CASE("class42") { + string code = R"( + class Base { + constructor(public item: T) {} + } + + class MyDate extends Base { + now(): T { + return this.item; + } + } + const now: number = new MyDate(123).now(); + const now2: string = new MyDate('123').now(); +)"; + test(code, 0); + testBench(code, 0); +} + +TEST_CASE("class5") { + string code = R"( + class Data { + constructor(public item: T) {} + } + + class MyDate extends Data { + now(): this['item'] { + return this.item; + } + } + const now: number = new MyDate('123').now(); + const now2: string = new MyDate('123').now(); +)"; + test(code, 1); + testBench(code, 1); +} + +TEST_CASE("class6") { + string code = R"( + class Data { + constructor(public item: T) {} + } + + class MyDate extends Data { + public item: number; + now(): this['item'] { + return this.item; + } + } + const now: number = new MyDate(123).now(); + const now2: string = new MyDate('123').now(); +)"; + test(code, 1); + testBench(code, 1); +} diff --git a/src/tests/test_vm2_function.cpp b/src/tests/test_vm2_function.cpp new file mode 100644 index 0000000..0018dea --- /dev/null +++ b/src/tests/test_vm2_function.cpp @@ -0,0 +1,105 @@ +#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN +#include +#include + +#include "../core.h" +#include "../hash.h" +#include "../checker/compiler.h" +#include "../checker/vm2.h" +#include "./utils.h" + +using namespace tr; +using namespace tr::vm2; + +TEST_CASE("function1") { + string code = R"( + function doIt(v: T) { + } + const a = doIt; + a(23); +)"; + test(code, 0); + testBench(code, 0); +} + +TEST_CASE("function2") { + string code = R"( + function doIt(v: T) { + } + doIt(23); + doIt<34>(33); +)"; + test(code, 1); + testBench(code, 1); +} + +TEST_CASE("function3") { + ZoneScoped; + string code = R"( + function doIt() { + return 1; + } + const var1: number = doIt(); + const var2: string = doIt(); +)"; + test(code, 1); + testBench(code, 1); +} + +TEST_CASE("function4") { + string code = R"( + function doIt(v: number) { + if (v == 1) return 'yes'; + if (v == 2) return 'yes'; + if (v == 3) return 'yes'; + if (v == 4) return 'yes'; + if (v == 5) return 'yes'; + if (v == 6) return 'yes'; + if (v == 7) return 'yes'; + if (v == 8) return 'yes'; + if (v == 9) return 'yes'; + if (v == 10) return 'yes'; + return 1; + } + const var1: number | string = doIt(0); + const var2: number = doIt(0); +)"; + test(code, 1); + testBench(code, 1); +} + +TEST_CASE("function5") { + string code = R"( + function doIt(): string { + return 1; + } + doIt(); +)"; + test(code, 1); + testBench(code, 1); +} + +//a function can have multiple definitions (overloading definitions where the last is ignored in finding a candidate). +//we need to instantiate doIt with value argument 3, +//basically converts to a tuple: [infer T extends number] so that rest parameters work out of the box. +TEST_CASE("function6") { + string code = R"( + function doIt(v: T): T { + } + const a: 3 = doIt(3); + const b: number = doIt(3); +)"; + test(code, 1); + testBench(code, 1); +} + +TEST_CASE("function7") { + string code = R"( + function doIt(v: T): T { + } + const a: number = doIt(3); + const b: 3 = doIt(3); +)"; + test(code, 1); + testBench(code, 1); +} \ No newline at end of file diff --git a/src/tests/test_vm2_union.cpp b/src/tests/test_vm2_union.cpp index 7dea5a8..8e683b7 100644 --- a/src/tests/test_vm2_union.cpp +++ b/src/tests/test_vm2_union.cpp @@ -14,6 +14,13 @@ using namespace tr::vm2; using std::string; using std::string_view; +TEST_CASE("union1") { + string code = R"( +const v1: string | number = 'nope'; +)"; + testBench(code, 0); +} + TEST_CASE("bigUnion") { tr::checker::Program program; diff --git a/src/tests/utils.h b/src/tests/utils.h index d6ac9e6..2a1dfc7 100644 --- a/src/tests/utils.h +++ b/src/tests/utils.h @@ -15,7 +15,7 @@ namespace tr { return bin; } - shared test(string code, unsigned int expectedErrors = 0) { + shared_ptr test(string code, unsigned int expectedErrors = 0) { auto bin = compile(code); auto module = make_shared(bin, "app.ts", code); vm2::run(module); diff --git a/src/types.cpp b/src/types.cpp index 4de4ee3..25a56fb 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -16,9 +16,26 @@ namespace tr { bool VariableDeclaration::isConst() { if (auto a = to(getParent())) { - return a->flags & (int)types::NodeFlags::Const; + return a->flags & (int) types::NodeFlags::Const; } return false; } + void NodeArray::push(node item) { + size++; + if (last) { + last->next = item; + last = item; + } else { + head = item; + last = item; + } + } + + NodeArrayIterator &NodeArrayIterator::operator++() { + if (currentNode != nullptr) { + this->currentNode = this->currentNode->next; + } + return *this; + } } \ No newline at end of file diff --git a/src/types.h b/src/types.h index 3fcf070..83b691c 100644 --- a/src/types.h +++ b/src/types.h @@ -11,6 +11,7 @@ #include #include "core.h" #include "enum.h" +#include "pool_band.h" #include #include @@ -1198,66 +1199,116 @@ namespace tr { }; class Node; + struct NodeArrayBase { + //linked list + node head = nullptr; + node last = nullptr; + }; + + //class NodeArrayIterator: public std::iterator { + // NodeArrayBase *array; + //public: + // NodeArrayIterator(NodeArrayBase *v): array(v) {} + // + // iterator operator++(int) /* postfix */ { return pos_++; } + // iterator& operator++() /* prefix */ { ++pos_; return *this; } + // Node & operator* () const { return *pos_; } + // Node * operator->() const { return pos_; } + // iterator operator+ (difference_type v) const { return pos_ + v; } + // bool operator==(const iterator& rhs) const { return pos_ == rhs.pos_; } + // bool operator!=(const iterator& rhs) const { return pos_ != rhs.pos_; } + //}; + + class NodeArrayIterator { + Node *currentNode = nullptr; + public: + NodeArrayIterator(Node *currentNode): currentNode(currentNode) { + } + + // incrementing means going through the list + NodeArrayIterator &operator++(); - struct NodeArray { - vector> list; + // post fixing is bad in general but it has it's usages + NodeArrayIterator operator++(int) { + NodeArrayIterator tempIter = *this; // we make a copy of the iterator + ++*this; // we increment + return tempIter; // we return the copy before increment + }; + + // we need to be able to compare nodes + bool operator!=(const NodeArrayIterator &other) { + return this->currentNode != other.currentNode; + }; + + Node *operator*() { + return this->currentNode; + }; + }; + + struct NodeArray: public NodeArrayBase { int pos; - int end; + int posEnd; + int size = 0; bool hasTrailingComma = false; bool isMissingList = false; //replaces `MissingList extends NodeArray {bool isMissingList;}` /* @internal */ int transformFlags = 0; // Flags for transforms, possibly undefined - NodeArray() {} - - NodeArray(const vector> &list, bool hasTrailingComma = false): list(list), hasTrailingComma(hasTrailingComma) {} + NodeArray(bool hasTrailingComma = false): hasTrailingComma(hasTrailingComma) {} - NodeArray(const shared &item) { - list.push_back(item); + NodeArray(node item) { + push(item); } + NodeArrayIterator begin() { return {this->head}; } + NodeArrayIterator end() { return {nullptr}; } + + void push(node item); + int length() { - return list.size(); + return size; } bool empty() { - return list.empty(); + return head == nullptr; } - void push(shared node) { - list.push_back(node); - } + //void push(node node) { + // std::cout << "push NodeArray list "<> slice(int start, int end = 0) { - if (!end) end = list.size(); - return std::vector>(list.begin() + start, list.begin() + end); -// return slice>(list, start, end); - } +// vector> slice(int start, int end = 0) { +// if (!end) end = list.size(); +// return std::vector>(list.begin() + start, list.begin() + end); +//// return slice>(list, start, end); +// } }; - inline sharedOpt last(shared &array) { - return array->list.back(); + inline optionalNode last(node &array) { + return array->last; } template - bool some(sharedOpt array, function)> callback) { + bool some(optionalNode array, function)> callback) { if (!array) return false; - for (auto &&item: array->list) { - if (callback(reinterpret_pointer_cast(item))) return true; + for (auto item: *array) { + if (callback(reinterpret_node(item))) return true; } return false; } - inline bool some(sharedOpt array) { + inline bool some(optionalNode array) { return array && !array->empty(); } @@ -1267,7 +1318,7 @@ namespace tr { // * Union is like Node, it is the owner of the data // */ // struct BaseUnion { -// shared node; +// node node; // BaseUnion(); // // SyntaxKind kind(); @@ -1297,12 +1348,12 @@ namespace tr { }; struct EmitNode { -// optional>> annotatedNodes; // Tracks Parse-tree nodes with EmitNodes for eventual cleanup. +// optional>> annotatedNodes; // Tracks Parse-tree nodes with EmitNodes for eventual cleanup. /*EmitFlags*/ int flags = 0; // Flags that customize emit optional> leadingComments; // Synthesized leading comments optional> trailingComments; // Synthesized trailing comments - sharedOpt commentRange; // The text range to use when emitting leading or trailing comments - sharedOpt sourceMapRange; // The text range to use when emitting leading or trailing source mappings + optionalNode commentRange; // The text range to use when emitting leading or trailing comments + optionalNode sourceMapRange; // The text range to use when emitting leading or trailing source mappings //todo: if we enable that, we have to adjust mergeEmitNode() // tokenSourceMapRanges?: (SourceMapRange | undefined)[]; // The text range to use when emitting source mappings for tokens // constantValue?: string | number; // The constant value of an expression @@ -1321,23 +1372,24 @@ namespace tr { */ class Node: public SourceMapRange { protected: - sharedOpt parent = nullptr; + optionalNode parent = nullptr; public: SyntaxKind kind = SyntaxKind::Unknown; + Node *next = nullptr; //for linked lists constexpr static auto KIND = SyntaxKind::Unknown; /* types::NodeFlags */ int flags; /* @internal */ /* types::ModifierFlags */ int modifierFlagsCache; - sharedOpt modifiers; // Array of modifiers - sharedOpt decorators; // Array of decorators (in document order) + optionalNode modifiers; // Array of modifiers + optionalNode decorators; // Array of decorators (in document order) /* @internal */ /* types::TransformFlags */ int transformFlags; // Flags for transforms // /* @internal */ id?: NodeId; // Unique id (used to look up NodeLinks) - /* @internal */ sharedOpt original; // The original BaseNode if this is an updated node. + /* @internal */ optionalNode original; // The original BaseNode if this is an updated node. // /* @internal */ symbol: Symbol; // Symbol declared by BaseNode (initialized by binding) // /* @internal */ locals?: SymbolTable; // Locals associated with BaseNode (initialized by binding) // /* @internal */ nextContainer?: Node; // Next container in declaration order (initialized by binding) // /* @internal */ localSymbol?: Symbol; // Local symbol declared by BaseNode (initialized by binding only for exported nodes) // /* @internal */ flowNode?: FlowNode; // Associated FlowNode (initialized by binding) - /* @internal */ sharedOpt emitNode; //?: ; // Associated EmitNode (initialized by transforms) + /* @internal */ optionalNode emitNode; //?: ; // Associated EmitNode (initialized by transforms) // /* @internal */ contextualType?: Type; // Used to temporarily assign a contextual type during overload resolution // /* @internal */ inferenceContext?: InferenceContext; // Inference context for contextual type @@ -1348,11 +1400,11 @@ namespace tr { return parent != nullptr; } - void setParent(shared p) { + void setParent(node p) { parent = p; } - sharedOpt getParent() { + optionalNode getParent() { if (!hasParent()) throw std::runtime_error("Node has no parent set"); return parent; } @@ -1384,22 +1436,29 @@ namespace tr { }; template - sharedOpt to(sharedOpt p) { + optionalNode to(optionalNode p) { if (!p) return nullptr; if (T::KIND != SyntaxKind::Unknown && p->kind != T::KIND) return nullptr; - return reinterpret_pointer_cast(p); + return reinterpret_cast(p); } - inline sharedOpt operator||(sharedOpt a, sharedOpt b) { - if (a) return a; - return b; - }; - - inline bool operator==(sharedOpt a, sharedOpt b) { - if (!a && !b) return true; - if (!a || !b) return false; - return *a == *b; - }; + //inline Node * operator||(Node * a, Node * b) { + // if (a) return a; + // return b; + //}; + + //inline bool operator==(optionalNode a, optionalNode b) { + // if (!a && !b) return true; + // if (!a || !b) return false; + // return *a == *b; + //}; + + template + inline Node *pick(const Args &... args) { + std::array list = {args...}; + for (auto &&i: list) if (i) return i; + return nullptr; + } template struct BaseNodeUnion: Node { @@ -1416,13 +1475,13 @@ namespace tr { /** * Defines a shared union property and initializes its first type. */ -#define UnionProperty(name, Types...) shared name = make_shared() -#define OptionalUnionProperty(name, Types...) sharedOpt name +#define UnionProperty(name, Types...) node name +#define OptionalUnionProperty(name, Types...) optionalNode name //Parent properties can not have initializer as it would lead to circular ref. We expect from the user to set it where required. -#define ParentProperty(Types...) shared> parent -#define Property(name, Type) shared name = make_shared() -#define OptionalProperty(name, Type) sharedOpt name +#define ParentProperty(Types...) node> parent +#define Property(name, Type) node name; +#define OptionalProperty(name, Type) optionalNode name struct DeclarationName; @@ -1608,8 +1667,8 @@ namespace tr { optional isInJSDocNamespace; /*@internal*/ optional autoGenerateFlags; // Specifies whether to auto-generate the text for an identifier. /*@internal*/ optional autoGenerateId; // Ensures unique generated identifiers get unique names, but clones get the same name. - /*@internal*/ sharedOpt generatedImportReference; // Reference to the generated import specifier this identifier refers to - /*@internal*/ sharedOpt typeArguments; // Only defined on synthesized nodes. Though not syntactically valid, used in emitting diagnostics, quickinfo, and signature help. + /*@internal*/ optionalNode generatedImportReference; // Reference to the generated import specifier this identifier refers to + /*@internal*/ optionalNode typeArguments; // Only defined on synthesized nodes. Though not syntactically valid, used in emitting diagnostics, quickinfo, and signature help. }; enum class FlowFlags { @@ -1632,7 +1691,7 @@ namespace tr { }; struct Block: BrandKind { - shared statements; + node statements; /*@internal*/ bool multiLine; }; @@ -1666,8 +1725,8 @@ namespace tr { #define EntityName Identifier, QualifiedName struct QualifiedName: BrandKind { - shared left; - shared right = make_shared(); + node left; + node right; /*@internal*/ OptionalProperty(jsdocDotPos, int); // QualifiedName occurs in JSDoc-style generic: Id1.Id2. }; @@ -1692,20 +1751,20 @@ namespace tr { struct BindingElement: BrandKind { OptionalUnionProperty(propertyName, PropertyName); // Binding property name (in object binding pattern) OptionalProperty(dotDotDotToken, DotDotDotToken); // Present on rest element (in object binding pattern) - shared name; // Declared binding element name + node name; // Declared binding element name OptionalProperty(initializer, Expression); // Optional initializer }; #define ArrayBindingElement BindingElement, OmittedExpression struct ObjectBindingPattern: BrandKind { - shared elements; + node elements; ParentProperty(VariableDeclaration, ParameterDeclaration, BindingElement); }; struct ArrayBindingPattern: BrandKind { ParentProperty(VariableDeclaration, ParameterDeclaration, BindingElement); - shared elements; + node elements; }; struct ExpressionStatement: BrandKind { @@ -1760,8 +1819,8 @@ namespace tr { struct DefaultClause; struct CaseBlock: BrandKind { - shared parent; - shared clauses; + node parent; + node clauses; }; struct SwitchStatement: BrandKind { @@ -1773,12 +1832,12 @@ namespace tr { struct CaseClause: BrandKind { Property(parent, CaseBlock); Property(expression, Expression); - shared statements; + node statements; }; struct DefaultClause: BrandKind { - shared parent; - shared statements; + node parent; + node statements; }; // export type CaseOrDefaultClause = @@ -1832,11 +1891,11 @@ namespace tr { struct VariableDeclarationList: BrandKind { ParentProperty(VariableStatement, ForStatement, ForOfStatement, ForInStatement); - shared declarations; + node declarations; }; struct VariableStatement: BrandKind { -// /* @internal*/ sharedOpt decorators; // Present for use with reporting a grammar error +// /* @internal*/ optionalNode decorators; // Present for use with reporting a grammar error Property(declarationList, VariableDeclarationList); }; @@ -1849,14 +1908,14 @@ namespace tr { }; struct CatchClause: BrandKind { - shared parent; + node parent; OptionalProperty(variableDeclaration, VariableDeclaration); Property(block, Block); }; struct VariableDeclaration: BrandKind { -// shared parent; - shared name; // Declared variable name +// node parent; + node name; // Declared variable name OptionalProperty(exclamationToken, ExclamationToken); // Optional definite assignment assertion OptionalProperty(type, TypeNode); // Optional type annotation OptionalProperty(initializer, Expression); // Optional initializer @@ -1893,16 +1952,16 @@ namespace tr { }; struct ObjectLiteralElement: NamedDeclaration { - sharedOpt name; + optionalNode name; }; struct ClassElement: NamedDeclaration { - sharedOpt name; + optionalNode name; }; struct TypeElement: NamedDeclaration { - sharedOpt name; - sharedOpt questionToken; + optionalNode name; + optionalNode questionToken; }; struct SpreadAssignment: BrandKind { @@ -1910,7 +1969,7 @@ namespace tr { }; struct TypeLiteralNode: BrandKind { - shared members; + node members; }; #define ClassLikeDeclaration ClassDeclaration, ClassExpression @@ -1938,7 +1997,7 @@ namespace tr { struct TypeParameterDeclaration: BrandKind { inline static auto kind = SyntaxKind::TypeParameter; // BaseNode *parent; //: DeclarationWithTypeParameterChildren | InferTypeNode; - shared name; + node name; /** Note: Consider calling `getEffectiveConstraintOfTypeParameter` */ OptionalProperty(constraint, TypeNode); OptionalProperty(defaultType, TypeNode); @@ -1957,7 +2016,7 @@ namespace tr { struct PropertyDeclaration: BrandKind { OptionalProperty(dotDotDotToken, DotDotDotToken); - shared name; + node name; OptionalProperty(questionToken, QuestionToken); OptionalProperty(exclamationToken, ExclamationToken); OptionalProperty(type, TypeNode); @@ -1966,14 +2025,14 @@ namespace tr { struct SignatureDeclarationBase: NamedDeclaration { OptionalUnionProperty(name, PropertyName); - sharedOpt typeParameters; - shared parameters; + optionalNode typeParameters; + node parameters; OptionalProperty(type, TypeNode); - /* @internal */ sharedOpt typeArguments;// Used for quick info, replaces typeParameters for instantiated signatures + /* @internal */ optionalNode typeArguments;// Used for quick info, replaces typeParameters for instantiated signatures }; struct PropertyAssignment: BrandKind { - shared name; + node name; OptionalProperty(questionToken, QuestionToken); OptionalProperty(exclamationToken, ExclamationToken); OptionalProperty(initializer, Expression); @@ -2001,14 +2060,14 @@ namespace tr { struct ClassLikeDeclarationBase { OptionalProperty(name, Identifier); - sharedOpt typeParameters; - sharedOpt heritageClauses; - shared members; + optionalNode typeParameters; + optionalNode heritageClauses; + node members; }; struct DeclarationStatement: Statement { -// sharedOpt decorators; // Array of decorators (in document order) -// sharedOpt modifiers; // Array of modifiers +// optionalNode decorators; // Array of decorators (in document order) +// optionalNode modifiers; // Array of modifiers OptionalUnionProperty(name, Identifier, StringLiteral, NumericLiteral); }; @@ -2017,7 +2076,7 @@ namespace tr { struct DebuggerStatement: BrandKind {}; struct CommaListExpression: BrandKind { - shared elements; + node elements; }; struct MissingDeclaration: BrandKind { @@ -2025,27 +2084,27 @@ namespace tr { }; struct ClassDeclaration: BrandKind { -// sharedOpt decorators; // Array of decorators (in document order) -// sharedOpt modifiers; // Array of modifiers +// optionalNode decorators; // Array of decorators (in document order) +// optionalNode modifiers; // Array of modifiers OptionalProperty(name, Identifier); }; struct ClassExpression: BrandKind { - sharedOpt decorators; // Array of decorators (in document order) - sharedOpt modifiers; // Array of modifiers + optionalNode decorators; // Array of decorators (in document order) + optionalNode modifiers; // Array of modifiers }; struct HeritageClause; struct InterfaceDeclaration: BrandKind { Property(name, Identifier); - sharedOpt typeParameters; - sharedOpt heritageClauses; - shared members; + optionalNode typeParameters; + optionalNode heritageClauses; + node members; }; struct NodeWithTypeArguments { - sharedOpt typeArguments; + optionalNode typeArguments; }; struct ExpressionWithTypeArguments: BrandKind { @@ -2055,12 +2114,12 @@ namespace tr { struct HeritageClause: BrandKind { ParentProperty(InterfaceDeclaration, ClassLikeDeclaration); SyntaxKind token; //SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword - shared types; + node types; }; struct TypeAliasDeclaration: BrandKind { Property(name, Identifier); - sharedOpt typeParameters; + optionalNode typeParameters; Property(type, TypeNode); }; @@ -2068,7 +2127,7 @@ namespace tr { struct EnumDeclaration: BrandKind { Property(name, Identifier); - shared members; + node members; }; struct EnumMember: BrandKind { @@ -2110,8 +2169,8 @@ namespace tr { }; struct ModuleBlock: BrandKind { - shared parent; - shared statements; + node parent; + node statements; }; struct NamespaceDeclaration: BrandKind { @@ -2136,7 +2195,7 @@ namespace tr { // 'EntityName' for an internal module reference, 'ExternalModuleReference' for an external // module reference. - sharedOpt moduleReference; + optionalNode moduleReference; }; struct ExternalModuleReference: BrandKind { @@ -2148,21 +2207,21 @@ namespace tr { struct ImportClause; struct NamespaceImport: BrandKind { - shared parent; + node parent; Property(name, Identifier); }; struct NamedImports; struct ImportSpecifier: BrandKind { - shared parent; + node parent; OptionalProperty(propertyName, Identifier); // Name preceding "as" keyword (or undefined when "as" is absent) Property(name, Identifier); // Declared name bool isTypeOnly; }; struct NamedImports: BrandKind { - shared parent; - shared elements; + node parent; + node elements; }; #define NamedImportBindings NamespaceImport, NamedImports @@ -2172,7 +2231,7 @@ namespace tr { struct AssertClause; struct AssertEntry: BrandKind { - shared parent; + node parent; UnionProperty(name, AssertionKey); Property(value, Expression); }; @@ -2180,7 +2239,7 @@ namespace tr { struct ExportDeclaration; struct AssertClause: BrandKind { ParentProperty(ImportDeclaration, ExportDeclaration); - shared elements; + node elements; bool multiLine; }; @@ -2210,26 +2269,26 @@ namespace tr { }; struct NamespaceExport: BrandKind { - shared parent; + node parent; Property(name, Identifier); }; struct NamedExports; struct ExportSpecifier: BrandKind { - shared parent; + node parent; bool isTypeOnly; OptionalProperty(propertyName, Identifier); // Name preceding "as" keyword (or undefined when "as" is absent) Property(name, Identifier); // Declared name }; struct NamedExports: BrandKind { - shared parent; - shared elements; + node parent; + node elements; }; struct NamespaceExportDeclaration: BrandKind { Property(name, Identifier); - /* @internal */ sharedOpt decorators; // Present for use with reporting a grammar error + /* @internal */ optionalNode decorators; // Present for use with reporting a grammar error /* @internal */ OptionalProperty(modifiers, ModifiersArray); // Present for use with reporting a grammar error }; @@ -2274,7 +2333,7 @@ namespace tr { * Unless `isExportEquals` is set, this node was parsed as an `export default`. */ struct ExportAssignment: BrandKind { - shared parent; + node parent; bool isExportEquals; Property(expression, Expression); }; @@ -2282,7 +2341,7 @@ namespace tr { struct ImportTypeNode; struct ImportTypeAssertionContainer: BrandKind { - shared parent; + node parent; Property(assertClause, AssertClause); bool multiLine = false; }; @@ -2306,15 +2365,15 @@ namespace tr { #define ObjectTypeDeclaration ClassLikeDeclaration, InterfaceDeclaration, TypeLiteralNode struct MethodSignature: BrandKind { - shared parent; + node parent; UnionProperty(name, PropertyName); }; struct IndexSignatureDeclaration: BrandKind { using TypeElement::name; - shared parent; -// sharedOpt decorators; // Array of decorators (in document order) -// sharedOpt modifiers; // Array of modifiers + node parent; +// optionalNode decorators; // Array of decorators (in document order) +// optionalNode modifiers; // Array of modifiers Property(type, TypeNode); }; @@ -2351,10 +2410,10 @@ namespace tr { struct ConstructorDeclaration: BrandKind { using ClassElement::name; - shared parent; + node parent; OptionalProperty(body, FunctionBody); - /* @internal */ sharedOpt typeParameters; // Present for use with reporting a grammar error + /* @internal */ optionalNode typeParameters; // Present for use with reporting a grammar error /* @internal */ OptionalProperty(type, TypeNode); // Present for use with reporting a grammar error }; @@ -2366,7 +2425,7 @@ namespace tr { ParentProperty(ClassLikeDeclaration, ObjectLiteralExpression, TypeLiteralNode, InterfaceDeclaration); UnionProperty(name, PropertyName); OptionalProperty(body, FunctionBody); - /* @internal */ sharedOpt typeParameters; // Present for use with reporting a grammar error + /* @internal */ optionalNode typeParameters; // Present for use with reporting a grammar error }; // See the comment on MethodDeclaration for the intuition behind SetAccessorDeclaration being a @@ -2375,7 +2434,7 @@ namespace tr { ParentProperty(ClassLikeDeclaration, ObjectLiteralExpression, TypeLiteralNode, InterfaceDeclaration); UnionProperty(name, PropertyName); OptionalUnionProperty(body, FunctionBody); - /* @internal */ sharedOpt typeParameters; // Present for use with reporting a grammar error + /* @internal */ optionalNode typeParameters; // Present for use with reporting a grammar error /* @internal */ OptionalProperty(type, TypeNode); // Present for use with reporting a grammar error }; @@ -2385,7 +2444,7 @@ namespace tr { template struct ObjectLiteralExpressionBase: PrimaryExpression { - shared properties; + node properties; }; struct ObjectLiteralExpression: BrandKind> { @@ -2490,7 +2549,7 @@ namespace tr { }; struct ArrayLiteralExpression: BrandKind { - shared elements; + node elements; /* @internal */ bool multiLine; //optional }; @@ -2503,8 +2562,8 @@ namespace tr { struct CallExpression: BrandKind { Property(expression, LeftHandSideExpression); OptionalProperty(questionDotToken, QuestionDotToken); - sharedOpt typeArguments; - shared arguments; + optionalNode typeArguments; + node arguments; }; using CallChain = CallExpression; @@ -2515,8 +2574,8 @@ namespace tr { struct NewExpression: BrandKind { Property(expression, LeftHandSideExpression); - sharedOpt typeArguments; - sharedOpt arguments; + optionalNode typeArguments; + optionalNode arguments; }; struct TypeAssertion: BrandKind { @@ -2536,7 +2595,7 @@ namespace tr { }; struct TemplateMiddle: BrandKind { - shared parent; + node parent; /* @internal */ optional templateFlags; }; @@ -2548,26 +2607,26 @@ namespace tr { }; struct TemplateLiteralTypeSpan: BrandKind { - shared parent; + node parent; Property(type, TypeNode); UnionProperty(literal, TemplateMiddle, TemplateTail); }; struct TemplateLiteralTypeNode: BrandKind { Property(head, TemplateHead); - shared templateSpans; + node templateSpans; }; struct TemplateExpression: BrandKind { Property(head, TemplateHead); - shared templateSpans; + node templateSpans; }; #define TemplateLiteralTypes TemplateExpression, NoSubstitutionTemplateLiteral struct TaggedTemplateExpression: BrandKind { Property(tag, LeftHandSideExpression); - sharedOpt typeArguments; + optionalNode typeArguments; UnionProperty(templateLiteral, TemplateLiteralTypes); /*@internal*/ OptionalProperty(questionDotToken, QuestionDotToken); // NOTE: Invalid syntax, only used to report a grammar error. }; @@ -2622,11 +2681,11 @@ namespace tr { }; struct UnionTypeNode: BrandKind { - shared types; + node types; }; struct IntersectionTypeNode: BrandKind { - shared types; + node types; }; #define UnionOrIntersectionTypeNode UnionTypeNode, IntersectionTypeNode @@ -2668,7 +2727,7 @@ namespace tr { OptionalUnionProperty(questionToken, QuestionToken, PlusToken, MinusToken); OptionalProperty(type, TypeNode); /** Used only to produce grammar errors */ - sharedOpt members; + optionalNode members; }; #define JsxChild JsxText, JsxExpression, JsxElement, JsxSelfClosingElement, JsxFragment @@ -2697,7 +2756,7 @@ namespace tr { }; struct JsxAttribute: BrandKind { - shared parent; + node parent; Property(name, Identifier); /// JSX attribute initializers are optional; is sugar for OptionalUnionProperty(initializer, JsxAttributeValue); @@ -2705,31 +2764,31 @@ namespace tr { struct JsxAttributes: BrandKind { OptionalUnionProperty(parent, JsxOpeningLikeElement); - shared properties; + node properties; }; // The opening element of a ... JsxElement struct JsxOpeningElement: BrandKind { - shared parent; + node parent; UnionProperty(tagName, JsxTagNameExpression); - sharedOpt typeArguments; + optionalNode typeArguments; Property(attributes, JsxAttributes); }; struct JsxText: BrandKind { - shared parent; + node parent; bool containsOnlyTriviaWhiteSpaces; }; struct JsxClosingElement: BrandKind { - shared parent; + node parent; UnionProperty(tagName, JsxTagNameExpression); }; /// A JSX expression of the form ... struct JsxElement: BrandKind { Property(openingElement, JsxOpeningElement); - shared children; + node children; Property(closingElement, JsxClosingElement); }; @@ -2741,25 +2800,25 @@ namespace tr { // A JSX expression of the form struct JsxSelfClosingElement: BrandKind { UnionProperty(tagName, JsxTagNameExpression); - sharedOpt typeArguments; + optionalNode typeArguments; Property(attributes, JsxAttributes); }; struct JsxFragment; /// The opening element of a <>... JsxFragment struct JsxOpeningFragment: BrandKind { - shared parent; + node parent; }; /// The closing element of a <>... JsxFragment struct JsxClosingFragment: BrandKind { - shared parent; + node parent; }; /// A JSX expression of the form <>... struct JsxFragment: BrandKind { Property(openingFragment, JsxOpeningFragment); - shared children; + node children; Property(closingFragment, JsxClosingFragment); }; @@ -2773,7 +2832,7 @@ namespace tr { }; struct TupleTypeNode: BrandKind { - shared elements; + node elements; }; // using AccessibilityModifier = NodeType; @@ -2791,7 +2850,8 @@ namespace tr { string fileName; string text; - shared statements; + PoolBand *pool; + node statements; Property(endOfFileToken, EndOfFileToken); /* @internal */ string path; @@ -2853,14 +2913,14 @@ namespace tr { * This is intended to be the first top-level import/export, * but could be arbitrarily nested (e.g. `import.meta`). */ - /* @internal */ sharedOpt externalModuleIndicator; //?: Node | true; + /* @internal */ optionalNode externalModuleIndicator; //?: Node | true; /** * The callback used to set the external module indicator - this is saved to * be later reused during incremental reparsing, which otherwise lacks the information * to set this field */ - /* @internal */ optional)>> setExternalModuleIndicator; //?: (file: SourceFile) => void; + /* @internal */ optional)>> setExternalModuleIndicator; //?: (file: SourceFile) => void; // // The first node that causes this file to be a CommonJS module // /* @internal */ commonJsModuleIndicator?: Node; // // JS identifier-declarations that are intended to merge with globals @@ -2911,6 +2971,5 @@ namespace tr { // // /* @internal */ exportedModulesFromDeclarationEmit?: ExportedModulesFromDeclarationEmit; // /* @internal */ endFlowNode?: FlowNode; - }; } diff --git a/src/utilities.cpp b/src/utilities.cpp index c2dae50..471dcb2 100644 --- a/src/utilities.cpp +++ b/src/utilities.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "Tracy.hpp" #include "types.h" #include "utilities.h" @@ -14,41 +12,48 @@ namespace tr { return scriptKind == ScriptKind::TSX || scriptKind == ScriptKind::JSX || scriptKind == ScriptKind::JS || scriptKind == ScriptKind::JSON ? LanguageVariant::JSX : LanguageVariant::Standard; } - sharedOpt lastOrUndefined(sharedOpt array) { + optionalNode lastOrUndefined(optionalNode array) { if (!array) return nullptr; - auto last = lastOrUndefined(array->list); - if (last) *last; + if (array->last) return array->last; return nullptr; } - NodeArray &setTextRangePosEnd(NodeArray &range, int pos, int end) { - range.pos = pos; - range.end = end; + node setTextRangePosEnd(node range, int pos, int end) { + range->pos = pos; + range->posEnd = end; + return range; + } + + node setArrayTextRange(node range, optional location) { + if (location) { + range->pos = location->pos; + range->posEnd = location->posEnd; + } return range; } /** * Gets a custom text range to use when emitting source maps. */ - shared getSourceMapRange(shared node) { + node getSourceMapRange(node node) { if (!node->emitNode) return node; return node->emitNode->sourceMapRange; } /** * Gets a custom text range to use when emitting comments. */ - shared getCommentRange(shared node) { + node getCommentRange(node node) { if (!node->emitNode) return node; if (!node->emitNode->commentRange) return node; return node->emitNode->commentRange; } - optional> getSyntheticLeadingComments(shared node) { + optional> getSyntheticLeadingComments(node node) { if (!node->emitNode) return nullopt; return node->emitNode->leadingComments; } - optional> getSyntheticTrailingComments(shared node) { + optional> getSyntheticTrailingComments(node node) { if (!node->emitNode) return nullopt; return node->emitNode->trailingComments; } @@ -59,14 +64,10 @@ namespace tr { return !(pos >= 0); } - bool nodeIsSynthesized(shared range) { + bool nodeIsSynthesized(node range) { return positionIsSynthesized(range->pos) || positionIsSynthesized(range->end); } - NodeArray setTextRange(NodeArray range, optional location) { - return location ? setTextRangePosEnd(range, location->pos, location->end) : range; - } - string parsePseudoBigInt(string &stringValue) { int log2Base; switch (charCodeAt(stringValue, 1).code) { // "x" in "0x123" @@ -175,7 +176,7 @@ namespace tr { return false; } - bool isCommaSequence(shared node) { + bool isCommaSequence(node node) { return (node->kind == SyntaxKind::BinaryExpression && to(node)->operatorToken->kind == SyntaxKind::CommaToken) || node->kind == SyntaxKind::CommaListExpression; } @@ -194,15 +195,15 @@ namespace tr { return SyntaxKind::FirstTemplateToken <= kind && kind <= SyntaxKind::LastTemplateToken; } - bool isTemplateLiteralToken(shared &node) { + bool isTemplateLiteralToken(node &node) { return isTemplateLiteralKind(node->kind); } - bool isTemplateMiddleOrTemplateTail(shared &node) { + bool isTemplateMiddleOrTemplateTail(node &node) { return node->kind == SyntaxKind::TemplateMiddle || node->kind == SyntaxKind::TemplateTail; } - bool isImportOrExportSpecifier(shared &node) { + bool isImportOrExportSpecifier(node &node) { return isImportSpecifier(node) || isExportSpecifier(node); } @@ -249,7 +250,7 @@ namespace tr { //unordered_map localizedDiagnosticMessages{}; - string_view getLocaleSpecificMessage(const shared &message) { + string_view getLocaleSpecificMessage(const shared_ptr &message) { // if (has(localizedDiagnosticMessages, message.key)) { // return localizedDiagnosticMessages[message.key]; // } @@ -267,7 +268,7 @@ namespace tr { return v; //currently only string supported } - DiagnosticWithDetachedLocation createDetachedDiagnostic(string fileName, int start, int length, const shared &message, vector textArg) { + DiagnosticWithDetachedLocation createDetachedDiagnostic(string fileName, int start, int length, const shared_ptr &message, vector textArg) { // assertDiagnosticLocation(/*file*/ undefined, start, length); auto text = getLocaleSpecificMessage(message); @@ -324,13 +325,13 @@ namespace tr { // return getScriptKindFromFileName(fileName) || ScriptKind::TS; } /** @internal */ - bool hasInvalidEscape(shared templateLiteral) { + bool hasInvalidEscape(node templateLiteral) { if (isNoSubstitutionTemplateLiteral(templateLiteral)) { return !!to(templateLiteral)->templateFlags; } return !!to(templateLiteral)->head->templateFlags - || some(to(templateLiteral)->templateSpans, [](shared span) { + || some(to(templateLiteral)->templateSpans, [](node span) { if (span->literal->kind == SyntaxKind::TemplateTail) return !!to(span->literal)->templateFlags; if (span->literal->kind == SyntaxKind::TemplateMiddle) return !!to(span->literal)->templateFlags; return false; @@ -364,7 +365,7 @@ namespace tr { } } - bool isOuterExpression(sharedOpt node, int kinds) { + bool isOuterExpression(optionalNode node, int kinds) { if (!node) return false; switch (node->kind) { case SyntaxKind::ParenthesizedExpression: @@ -380,7 +381,7 @@ namespace tr { return false; } - sharedOpt getExpression(sharedOpt node) { + optionalNode getExpression(optionalNode node) { if (!node) return nullptr; switch (node->kind) { case SyntaxKind::ParenthesizedExpression:return to(node)->expression; @@ -395,14 +396,14 @@ namespace tr { throw runtime_error(fmt::format("No expression found in type {}", (int) node->kind)); } - shared skipOuterExpressions(shared node, int kinds) { + node skipOuterExpressions(node node, int kinds) { while (isOuterExpression(node, kinds)) { node = getExpression(node); } return node; } - shared skipPartiallyEmittedExpressions(shared node) { + node skipPartiallyEmittedExpressions(node node) { ZoneScoped; return skipOuterExpressions(node, (int) OuterExpressionKinds::PartiallyEmittedExpressions); } @@ -458,7 +459,7 @@ namespace tr { } /* @internal */ - bool isUnaryExpression(shared node) { + bool isUnaryExpression(node node) { return isUnaryExpressionKind(skipPartiallyEmittedExpressions(node)->kind); } @@ -546,7 +547,7 @@ namespace tr { } } - SyntaxKind getOperator(shared expression) { + SyntaxKind getOperator(node expression) { if (expression->kind == SyntaxKind::BinaryExpression) { return to(expression)->operatorToken->kind; } else if (expression->kind == SyntaxKind::PrefixUnaryExpression) { @@ -559,17 +560,17 @@ namespace tr { } /* @internal */ - bool isGeneratedIdentifier(shared node) { + bool isGeneratedIdentifier(node node) { return node->kind == SyntaxKind::Identifier && (defaultTo(to(node)->autoGenerateFlags, 0) & (int) GeneratedIdentifierFlags::KindMask) > (int) GeneratedIdentifierFlags::None; } - int getExpressionPrecedence(shared expression) { + int getExpressionPrecedence(node expression) { auto operatorNode = getOperator(expression); bool hasArguments = expression->is() ? !!to(expression)->arguments : false; return getOperatorPrecedence(expression->kind, operatorNode, hasArguments); } - bool isLeftHandSideExpression(shared node) { + bool isLeftHandSideExpression(node node) { ZoneScoped; return isLeftHandSideExpressionKind(skipPartiallyEmittedExpressions(node)->kind); } @@ -586,7 +587,7 @@ namespace tr { // code). So the parser will attempt to parse out a type, and will create an actual node. // However, this node will be 'missing' in the sense that no actual source-code/tokens are // contained within it. - bool nodeIsMissing(sharedOpt node) { + bool nodeIsMissing(optionalNode node) { if (!node) { return true; } @@ -594,11 +595,11 @@ namespace tr { return node->pos == node->end && node->pos >= 0 && node->kind != SyntaxKind::EndOfFileToken; } - bool nodeIsPresent(sharedOpt node) { + bool nodeIsPresent(optionalNode node) { return !nodeIsMissing(node); } - string getTextOfNodeFromSourceText(string &sourceText, shared node, bool includeTrivia) { + string getTextOfNodeFromSourceText(string &sourceText, node node, bool includeTrivia) { if (nodeIsMissing(node)) { return ""; } @@ -615,7 +616,7 @@ namespace tr { return text; } - int getFullWidth(shared node) { + int getFullWidth(node node) { return node->end - node->pos; } @@ -629,11 +630,11 @@ namespace tr { return id.size() >= 3 && charCodeAt(id, 0).code == CharacterCodes::_ && charCodeAt(id, 1).code == CharacterCodes::_ && charCodeAt(id, 2).code == CharacterCodes::_ ? substr(id, 1) : id; } - string idText(shared identifierOrPrivateName) { + string idText(node identifierOrPrivateName) { return unescapeLeadingUnderscores(getEscapedName(identifierOrPrivateName)); } - shared getLeftmostExpression(shared node, bool stopAtCallExpressions) { + node getLeftmostExpression(node node, bool stopAtCallExpressions) { while (true) { switch (node->kind) { case SyntaxKind::PostfixUnaryExpression:node = to(node)->operand; @@ -724,13 +725,13 @@ namespace tr { return Associativity::Left; } - Associativity getExpressionAssociativity(shared expression) { + Associativity getExpressionAssociativity(node expression) { auto operatorKind = getOperator(expression); auto hasArguments = expression->kind == SyntaxKind::NewExpression && to(expression)->arguments; return getOperatorAssociativity(expression->kind, operatorKind, hasArguments); } - shared getElementsOfBindingOrAssignmentPattern(shared name) { + node getElementsOfBindingOrAssignmentPattern(node name) { switch (name->kind) { case SyntaxKind::ObjectBindingPattern: return to(name)->elements; case SyntaxKind::ArrayBindingPattern: return to(name)->elements; diff --git a/src/utilities.h b/src/utilities.h index f803e7a..a281fe6 100644 --- a/src/utilities.h +++ b/src/utilities.h @@ -44,27 +44,29 @@ namespace tr { return location ? setTextRangePosEnd(range, location->pos, location->end) : range; } - sharedOpt lastOrUndefined(sharedOpt array); + optionalNode lastOrUndefined(optionalNode array); - NodeArray &setTextRangePosEnd(NodeArray &range, int pos, int end); + node setTextRangePosEnd(node range, int pos, int end); + + node setArrayTextRange(node range, optional location); /** * Gets a custom text range to use when emitting source maps. */ - shared getSourceMapRange(shared node); + node getSourceMapRange(node node); /** * Gets a custom text range to use when emitting comments. */ - shared getCommentRange(shared node); + node getCommentRange(node node); - optional> getSyntheticLeadingComments(shared node); + optional> getSyntheticLeadingComments(node node); - optional> getSyntheticTrailingComments(shared node); + optional> getSyntheticTrailingComments(node node); bool positionIsSynthesized(int pos); - bool nodeIsSynthesized(shared range); + bool nodeIsSynthesized(node range); NodeArray setTextRange(NodeArray range, optional location); @@ -82,7 +84,7 @@ namespace tr { /* @internal */ bool isModifierKind(SyntaxKind token); - bool isCommaSequence(shared node); + bool isCommaSequence(node node); bool isLiteralKind(SyntaxKind kind); @@ -92,11 +94,11 @@ namespace tr { /* @internal */ bool isTemplateLiteralKind(SyntaxKind kind); - bool isTemplateLiteralToken(shared &node); + bool isTemplateLiteralToken(node &node); - bool isTemplateMiddleOrTemplateTail(shared &node); + bool isTemplateMiddleOrTemplateTail(node &node); - bool isImportOrExportSpecifier(shared &node); + bool isImportOrExportSpecifier(node &node); enum class OperatorPrecedence { // Expression: @@ -298,7 +300,7 @@ namespace tr { //unordered_map localizedDiagnosticMessages{}; - string_view getLocaleSpecificMessage(const shared &message); + string_view getLocaleSpecificMessage(const node &message); using DiagnosticArg = string; @@ -306,44 +308,44 @@ namespace tr { string DiagnosticArgToString(DiagnosticArg &v) ; - DiagnosticWithDetachedLocation createDetachedDiagnostic(string fileName, int start, int length, const shared &message, vector textArg = {}); + DiagnosticWithDetachedLocation createDetachedDiagnostic(string fileName, int start, int length, const shared_ptr &message, vector textArg = {}); DiagnosticWithDetachedLocation &addRelatedInfo(DiagnosticWithDetachedLocation &diagnostic, vector relatedInformation) ; ScriptKind ensureScriptKind(string fileName, optional scriptKind); /** @internal */ - bool hasInvalidEscape(shared templateLiteral); + bool hasInvalidEscape(node templateLiteral); string fileExt(const string &filename); ScriptKind getScriptKindFromFileName(const string &fileName); - bool isOuterExpression(sharedOpt node, int kinds = (int) OuterExpressionKinds::All); + bool isOuterExpression(optionalNode node, int kinds = (int) OuterExpressionKinds::All); - sharedOpt getExpression(sharedOpt node); + optionalNode getExpression(optionalNode node); - shared skipOuterExpressions(shared node, int kinds = (int) OuterExpressionKinds::All); + node skipOuterExpressions(node node, int kinds = (int) OuterExpressionKinds::All); - shared skipPartiallyEmittedExpressions(shared node); + node skipPartiallyEmittedExpressions(node node); bool isLeftHandSideExpressionKind(SyntaxKind kind) ; bool isUnaryExpressionKind(SyntaxKind kind); /* @internal */ - bool isUnaryExpression(shared node); + bool isUnaryExpression(node node); int getOperatorPrecedence(SyntaxKind nodeKind, SyntaxKind operatorKind, optional hasArguments = {}); - SyntaxKind getOperator(shared expression); + SyntaxKind getOperator(node expression); /* @internal */ - bool isGeneratedIdentifier(shared node); + bool isGeneratedIdentifier(node node); - int getExpressionPrecedence(shared expression); + int getExpressionPrecedence(node expression); - bool isLeftHandSideExpression(shared node); + bool isLeftHandSideExpression(node node); // Returns true if this node is missing from the actual source code. A 'missing' node is different // from 'undefined/defined'. When a node is undefined (which can happen for optional nodes @@ -357,13 +359,13 @@ namespace tr { // code). So the parser will attempt to parse out a type, and will create an actual node. // However, this node will be 'missing' in the sense that no actual source-code/tokens are // contained within it. - bool nodeIsMissing(sharedOpt node); + bool nodeIsMissing(optionalNode node); - bool nodeIsPresent(sharedOpt node); + bool nodeIsPresent(optionalNode node); - string getTextOfNodeFromSourceText(string &sourceText, shared node, bool includeTrivia = false); + string getTextOfNodeFromSourceText(string &sourceText, node node, bool includeTrivia = false); - int getFullWidth(shared node); + int getFullWidth(node node); /** * Remove extra underscore from escaped identifier text content. @@ -373,9 +375,9 @@ namespace tr { */ string unescapeLeadingUnderscores(__String id); - string idText(shared identifierOrPrivateName); + string idText(node identifierOrPrivateName); - shared getLeftmostExpression(shared node, bool stopAtCallExpressions); + node getLeftmostExpression(node node, bool stopAtCallExpressions); Comparison compareComparableValues(optional a, optional b) ; @@ -429,9 +431,9 @@ namespace tr { Associativity getOperatorAssociativity(SyntaxKind kind, SyntaxKind operatorKind, bool hasArguments = false); - Associativity getExpressionAssociativity(shared expression); + Associativity getExpressionAssociativity(node expression); - shared getElementsOfBindingOrAssignmentPattern(shared name); + node getElementsOfBindingOrAssignmentPattern(node name); bool isLogicalOrCoalescingAssignmentOperator(SyntaxKind token); //: token is LogicalOrCoalescingAssignmentOperator @@ -439,7 +441,7 @@ namespace tr { * Determines whether the BindingOrAssignmentElement is a BindingElement-like declaration */ /* @internal */ - inline bool isDeclarationBindingElement(shared bindingElement) {//: bindingElement is VariableDeclaration | ParameterDeclaration | BindingElement { + inline bool isDeclarationBindingElement(node bindingElement) {//: bindingElement is VariableDeclaration | ParameterDeclaration | BindingElement { switch (bindingElement->kind) { case SyntaxKind::VariableDeclaration: case SyntaxKind::Parameter: @@ -450,7 +452,7 @@ namespace tr { return false; } - inline bool isObjectLiteralElementLike(shared node) {//: node is ObjectLiteralElementLike { + inline bool isObjectLiteralElementLike(node node) {//: node is ObjectLiteralElementLike { auto kind = node->kind; return kind == SyntaxKind::PropertyAssignment || kind == SyntaxKind::ShorthandPropertyAssignment @@ -460,7 +462,7 @@ namespace tr { || kind == SyntaxKind::SetAccessor; } - inline bool isAssignmentExpression(shared node, bool excludeCompoundAssignment = false) {//: node is AssignmentExpression { + inline bool isAssignmentExpression(node node, bool excludeCompoundAssignment = false) {//: node is AssignmentExpression { return isBinaryExpression(node) && (excludeCompoundAssignment ? to(node)->operatorToken->kind == SyntaxKind::EqualsToken @@ -469,7 +471,7 @@ namespace tr { } /* @internal */ - inline bool isAssignmentPattern(shared node) { //: node is AssignmentPattern { + inline bool isAssignmentPattern(node node) { //: node is AssignmentPattern { auto kind = node->kind; return kind == SyntaxKind::ArrayLiteralExpression || kind == SyntaxKind::ObjectLiteralExpression; @@ -479,7 +481,7 @@ namespace tr { /** * Gets the name of an BindingOrAssignmentElement. */ - inline sharedOpt getTargetOfBindingOrAssignmentElement(shared bindingElement) { + inline optionalNode getTargetOfBindingOrAssignmentElement(node bindingElement) { if (isDeclarationBindingElement(bindingElement)) { // `a` in `let { a } = ...` // `a` in `let { a = 1 } = ...` diff --git a/tests/tutorial1.ts b/tests/tutorial1.ts new file mode 100644 index 0000000..02227dc --- /dev/null +++ b/tests/tutorial1.ts @@ -0,0 +1,11 @@ + +// Here you can see in real-time what branch the conditional type takes +type isNumber = T extends number ? "yes" : "no"; +const v2: isNumber = "yes"; + +// Here you can see that distributive conditional types +// are executed for each union member +type NoNumber = T extends number ? never : T; +type Primitive = string | number | boolean; +const v3: NoNumber = 34; +