Skip to content

Commit fe60490

Browse files
committed
Fixed wording and updated tests
1 parent a4d7883 commit fe60490

6 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12740,7 +12740,7 @@ namespace ts {
1274012740
}
1274112741

1274212742
if (!compilerOptions.experimentalDecorators) {
12743-
error(node, Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_experimentalDecorators_to_remove_this_warning);
12743+
error(node, Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning);
1274412744
}
1274512745

1274612746
if (compilerOptions.emitDecoratorMetadata) {

src/compiler/diagnosticMessages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@
687687
"category": "Error",
688688
"code": 1218
689689
},
690-
"Experimental support for decorators is a feature that is subject to change in a future release. Set 'experimentalDecorators' to remove this warning.": {
690+
"Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning.": {
691691
"category": "Error",
692692
"code": 1219
693693
},

src/compiler/program.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,7 @@ namespace ts {
11701170
return true;
11711171
case SyntaxKind.Decorator:
11721172
if (!options.experimentalDecorators) {
1173-
diagnostics.push(createDiagnosticForNode(node, Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_experimentalDecorators_to_remove_this_warning))
1173+
diagnostics.push(createDiagnosticForNode(node, Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning));
11741174
}
11751175
return true;
11761176
}

tests/baselines/reference/generatorTypeCheck39.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck39.ts(5,16): error TS1163: A 'yield' expression is only allowed in a generator body.
2-
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck39.ts(6,11): error TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set 'experimentalDecorators' to remove this warning.
2+
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck39.ts(6,11): error TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning.
33
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck39.ts(7,13): error TS1163: A 'yield' expression is only allowed in a generator body.
44

55

@@ -13,7 +13,7 @@ tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck39.ts(7,13): erro
1313
!!! error TS1163: A 'yield' expression is only allowed in a generator body.
1414
class C {
1515
~
16-
!!! error TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set 'experimentalDecorators' to remove this warning.
16+
!!! error TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning.
1717
x = yield 0;
1818
~~~~~
1919
!!! error TS1163: A 'yield' expression is only allowed in a generator body.

tests/baselines/reference/generatorTypeCheck59.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck59.ts(3,11): error TS1163: A 'yield' expression is only allowed in a generator body.
2-
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck59.ts(4,9): error TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set 'experimentalDecorators' to remove this warning.
2+
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck59.ts(4,9): error TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning.
33

44

55
==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck59.ts (2 errors) ====
@@ -10,6 +10,6 @@ tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck59.ts(4,9): error
1010
!!! error TS1163: A 'yield' expression is only allowed in a generator body.
1111
m() { }
1212
~
13-
!!! error TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set 'experimentalDecorators' to remove this warning.
13+
!!! error TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning.
1414
};
1515
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck61.ts(2,7): error TS1163: A 'yield' expression is only allowed in a generator body.
2-
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck61.ts(3,11): error TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set 'experimentalDecorators' to remove this warning.
2+
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck61.ts(3,11): error TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning.
33

44

55
==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck61.ts (2 errors) ====
@@ -9,5 +9,5 @@ tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck61.ts(3,11): erro
99
!!! error TS1163: A 'yield' expression is only allowed in a generator body.
1010
class C {};
1111
~
12-
!!! error TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set 'experimentalDecorators' to remove this warning.
12+
!!! error TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning.
1313
}

0 commit comments

Comments
 (0)