typescript 5.0.0-dev.20221216 → 5.0.0-dev.20221218
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/tsc.js +118 -117
- package/lib/tsserver.js +143 -114
- package/lib/tsserverlibrary.js +143 -114
- package/lib/typescript.js +143 -114
- package/lib/typingsInstaller.js +11 -8
- package/package.json +1 -1
package/lib/typingsInstaller.js
CHANGED
|
@@ -50,7 +50,7 @@ var path = __toESM(require("path"));
|
|
|
50
50
|
|
|
51
51
|
// src/compiler/corePublic.ts
|
|
52
52
|
var versionMajorMinor = "5.0";
|
|
53
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
53
|
+
var version = `${versionMajorMinor}.0-dev.20221218`;
|
|
54
54
|
|
|
55
55
|
// src/compiler/core.ts
|
|
56
56
|
var emptyArray = [];
|
|
@@ -5250,6 +5250,7 @@ var Diagnostics = {
|
|
|
5250
5250
|
_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias: diag(1274, 1 /* Error */, "_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias_1274", "'{0}' modifier can only appear on a type parameter of a class, interface or type alias"),
|
|
5251
5251
|
accessor_modifier_can_only_appear_on_a_property_declaration: diag(1275, 1 /* Error */, "accessor_modifier_can_only_appear_on_a_property_declaration_1275", "'accessor' modifier can only appear on a property declaration."),
|
|
5252
5252
|
An_accessor_property_cannot_be_declared_optional: diag(1276, 1 /* Error */, "An_accessor_property_cannot_be_declared_optional_1276", "An 'accessor' property cannot be declared optional."),
|
|
5253
|
+
_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class: diag(1277, 1 /* Error */, "_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class_1277", "'{0}' modifier can only appear on a type parameter of a function, method or class"),
|
|
5253
5254
|
with_statements_are_not_allowed_in_an_async_function_block: diag(1300, 1 /* Error */, "with_statements_are_not_allowed_in_an_async_function_block_1300", "'with' statements are not allowed in an async function block."),
|
|
5254
5255
|
await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(1308, 1 /* 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."),
|
|
5255
5256
|
The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level: diag(1309, 1 /* Error */, "The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309", "The current file is a CommonJS module and cannot use 'await' at the top level."),
|
|
@@ -17949,6 +17950,7 @@ var forEachChildTable = {
|
|
|
17949
17950
|
[346 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag,
|
|
17950
17951
|
[343 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag,
|
|
17951
17952
|
[352 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag,
|
|
17953
|
+
[342 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag,
|
|
17952
17954
|
[326 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) {
|
|
17953
17955
|
return forEach(node.typeParameters, cbNode) || forEach(node.parameters, cbNode) || visitNode2(cbNode, node.type);
|
|
17954
17956
|
},
|
|
@@ -19019,7 +19021,7 @@ var Parser;
|
|
|
19019
19021
|
case ParsingContext.ArrayBindingElements:
|
|
19020
19022
|
return token() === 27 /* CommaToken */ || token() === 25 /* DotDotDotToken */ || isBindingIdentifierOrPrivateIdentifierOrPattern();
|
|
19021
19023
|
case ParsingContext.TypeParameters:
|
|
19022
|
-
return token() === 101 /* InKeyword */ || isIdentifier2();
|
|
19024
|
+
return token() === 101 /* InKeyword */ || token() === 85 /* ConstKeyword */ || isIdentifier2();
|
|
19023
19025
|
case ParsingContext.ArrayLiteralMembers:
|
|
19024
19026
|
switch (token()) {
|
|
19025
19027
|
case 27 /* CommaToken */:
|
|
@@ -19724,7 +19726,7 @@ var Parser;
|
|
|
19724
19726
|
}
|
|
19725
19727
|
function parseTypeParameter() {
|
|
19726
19728
|
const pos = getNodePos();
|
|
19727
|
-
const modifiers = parseModifiers();
|
|
19729
|
+
const modifiers = parseModifiers(true);
|
|
19728
19730
|
const name = parseIdentifier();
|
|
19729
19731
|
let constraint;
|
|
19730
19732
|
let expression;
|
|
@@ -20687,11 +20689,12 @@ var Parser;
|
|
|
20687
20689
|
return Tristate.False;
|
|
20688
20690
|
} else {
|
|
20689
20691
|
Debug.assert(first2 === 29 /* LessThanToken */);
|
|
20690
|
-
if (!isIdentifier2()) {
|
|
20692
|
+
if (!isIdentifier2() && token() !== 85 /* ConstKeyword */) {
|
|
20691
20693
|
return Tristate.False;
|
|
20692
20694
|
}
|
|
20693
20695
|
if (languageVariant === 1 /* JSX */) {
|
|
20694
20696
|
const isArrowFunctionInJsx = lookAhead(() => {
|
|
20697
|
+
parseOptional(85 /* ConstKeyword */);
|
|
20695
20698
|
const third = nextToken();
|
|
20696
20699
|
if (third === 94 /* ExtendsKeyword */) {
|
|
20697
20700
|
const fourth = nextToken();
|
|
@@ -22414,10 +22417,10 @@ var Parser;
|
|
|
22414
22417
|
}
|
|
22415
22418
|
return list && createNodeArray(list, pos);
|
|
22416
22419
|
}
|
|
22417
|
-
function tryParseModifier(
|
|
22420
|
+
function tryParseModifier(permitConstAsModifier, stopOnStartOfClassStaticBlock, hasSeenStaticModifier) {
|
|
22418
22421
|
const pos = getNodePos();
|
|
22419
22422
|
const kind = token();
|
|
22420
|
-
if (token() === 85 /* ConstKeyword */ &&
|
|
22423
|
+
if (token() === 85 /* ConstKeyword */ && permitConstAsModifier) {
|
|
22421
22424
|
if (!tryParse(nextTokenIsOnSameLineAndCanFollowModifier)) {
|
|
22422
22425
|
return void 0;
|
|
22423
22426
|
}
|
|
@@ -22441,10 +22444,10 @@ var Parser;
|
|
|
22441
22444
|
setTextRangePosEnd(decoratorsAndModifiers, decorators.pos, modifiers.end);
|
|
22442
22445
|
return decoratorsAndModifiers;
|
|
22443
22446
|
}
|
|
22444
|
-
function parseModifiers(
|
|
22447
|
+
function parseModifiers(permitConstAsModifier, stopOnStartOfClassStaticBlock) {
|
|
22445
22448
|
const pos = getNodePos();
|
|
22446
22449
|
let list, modifier, hasSeenStatic = false;
|
|
22447
|
-
while (modifier = tryParseModifier(
|
|
22450
|
+
while (modifier = tryParseModifier(permitConstAsModifier, stopOnStartOfClassStaticBlock, hasSeenStatic)) {
|
|
22448
22451
|
if (modifier.kind === 124 /* StaticKeyword */)
|
|
22449
22452
|
hasSeenStatic = true;
|
|
22450
22453
|
list = append(list, modifier);
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "typescript",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.0.0-dev.
|
|
5
|
+
"version": "5.0.0-dev.20221218",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|