Skip to content

Commit bbf48bb

Browse files
committed
Fixed wording and updated tests
(cherry picked from commit fe60490)
1 parent 13ec44a commit bbf48bb

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12827,7 +12827,7 @@ namespace ts {
1282712827
}
1282812828

1282912829
if (!compilerOptions.experimentalDecorators) {
12830-
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);
12830+
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);
1283112831
}
1283212832

1283312833
if (compilerOptions.emitDecoratorMetadata) {

src/compiler/diagnosticMessages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@
679679
"category": "Error",
680680
"code": 1218
681681
},
682-
"Experimental support for decorators is a feature that is subject to change in a future release. Set 'experimentalDecorators' to remove this warning.": {
682+
"Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning.": {
683683
"category": "Error",
684684
"code": 1219
685685
},

src/compiler/program.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ namespace ts {
829829
return true;
830830
case SyntaxKind.Decorator:
831831
if (!options.experimentalDecorators) {
832-
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))
832+
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));
833833
}
834834
return true;
835835
}

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)