Skip to content

Commit c83054c

Browse files
committed
Merge branch 'release-1.5' into filterTranspileDiagnostics
2 parents 2cbe14e + a10cd1e commit c83054c

File tree

78 files changed

+492
-60
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+492
-60
lines changed

bin/tsc.js

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,6 +1092,7 @@ var ts;
10921092
Type_expected_0_is_a_reserved_word_in_strict_mode: { code: 1215, category: ts.DiagnosticCategory.Error, key: "Type expected. '{0}' is a reserved word in strict mode" },
10931093
Type_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: { code: 1216, category: ts.DiagnosticCategory.Error, key: "Type expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode." },
10941094
Export_assignment_is_not_supported_when_module_flag_is_system: { code: 1218, category: ts.DiagnosticCategory.Error, key: "Export assignment is not supported when '--module' flag is 'system'." },
1095+
Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Specify_experimentalDecorators_to_remove_this_warning: { code: 1219, category: ts.DiagnosticCategory.Error, key: "Experimental support for decorators is a feature that is subject to change in a future release. Specify '--experimentalDecorators' to remove this warning." },
10951096
Duplicate_identifier_0: { code: 2300, category: ts.DiagnosticCategory.Error, key: "Duplicate identifier '{0}'." },
10961097
Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: ts.DiagnosticCategory.Error, key: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." },
10971098
Static_members_cannot_reference_class_type_parameters: { code: 2302, category: ts.DiagnosticCategory.Error, key: "Static members cannot reference class type parameters." },
@@ -1425,6 +1426,9 @@ var ts;
14251426
Specifies_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix: { code: 6060, category: ts.DiagnosticCategory.Message, key: "Specifies the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)." },
14261427
NEWLINE: { code: 6061, category: ts.DiagnosticCategory.Message, key: "NEWLINE" },
14271428
Argument_for_newLine_option_must_be_CRLF_or_LF: { code: 6062, category: ts.DiagnosticCategory.Error, key: "Argument for '--newLine' option must be 'CRLF' or 'LF'." },
1429+
Option_experimentalDecorators_must_also_be_specified_when_option_emitDecoratorMetadata_is_specified: { code: 6064, category: ts.DiagnosticCategory.Error, key: "Option 'experimentalDecorators' must also be specified when option 'emitDecoratorMetadata' is specified." },
1430+
Enables_experimental_support_for_ES7_decorators: { code: 6065, category: ts.DiagnosticCategory.Message, key: "Enables experimental support for ES7 decorators." },
1431+
Enables_experimental_support_for_emitting_type_metadata_for_decorators: { code: 6066, category: ts.DiagnosticCategory.Message, key: "Enables experimental support for emitting type metadata for decorators." },
14281432
Variable_0_implicitly_has_an_1_type: { code: 7005, category: ts.DiagnosticCategory.Error, key: "Variable '{0}' implicitly has an '{1}' type." },
14291433
Parameter_0_implicitly_has_an_1_type: { code: 7006, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' implicitly has an '{1}' type." },
14301434
Member_0_implicitly_has_an_1_type: { code: 7008, category: ts.DiagnosticCategory.Error, key: "Member '{0}' implicitly has an '{1}' type." },
@@ -8888,27 +8892,31 @@ var ts;
88888892
case 138:
88898893
case 201:
88908894
case 164:
8891-
if (name === "arguments") {
8895+
if (meaning & 3 && name === "arguments") {
88928896
result = argumentsSymbol;
88938897
break loop;
88948898
}
88958899
break;
88968900
case 163:
8897-
if (name === "arguments") {
8901+
if (meaning & 3 && name === "arguments") {
88988902
result = argumentsSymbol;
88998903
break loop;
89008904
}
8901-
var functionName = location.name;
8902-
if (functionName && name === functionName.text) {
8903-
result = location.symbol;
8904-
break loop;
8905+
if (meaning & 16) {
8906+
var functionName = location.name;
8907+
if (functionName && name === functionName.text) {
8908+
result = location.symbol;
8909+
break loop;
8910+
}
89058911
}
89068912
break;
89078913
case 175:
8908-
var className = location.name;
8909-
if (className && name === className.text) {
8910-
result = location.symbol;
8911-
break loop;
8914+
if (meaning & 32) {
8915+
var className = location.name;
8916+
if (className && name === className.text) {
8917+
result = location.symbol;
8918+
break loop;
8919+
}
89128920
}
89138921
break;
89148922
case 131:
@@ -15586,6 +15594,9 @@ var ts;
1558615594
if (!ts.nodeCanBeDecorated(node)) {
1558715595
return;
1558815596
}
15597+
if (!compilerOptions.experimentalDecorators) {
15598+
error(node, ts.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Specify_experimentalDecorators_to_remove_this_warning);
15599+
}
1558915600
if (compilerOptions.emitDecoratorMetadata) {
1559015601
switch (node.kind) {
1559115602
case 202:
@@ -25547,6 +25558,10 @@ var ts;
2554725558
diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_noEmit_cannot_be_specified_with_option_declaration));
2554825559
}
2554925560
}
25561+
if (options.emitDecoratorMetadata &&
25562+
!options.experimentalDecorators) {
25563+
diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_experimentalDecorators_must_also_be_specified_when_option_emitDecoratorMetadata_is_specified));
25564+
}
2555025565
}
2555125566
}
2555225567
ts.createProgram = createProgram;
@@ -25740,10 +25755,16 @@ var ts;
2574025755
type: "boolean",
2574125756
description: ts.Diagnostics.Watch_input_files
2574225757
},
25758+
{
25759+
name: "experimentalDecorators",
25760+
type: "boolean",
25761+
description: ts.Diagnostics.Enables_experimental_support_for_ES7_decorators
25762+
},
2574325763
{
2574425764
name: "emitDecoratorMetadata",
2574525765
type: "boolean",
25746-
experimental: true
25766+
experimental: true,
25767+
description: ts.Diagnostics.Enables_experimental_support_for_emitting_type_metadata_for_decorators
2574725768
}
2574825769
];
2574925770
function parseCommandLine(commandLine) {

bin/tsserver.js

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,6 +1092,7 @@ var ts;
10921092
Type_expected_0_is_a_reserved_word_in_strict_mode: { code: 1215, category: ts.DiagnosticCategory.Error, key: "Type expected. '{0}' is a reserved word in strict mode" },
10931093
Type_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: { code: 1216, category: ts.DiagnosticCategory.Error, key: "Type expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode." },
10941094
Export_assignment_is_not_supported_when_module_flag_is_system: { code: 1218, category: ts.DiagnosticCategory.Error, key: "Export assignment is not supported when '--module' flag is 'system'." },
1095+
Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Specify_experimentalDecorators_to_remove_this_warning: { code: 1219, category: ts.DiagnosticCategory.Error, key: "Experimental support for decorators is a feature that is subject to change in a future release. Specify '--experimentalDecorators' to remove this warning." },
10951096
Duplicate_identifier_0: { code: 2300, category: ts.DiagnosticCategory.Error, key: "Duplicate identifier '{0}'." },
10961097
Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: ts.DiagnosticCategory.Error, key: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." },
10971098
Static_members_cannot_reference_class_type_parameters: { code: 2302, category: ts.DiagnosticCategory.Error, key: "Static members cannot reference class type parameters." },
@@ -1425,6 +1426,9 @@ var ts;
14251426
Specifies_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix: { code: 6060, category: ts.DiagnosticCategory.Message, key: "Specifies the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)." },
14261427
NEWLINE: { code: 6061, category: ts.DiagnosticCategory.Message, key: "NEWLINE" },
14271428
Argument_for_newLine_option_must_be_CRLF_or_LF: { code: 6062, category: ts.DiagnosticCategory.Error, key: "Argument for '--newLine' option must be 'CRLF' or 'LF'." },
1429+
Option_experimentalDecorators_must_also_be_specified_when_option_emitDecoratorMetadata_is_specified: { code: 6064, category: ts.DiagnosticCategory.Error, key: "Option 'experimentalDecorators' must also be specified when option 'emitDecoratorMetadata' is specified." },
1430+
Enables_experimental_support_for_ES7_decorators: { code: 6065, category: ts.DiagnosticCategory.Message, key: "Enables experimental support for ES7 decorators." },
1431+
Enables_experimental_support_for_emitting_type_metadata_for_decorators: { code: 6066, category: ts.DiagnosticCategory.Message, key: "Enables experimental support for emitting type metadata for decorators." },
14281432
Variable_0_implicitly_has_an_1_type: { code: 7005, category: ts.DiagnosticCategory.Error, key: "Variable '{0}' implicitly has an '{1}' type." },
14291433
Parameter_0_implicitly_has_an_1_type: { code: 7006, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' implicitly has an '{1}' type." },
14301434
Member_0_implicitly_has_an_1_type: { code: 7008, category: ts.DiagnosticCategory.Error, key: "Member '{0}' implicitly has an '{1}' type." },
@@ -2900,10 +2904,16 @@ var ts;
29002904
type: "boolean",
29012905
description: ts.Diagnostics.Watch_input_files
29022906
},
2907+
{
2908+
name: "experimentalDecorators",
2909+
type: "boolean",
2910+
description: ts.Diagnostics.Enables_experimental_support_for_ES7_decorators
2911+
},
29032912
{
29042913
name: "emitDecoratorMetadata",
29052914
type: "boolean",
2906-
experimental: true
2915+
experimental: true,
2916+
description: ts.Diagnostics.Enables_experimental_support_for_emitting_type_metadata_for_decorators
29072917
}
29082918
];
29092919
function parseCommandLine(commandLine) {
@@ -9272,27 +9282,31 @@ var ts;
92729282
case 138:
92739283
case 201:
92749284
case 164:
9275-
if (name === "arguments") {
9285+
if (meaning & 3 && name === "arguments") {
92769286
result = argumentsSymbol;
92779287
break loop;
92789288
}
92799289
break;
92809290
case 163:
9281-
if (name === "arguments") {
9291+
if (meaning & 3 && name === "arguments") {
92829292
result = argumentsSymbol;
92839293
break loop;
92849294
}
9285-
var functionName = location.name;
9286-
if (functionName && name === functionName.text) {
9287-
result = location.symbol;
9288-
break loop;
9295+
if (meaning & 16) {
9296+
var functionName = location.name;
9297+
if (functionName && name === functionName.text) {
9298+
result = location.symbol;
9299+
break loop;
9300+
}
92899301
}
92909302
break;
92919303
case 175:
9292-
var className = location.name;
9293-
if (className && name === className.text) {
9294-
result = location.symbol;
9295-
break loop;
9304+
if (meaning & 32) {
9305+
var className = location.name;
9306+
if (className && name === className.text) {
9307+
result = location.symbol;
9308+
break loop;
9309+
}
92969310
}
92979311
break;
92989312
case 131:
@@ -15970,6 +15984,9 @@ var ts;
1597015984
if (!ts.nodeCanBeDecorated(node)) {
1597115985
return;
1597215986
}
15987+
if (!compilerOptions.experimentalDecorators) {
15988+
error(node, ts.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Specify_experimentalDecorators_to_remove_this_warning);
15989+
}
1597315990
if (compilerOptions.emitDecoratorMetadata) {
1597415991
switch (node.kind) {
1597515992
case 202:
@@ -25931,6 +25948,10 @@ var ts;
2593125948
diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_noEmit_cannot_be_specified_with_option_declaration));
2593225949
}
2593325950
}
25951+
if (options.emitDecoratorMetadata &&
25952+
!options.experimentalDecorators) {
25953+
diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_experimentalDecorators_must_also_be_specified_when_option_emitDecoratorMetadata_is_specified));
25954+
}
2593425955
}
2593525956
}
2593625957
ts.createProgram = createProgram;

bin/typescript.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,6 +1115,7 @@ declare module "typescript" {
11151115
version?: boolean;
11161116
watch?: boolean;
11171117
isolatedModules?: boolean;
1118+
experimentalDecorators?: boolean;
11181119
emitDecoratorMetadata?: boolean;
11191120
[option: string]: string | number | boolean;
11201121
}

0 commit comments

Comments
 (0)