@typescript-deploys/pr-build 5.0.0-pr-52434-2 → 5.0.0-pr-52059-5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/lib.d.ts +0 -2
- package/lib/lib.decorators.d.ts +0 -2
- package/lib/lib.decorators.legacy.d.ts +0 -2
- package/lib/lib.dom.d.ts +0 -2
- package/lib/lib.dom.iterable.d.ts +0 -2
- package/lib/lib.es2015.collection.d.ts +0 -2
- package/lib/lib.es2015.core.d.ts +0 -2
- package/lib/lib.es2015.d.ts +0 -2
- package/lib/lib.es2015.generator.d.ts +0 -2
- package/lib/lib.es2015.iterable.d.ts +0 -2
- package/lib/lib.es2015.promise.d.ts +0 -2
- package/lib/lib.es2015.proxy.d.ts +0 -2
- package/lib/lib.es2015.reflect.d.ts +0 -2
- package/lib/lib.es2015.symbol.d.ts +0 -2
- package/lib/lib.es2015.symbol.wellknown.d.ts +0 -2
- package/lib/lib.es2016.array.include.d.ts +0 -2
- package/lib/lib.es2016.d.ts +0 -2
- package/lib/lib.es2016.full.d.ts +0 -2
- package/lib/lib.es2017.d.ts +0 -2
- package/lib/lib.es2017.full.d.ts +0 -2
- package/lib/lib.es2017.intl.d.ts +0 -2
- package/lib/lib.es2017.object.d.ts +0 -2
- package/lib/lib.es2017.sharedmemory.d.ts +0 -2
- package/lib/lib.es2017.string.d.ts +0 -2
- package/lib/lib.es2017.typedarrays.d.ts +0 -2
- package/lib/lib.es2018.asyncgenerator.d.ts +0 -2
- package/lib/lib.es2018.asynciterable.d.ts +0 -2
- package/lib/lib.es2018.d.ts +0 -2
- package/lib/lib.es2018.full.d.ts +0 -2
- package/lib/lib.es2018.intl.d.ts +0 -2
- package/lib/lib.es2018.promise.d.ts +0 -2
- package/lib/lib.es2018.regexp.d.ts +0 -2
- package/lib/lib.es2019.array.d.ts +0 -2
- package/lib/lib.es2019.d.ts +0 -2
- package/lib/lib.es2019.full.d.ts +0 -2
- package/lib/lib.es2019.intl.d.ts +0 -2
- package/lib/lib.es2019.object.d.ts +0 -2
- package/lib/lib.es2019.string.d.ts +0 -2
- package/lib/lib.es2019.symbol.d.ts +0 -2
- package/lib/lib.es2020.bigint.d.ts +0 -2
- package/lib/lib.es2020.d.ts +0 -2
- package/lib/lib.es2020.date.d.ts +0 -2
- package/lib/lib.es2020.full.d.ts +0 -2
- package/lib/lib.es2020.intl.d.ts +0 -2
- package/lib/lib.es2020.number.d.ts +0 -2
- package/lib/lib.es2020.promise.d.ts +0 -2
- package/lib/lib.es2020.sharedmemory.d.ts +0 -2
- package/lib/lib.es2020.string.d.ts +0 -2
- package/lib/lib.es2020.symbol.wellknown.d.ts +0 -2
- package/lib/lib.es2021.d.ts +0 -2
- package/lib/lib.es2021.full.d.ts +0 -2
- package/lib/lib.es2021.intl.d.ts +0 -2
- package/lib/lib.es2021.promise.d.ts +0 -2
- package/lib/lib.es2021.string.d.ts +0 -2
- package/lib/lib.es2021.weakref.d.ts +0 -2
- package/lib/lib.es2022.array.d.ts +0 -2
- package/lib/lib.es2022.d.ts +0 -2
- package/lib/lib.es2022.error.d.ts +0 -2
- package/lib/lib.es2022.full.d.ts +0 -2
- package/lib/lib.es2022.intl.d.ts +0 -2
- package/lib/lib.es2022.object.d.ts +0 -2
- package/lib/lib.es2022.regexp.d.ts +0 -2
- package/lib/lib.es2022.sharedmemory.d.ts +0 -2
- package/lib/lib.es2022.string.d.ts +0 -2
- package/lib/lib.es2023.array.d.ts +0 -2
- package/lib/lib.es2023.d.ts +0 -2
- package/lib/lib.es2023.full.d.ts +0 -2
- package/lib/lib.es5.d.ts +0 -2
- package/lib/lib.es6.d.ts +0 -2
- package/lib/lib.esnext.d.ts +0 -2
- package/lib/lib.esnext.full.d.ts +0 -2
- package/lib/lib.esnext.intl.d.ts +0 -2
- package/lib/lib.scripthost.d.ts +0 -2
- package/lib/lib.webworker.d.ts +0 -2
- package/lib/lib.webworker.importscripts.d.ts +0 -2
- package/lib/lib.webworker.iterable.d.ts +0 -2
- package/lib/tsc.js +43 -23
- package/lib/tsserver.js +44 -25
- package/lib/tsserverlibrary.js +45 -33
- package/lib/typescript.js +45 -33
- package/lib/typingsInstaller.js +11 -7
- package/package.json +1 -1
|
@@ -14,10 +14,8 @@ and limitations under the License.
|
|
|
14
14
|
***************************************************************************** */
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
/// <reference no-default-lib="true"/>
|
|
19
18
|
|
|
20
|
-
|
|
21
19
|
interface String {
|
|
22
20
|
/**
|
|
23
21
|
* Replace all instances of a substring in a string, using a regular expression or search string.
|
|
@@ -14,10 +14,8 @@ and limitations under the License.
|
|
|
14
14
|
***************************************************************************** */
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
/// <reference no-default-lib="true"/>
|
|
19
18
|
|
|
20
|
-
|
|
21
19
|
interface WeakRef<T extends object> {
|
|
22
20
|
readonly [Symbol.toStringTag]: "WeakRef";
|
|
23
21
|
|
|
@@ -14,10 +14,8 @@ and limitations under the License.
|
|
|
14
14
|
***************************************************************************** */
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
/// <reference no-default-lib="true"/>
|
|
19
18
|
|
|
20
|
-
|
|
21
19
|
interface Array<T> {
|
|
22
20
|
/**
|
|
23
21
|
* Returns the item located at the specified index.
|
package/lib/lib.es2022.d.ts
CHANGED
|
@@ -14,10 +14,8 @@ and limitations under the License.
|
|
|
14
14
|
***************************************************************************** */
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
/// <reference no-default-lib="true"/>
|
|
19
18
|
|
|
20
|
-
|
|
21
19
|
/// <reference lib="es2021" />
|
|
22
20
|
/// <reference lib="es2022.array" />
|
|
23
21
|
/// <reference lib="es2022.error" />
|
package/lib/lib.es2022.full.d.ts
CHANGED
|
@@ -14,10 +14,8 @@ and limitations under the License.
|
|
|
14
14
|
***************************************************************************** */
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
/// <reference no-default-lib="true"/>
|
|
19
18
|
|
|
20
|
-
|
|
21
19
|
/// <reference lib="es2022" />
|
|
22
20
|
/// <reference lib="dom" />
|
|
23
21
|
/// <reference lib="webworker.importscripts" />
|
package/lib/lib.es2022.intl.d.ts
CHANGED
|
@@ -14,10 +14,8 @@ and limitations under the License.
|
|
|
14
14
|
***************************************************************************** */
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
/// <reference no-default-lib="true"/>
|
|
19
18
|
|
|
20
|
-
|
|
21
19
|
interface ObjectConstructor {
|
|
22
20
|
/**
|
|
23
21
|
* Determines whether an object has a property with the specified name.
|
|
@@ -14,10 +14,8 @@ and limitations under the License.
|
|
|
14
14
|
***************************************************************************** */
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
/// <reference no-default-lib="true"/>
|
|
19
18
|
|
|
20
|
-
|
|
21
19
|
interface Atomics {
|
|
22
20
|
/**
|
|
23
21
|
* A non-blocking, asynchronous version of wait which is usable on the main thread.
|
|
@@ -14,10 +14,8 @@ and limitations under the License.
|
|
|
14
14
|
***************************************************************************** */
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
/// <reference no-default-lib="true"/>
|
|
19
18
|
|
|
20
|
-
|
|
21
19
|
interface String {
|
|
22
20
|
/**
|
|
23
21
|
* Returns a new String consisting of the single UTF-16 code unit located at the specified index.
|
|
@@ -14,10 +14,8 @@ and limitations under the License.
|
|
|
14
14
|
***************************************************************************** */
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
/// <reference no-default-lib="true"/>
|
|
19
18
|
|
|
20
|
-
|
|
21
19
|
interface Array<T> {
|
|
22
20
|
/**
|
|
23
21
|
* Returns the value of the last element in the array where predicate is true, and undefined
|
package/lib/lib.es2023.d.ts
CHANGED
package/lib/lib.es2023.full.d.ts
CHANGED
|
@@ -14,10 +14,8 @@ and limitations under the License.
|
|
|
14
14
|
***************************************************************************** */
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
/// <reference no-default-lib="true"/>
|
|
19
18
|
|
|
20
|
-
|
|
21
19
|
/// <reference lib="es2023" />
|
|
22
20
|
/// <reference lib="dom" />
|
|
23
21
|
/// <reference lib="webworker.importscripts" />
|
package/lib/lib.es5.d.ts
CHANGED
|
@@ -14,10 +14,8 @@ and limitations under the License.
|
|
|
14
14
|
***************************************************************************** */
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
/// <reference no-default-lib="true"/>
|
|
19
18
|
|
|
20
|
-
|
|
21
19
|
/// <reference lib="decorators" />
|
|
22
20
|
/// <reference lib="decorators.legacy" />
|
|
23
21
|
|
package/lib/lib.es6.d.ts
CHANGED
|
@@ -14,10 +14,8 @@ and limitations under the License.
|
|
|
14
14
|
***************************************************************************** */
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
/// <reference no-default-lib="true"/>
|
|
19
18
|
|
|
20
|
-
|
|
21
19
|
/// <reference lib="es2015" />
|
|
22
20
|
/// <reference lib="dom" />
|
|
23
21
|
/// <reference lib="dom.iterable" />
|
package/lib/lib.esnext.d.ts
CHANGED
package/lib/lib.esnext.full.d.ts
CHANGED
|
@@ -14,10 +14,8 @@ and limitations under the License.
|
|
|
14
14
|
***************************************************************************** */
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
/// <reference no-default-lib="true"/>
|
|
19
18
|
|
|
20
|
-
|
|
21
19
|
/// <reference lib="esnext" />
|
|
22
20
|
/// <reference lib="dom" />
|
|
23
21
|
/// <reference lib="webworker.importscripts" />
|
package/lib/lib.esnext.intl.d.ts
CHANGED
|
@@ -14,10 +14,8 @@ and limitations under the License.
|
|
|
14
14
|
***************************************************************************** */
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
/// <reference no-default-lib="true"/>
|
|
19
18
|
|
|
20
|
-
|
|
21
19
|
declare namespace Intl {
|
|
22
20
|
interface NumberRangeFormatPart extends NumberFormatPart {
|
|
23
21
|
source: "startRange" | "endRange" | "shared"
|
package/lib/lib.scripthost.d.ts
CHANGED
|
@@ -14,12 +14,10 @@ and limitations under the License.
|
|
|
14
14
|
***************************************************************************** */
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
/// <reference no-default-lib="true"/>
|
|
19
18
|
|
|
20
19
|
|
|
21
20
|
|
|
22
|
-
|
|
23
21
|
/////////////////////////////
|
|
24
22
|
/// Windows Script Host APIS
|
|
25
23
|
/////////////////////////////
|
package/lib/lib.webworker.d.ts
CHANGED
|
@@ -14,10 +14,8 @@ and limitations under the License.
|
|
|
14
14
|
***************************************************************************** */
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
/// <reference no-default-lib="true"/>
|
|
19
18
|
|
|
20
|
-
|
|
21
19
|
/////////////////////////////
|
|
22
20
|
/// Worker APIs
|
|
23
21
|
/////////////////////////////
|
|
@@ -14,11 +14,9 @@ and limitations under the License.
|
|
|
14
14
|
***************************************************************************** */
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
/// <reference no-default-lib="true"/>
|
|
19
18
|
|
|
20
19
|
|
|
21
|
-
|
|
22
20
|
/////////////////////////////
|
|
23
21
|
/// WorkerGlobalScope APIs
|
|
24
22
|
/////////////////////////////
|
|
@@ -14,10 +14,8 @@ and limitations under the License.
|
|
|
14
14
|
***************************************************************************** */
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
/// <reference no-default-lib="true"/>
|
|
19
18
|
|
|
20
|
-
|
|
21
19
|
/////////////////////////////
|
|
22
20
|
/// Worker Iterable APIs
|
|
23
21
|
/////////////////////////////
|
package/lib/tsc.js
CHANGED
|
@@ -23,7 +23,7 @@ var __export = (target, all) => {
|
|
|
23
23
|
|
|
24
24
|
// src/compiler/corePublic.ts
|
|
25
25
|
var versionMajorMinor = "5.0";
|
|
26
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
26
|
+
var version = `${versionMajorMinor}.0-insiders.20230201`;
|
|
27
27
|
|
|
28
28
|
// src/compiler/core.ts
|
|
29
29
|
var emptyArray = [];
|
|
@@ -2769,6 +2769,9 @@ function mark(markName) {
|
|
|
2769
2769
|
counts.set(markName, count + 1);
|
|
2770
2770
|
marks.set(markName, timestamp());
|
|
2771
2771
|
performanceImpl == null ? void 0 : performanceImpl.mark(markName);
|
|
2772
|
+
if (typeof onProfilerEvent === "function") {
|
|
2773
|
+
onProfilerEvent(markName);
|
|
2774
|
+
}
|
|
2772
2775
|
}
|
|
2773
2776
|
}
|
|
2774
2777
|
function measure(measureName, startMarkName, endMarkName) {
|
|
@@ -6048,7 +6051,6 @@ var Diagnostics = {
|
|
|
6048
6051
|
Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here: diag(1339, 1 /* 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."),
|
|
6049
6052
|
Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0: diag(1340, 1 /* 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}')'?"),
|
|
6050
6053
|
Class_constructor_may_not_be_an_accessor: diag(1341, 1 /* Error */, "Class_constructor_may_not_be_an_accessor_1341", "Class constructor may not be an accessor."),
|
|
6051
|
-
Type_arguments_cannot_be_used_here: diag(1342, 1 /* Error */, "Type_arguments_cannot_be_used_here_1342", "Type arguments cannot be used here."),
|
|
6052
6054
|
The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext: diag(1343, 1 /* 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', 'node16', or 'nodenext'."),
|
|
6053
6055
|
A_label_is_not_allowed_here: diag(1344, 1 /* Error */, "A_label_is_not_allowed_here_1344", "'A label is not allowed here."),
|
|
6054
6056
|
An_expression_of_type_void_cannot_be_tested_for_truthiness: diag(1345, 1 /* Error */, "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345", "An expression of type 'void' cannot be tested for truthiness."),
|
|
@@ -6694,7 +6696,7 @@ var Diagnostics = {
|
|
|
6694
6696
|
Private_accessor_was_defined_without_a_getter: diag(2806, 1 /* Error */, "Private_accessor_was_defined_without_a_getter_2806", "Private accessor was defined without a getter."),
|
|
6695
6697
|
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: diag(2807, 1 /* 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}'."),
|
|
6696
6698
|
A_get_accessor_must_be_at_least_as_accessible_as_the_setter: diag(2808, 1 /* 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"),
|
|
6697
|
-
|
|
6699
|
+
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_whole_assignment_in_parentheses: diag(2809, 1 /* 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 whole assignment in parentheses."),
|
|
6698
6700
|
Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments: diag(2810, 1 /* Error */, "Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_2810", "Expected 1 argument, but got 0. 'new Promise()' needs a JSDoc hint to produce a 'resolve' that can be called without arguments."),
|
|
6699
6701
|
Initializer_for_property_0: diag(2811, 1 /* Error */, "Initializer_for_property_0_2811", "Initializer for property '{0}'"),
|
|
6700
6702
|
Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom: diag(2812, 1 /* 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'."),
|
|
@@ -6980,7 +6982,7 @@ var Diagnostics = {
|
|
|
6980
6982
|
Resolving_module_name_0_relative_to_base_url_1_2: diag(6094, 3 /* Message */, "Resolving_module_name_0_relative_to_base_url_1_2_6094", "Resolving module name '{0}' relative to base url '{1}' - '{2}'."),
|
|
6981
6983
|
Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1: diag(6095, 3 /* Message */, "Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1_6095", "Loading module as file / folder, candidate module location '{0}', target file types: {1}."),
|
|
6982
6984
|
File_0_does_not_exist: diag(6096, 3 /* Message */, "File_0_does_not_exist_6096", "File '{0}' does not exist."),
|
|
6983
|
-
|
|
6985
|
+
File_0_exists_use_it_as_a_name_resolution_result: diag(6097, 3 /* Message */, "File_0_exists_use_it_as_a_name_resolution_result_6097", "File '{0}' exists - use it as a name resolution result."),
|
|
6984
6986
|
Loading_module_0_from_node_modules_folder_target_file_types_Colon_1: diag(6098, 3 /* Message */, "Loading_module_0_from_node_modules_folder_target_file_types_Colon_1_6098", "Loading module '{0}' from 'node_modules' folder, target file types: {1}."),
|
|
6985
6987
|
Found_package_json_at_0: diag(6099, 3 /* Message */, "Found_package_json_at_0_6099", "Found 'package.json' at '{0}'."),
|
|
6986
6988
|
package_json_does_not_have_a_0_field: diag(6100, 3 /* Message */, "package_json_does_not_have_a_0_field_6100", "'package.json' does not have a '{0}' field."),
|
|
@@ -7432,6 +7434,7 @@ var Diagnostics = {
|
|
|
7432
7434
|
new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type: diag(7009, 1 /* 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."),
|
|
7433
7435
|
_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type: diag(7010, 1 /* 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."),
|
|
7434
7436
|
Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: diag(7011, 1 /* 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."),
|
|
7437
|
+
This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation: diag(7012, 1 /* Error */, "This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation_7012", "This overload implicitly returns the type '{0}' because it lacks a return type annotation."),
|
|
7435
7438
|
Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: diag(7013, 1 /* 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."),
|
|
7436
7439
|
Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: diag(7014, 1 /* 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."),
|
|
7437
7440
|
Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number: diag(7015, 1 /* 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'."),
|
|
@@ -16496,7 +16499,7 @@ function rangeOfNode(node) {
|
|
|
16496
16499
|
}
|
|
16497
16500
|
function rangeOfTypeParameters(sourceFile, typeParameters) {
|
|
16498
16501
|
const pos = typeParameters.pos - 1;
|
|
16499
|
-
const end = skipTrivia(sourceFile.text, typeParameters.end) + 1;
|
|
16502
|
+
const end = Math.min(sourceFile.text.length, skipTrivia(sourceFile.text, typeParameters.end) + 1);
|
|
16500
16503
|
return { pos, end };
|
|
16501
16504
|
}
|
|
16502
16505
|
function skipTypeChecking(sourceFile, options, host) {
|
|
@@ -28564,6 +28567,7 @@ var Parser;
|
|
|
28564
28567
|
switch (fourth) {
|
|
28565
28568
|
case 63 /* EqualsToken */:
|
|
28566
28569
|
case 31 /* GreaterThanToken */:
|
|
28570
|
+
case 43 /* SlashToken */:
|
|
28567
28571
|
return false;
|
|
28568
28572
|
default:
|
|
28569
28573
|
return true;
|
|
@@ -29618,7 +29622,7 @@ var Parser;
|
|
|
29618
29622
|
parseExpectedMatchingBrackets(18 /* OpenBraceToken */, 19 /* CloseBraceToken */, openBraceParsed, openBracePosition);
|
|
29619
29623
|
const result = withJSDoc(finishNode(factory2.createBlock(statements, multiLine), pos), hasJSDoc);
|
|
29620
29624
|
if (token() === 63 /* EqualsToken */) {
|
|
29621
|
-
parseErrorAtCurrentToken(Diagnostics.
|
|
29625
|
+
parseErrorAtCurrentToken(Diagnostics.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_whole_assignment_in_parentheses);
|
|
29622
29626
|
nextToken();
|
|
29623
29627
|
}
|
|
29624
29628
|
return result;
|
|
@@ -37271,7 +37275,7 @@ function tryFileLookup(fileName, onlyRecordFailures, state) {
|
|
|
37271
37275
|
if (!onlyRecordFailures) {
|
|
37272
37276
|
if (state.host.fileExists(fileName)) {
|
|
37273
37277
|
if (state.traceEnabled) {
|
|
37274
|
-
trace(state.host, Diagnostics.
|
|
37278
|
+
trace(state.host, Diagnostics.File_0_exists_use_it_as_a_name_resolution_result, fileName);
|
|
37275
37279
|
}
|
|
37276
37280
|
return fileName;
|
|
37277
37281
|
} else {
|
|
@@ -41828,8 +41832,10 @@ function tryGetModuleNameAsNodeModule({ path, isRedirect }, { getCanonicalFileNa
|
|
|
41828
41832
|
const packageJsonContent = (cachedPackageJson == null ? void 0 : cachedPackageJson.contents.packageJsonContent) || JSON.parse(host.readFile(packageJsonPath));
|
|
41829
41833
|
const importMode = overrideMode || importingSourceFile.impliedNodeFormat;
|
|
41830
41834
|
if (getResolvePackageJsonExports(options)) {
|
|
41835
|
+
const nodeModulesDirectoryName2 = packageRootPath.substring(parts.topLevelPackageNameIndex + 1);
|
|
41836
|
+
const packageName2 = getPackageNameFromTypesPackageName(nodeModulesDirectoryName2);
|
|
41831
41837
|
const conditions = getConditions(options, importMode === 99 /* ESNext */);
|
|
41832
|
-
const fromExports = packageJsonContent.exports
|
|
41838
|
+
const fromExports = packageJsonContent.exports ? tryGetModuleNameFromExports(options, path, packageRootPath, packageName2, packageJsonContent.exports, conditions) : void 0;
|
|
41833
41839
|
if (fromExports) {
|
|
41834
41840
|
const withJsExtension = !hasTSFileExtension(fromExports.moduleFileToTry) ? fromExports : { moduleFileToTry: removeFileExtension(fromExports.moduleFileToTry) + tryGetJSExtensionForFile(fromExports.moduleFileToTry, options) };
|
|
41835
41841
|
return { ...withJsExtension, verbatimFromExports: true };
|
|
@@ -53590,6 +53596,12 @@ function createTypeChecker(host) {
|
|
|
53590
53596
|
thisParameter = getAnnotatedAccessorThisParameter(other);
|
|
53591
53597
|
}
|
|
53592
53598
|
}
|
|
53599
|
+
if (isInJSFile(declaration)) {
|
|
53600
|
+
const thisTag = getJSDocThisTag(declaration);
|
|
53601
|
+
if (thisTag && thisTag.typeExpression) {
|
|
53602
|
+
thisParameter = createSymbolWithType(createSymbol(1 /* FunctionScopedVariable */, "this" /* This */), getTypeFromTypeNode(thisTag.typeExpression));
|
|
53603
|
+
}
|
|
53604
|
+
}
|
|
53593
53605
|
const classType = declaration.kind === 173 /* Constructor */ ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : void 0;
|
|
53594
53606
|
const typeParameters = classType ? classType.localTypeParameters : getTypeParametersFromDeclaration(declaration);
|
|
53595
53607
|
if (hasRestParameter(declaration) || isInJSFile(declaration) && maybeAddJsSyntheticRestParameter(declaration, parameters)) {
|
|
@@ -53703,7 +53715,11 @@ function createTypeChecker(host) {
|
|
|
53703
53715
|
if (node.tags) {
|
|
53704
53716
|
for (const tag of node.tags) {
|
|
53705
53717
|
if (isJSDocOverloadTag(tag)) {
|
|
53706
|
-
|
|
53718
|
+
const jsDocSignature = tag.typeExpression;
|
|
53719
|
+
if (jsDocSignature.type === void 0) {
|
|
53720
|
+
reportImplicitAny(jsDocSignature, anyType);
|
|
53721
|
+
}
|
|
53722
|
+
result.push(getSignatureFromDeclaration(jsDocSignature));
|
|
53707
53723
|
hasJSDocOverloads = true;
|
|
53708
53724
|
}
|
|
53709
53725
|
}
|
|
@@ -56591,11 +56607,6 @@ function createTypeChecker(host) {
|
|
|
56591
56607
|
var _a2;
|
|
56592
56608
|
const links = getNodeLinks(node);
|
|
56593
56609
|
if (!links.resolvedType) {
|
|
56594
|
-
if (node.isTypeOf && node.typeArguments) {
|
|
56595
|
-
error(node, Diagnostics.Type_arguments_cannot_be_used_here);
|
|
56596
|
-
links.resolvedSymbol = unknownSymbol;
|
|
56597
|
-
return links.resolvedType = errorType;
|
|
56598
|
-
}
|
|
56599
56610
|
if (!isLiteralImportTypeNode(node)) {
|
|
56600
56611
|
error(node.argument, Diagnostics.String_literal_expected);
|
|
56601
56612
|
links.resolvedSymbol = unknownSymbol;
|
|
@@ -56656,7 +56667,7 @@ function createTypeChecker(host) {
|
|
|
56656
56667
|
const resolvedSymbol = resolveSymbol(symbol);
|
|
56657
56668
|
links.resolvedSymbol = resolvedSymbol;
|
|
56658
56669
|
if (meaning === 111551 /* Value */) {
|
|
56659
|
-
return getTypeOfSymbol(symbol);
|
|
56670
|
+
return getInstantiationExpressionType(getTypeOfSymbol(symbol), node);
|
|
56660
56671
|
} else {
|
|
56661
56672
|
const type = tryGetDeclaredTypeOfSymbol(resolvedSymbol);
|
|
56662
56673
|
const typeParameters = type && getTypeParametersForTypeAndSymbol(type, resolvedSymbol);
|
|
@@ -58734,7 +58745,8 @@ function createTypeChecker(host) {
|
|
|
58734
58745
|
Debug.assert(!isTypeAssignableTo(generalizedSource, target2), "generalized source shouldn't be assignable");
|
|
58735
58746
|
generalizedSourceType = getTypeNameForErrorDisplay(generalizedSource);
|
|
58736
58747
|
}
|
|
58737
|
-
|
|
58748
|
+
const targetFlags = target2.flags & 8388608 /* IndexedAccess */ && !(source2.flags & 8388608 /* IndexedAccess */) ? target2.objectType.flags : target2.flags;
|
|
58749
|
+
if (targetFlags & 262144 /* TypeParameter */ && target2 !== markerSuperTypeForCheck && target2 !== markerSubTypeForCheck) {
|
|
58738
58750
|
const constraint = getBaseConstraintOfType(target2);
|
|
58739
58751
|
let needsOriginalSource;
|
|
58740
58752
|
if (constraint && (isTypeAssignableTo(generalizedSource, constraint) || (needsOriginalSource = isTypeAssignableTo(source2, constraint)))) {
|
|
@@ -61652,6 +61664,11 @@ function createTypeChecker(host) {
|
|
|
61652
61664
|
case 320 /* JSDocFunctionType */:
|
|
61653
61665
|
error(declaration, Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString);
|
|
61654
61666
|
return;
|
|
61667
|
+
case 326 /* JSDocSignature */:
|
|
61668
|
+
if (noImplicitAny && isJSDocOverloadTag(declaration.parent)) {
|
|
61669
|
+
error(declaration.parent.tagName, Diagnostics.This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation, typeAsString);
|
|
61670
|
+
}
|
|
61671
|
+
return;
|
|
61655
61672
|
case 259 /* FunctionDeclaration */:
|
|
61656
61673
|
case 171 /* MethodDeclaration */:
|
|
61657
61674
|
case 170 /* MethodSignature */:
|
|
@@ -63904,7 +63921,7 @@ function createTypeChecker(host) {
|
|
|
63904
63921
|
}
|
|
63905
63922
|
return declaredType;
|
|
63906
63923
|
}
|
|
63907
|
-
if (isVariableDeclaration(node) && node.parent.parent.kind === 246 /* ForInStatement */ && isMatchingReference(reference, node.parent.parent.expression)) {
|
|
63924
|
+
if (isVariableDeclaration(node) && node.parent.parent.kind === 246 /* ForInStatement */ && (isMatchingReference(reference, node.parent.parent.expression) || optionalChainContainsReference(node.parent.parent.expression, reference))) {
|
|
63908
63925
|
return getNonNullableTypeIfNeeded(finalizeEvolvingArrayType(getTypeFromFlowType(getTypeAtFlowNode(flow.antecedent))));
|
|
63909
63926
|
}
|
|
63910
63927
|
return void 0;
|
|
@@ -64454,7 +64471,7 @@ function createTypeChecker(host) {
|
|
|
64454
64471
|
return narrowTypeByLiteralExpression(type, literal, assumeTrue);
|
|
64455
64472
|
}
|
|
64456
64473
|
function narrowTypeByLiteralExpression(type, literal, assumeTrue) {
|
|
64457
|
-
return assumeTrue ? narrowTypeByTypeName(type, literal.text) :
|
|
64474
|
+
return assumeTrue ? narrowTypeByTypeName(type, literal.text) : getAdjustedTypeWithFacts(type, typeofNEFacts.get(literal.text) || 32768 /* TypeofNEHostObject */);
|
|
64458
64475
|
}
|
|
64459
64476
|
function narrowTypeBySwitchOptionalChainContainment(type, switchStatement, clauseStart, clauseEnd, clauseCheck) {
|
|
64460
64477
|
const everyClauseChecks = clauseStart !== clauseEnd && every(getSwitchClauseTypes(switchStatement).slice(clauseStart, clauseEnd), clauseCheck);
|
|
@@ -64739,7 +64756,7 @@ function createTypeChecker(host) {
|
|
|
64739
64756
|
}
|
|
64740
64757
|
}
|
|
64741
64758
|
function getTypeOfSymbolAtLocation(symbol, location) {
|
|
64742
|
-
symbol = symbol
|
|
64759
|
+
symbol = getExportSymbolOfValueSymbolIfExported(symbol);
|
|
64743
64760
|
if (location.kind === 79 /* Identifier */ || location.kind === 80 /* PrivateIdentifier */) {
|
|
64744
64761
|
if (isRightSideOfQualifiedNameOrPropertyAccess(location)) {
|
|
64745
64762
|
location = location.parent;
|
|
@@ -70379,6 +70396,9 @@ function createTypeChecker(host) {
|
|
|
70379
70396
|
checkGrammarExpressionWithTypeArguments(node);
|
|
70380
70397
|
forEach(node.typeArguments, checkSourceElement);
|
|
70381
70398
|
const exprType = node.kind === 230 /* ExpressionWithTypeArguments */ ? checkExpression(node.expression) : isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName);
|
|
70399
|
+
return getInstantiationExpressionType(exprType, node);
|
|
70400
|
+
}
|
|
70401
|
+
function getInstantiationExpressionType(exprType, node) {
|
|
70382
70402
|
const typeArguments = node.typeArguments;
|
|
70383
70403
|
if (exprType === silentNeverType || isErrorType(exprType) || !some(typeArguments)) {
|
|
70384
70404
|
return exprType;
|
|
@@ -78930,7 +78950,7 @@ function createTypeChecker(host) {
|
|
|
78930
78950
|
}
|
|
78931
78951
|
return node.parent.kind === 180 /* TypeReference */;
|
|
78932
78952
|
}
|
|
78933
|
-
function
|
|
78953
|
+
function isInNameOfExpressionWithTypeArguments(node) {
|
|
78934
78954
|
while (node.parent.kind === 208 /* PropertyAccessExpression */) {
|
|
78935
78955
|
node = node.parent;
|
|
78936
78956
|
}
|
|
@@ -79040,10 +79060,10 @@ function createTypeChecker(host) {
|
|
|
79040
79060
|
while (isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName(name)) {
|
|
79041
79061
|
name = name.parent;
|
|
79042
79062
|
}
|
|
79043
|
-
if (
|
|
79063
|
+
if (isInNameOfExpressionWithTypeArguments(name)) {
|
|
79044
79064
|
let meaning = 0 /* None */;
|
|
79045
79065
|
if (name.parent.kind === 230 /* ExpressionWithTypeArguments */) {
|
|
79046
|
-
meaning = 788968 /* Type */;
|
|
79066
|
+
meaning = isPartOfTypeNode(name) ? 788968 /* Type */ : 111551 /* Value */;
|
|
79047
79067
|
if (isExpressionWithTypeArgumentsInClassExtendsClause(name.parent)) {
|
|
79048
79068
|
meaning |= 111551 /* Value */;
|
|
79049
79069
|
}
|
|
@@ -83310,7 +83330,7 @@ var visitEachChildTable = {
|
|
|
83310
83330
|
[291 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
83311
83331
|
return context.factory.updateJsxExpression(
|
|
83312
83332
|
node,
|
|
83313
|
-
|
|
83333
|
+
nodeVisitor(node.expression, visitor, isExpression)
|
|
83314
83334
|
);
|
|
83315
83335
|
},
|
|
83316
83336
|
// Clauses
|