Skip to content

Commit 99d448a

Browse files
committed
Merge pull request #5231 from Microsoft/removeExperimentalAsyncFunctions
Remove experimental async functions
2 parents b2d666c + e9bed76 commit 99d448a

File tree

56 files changed

+0
-74
lines changed

Some content is hidden

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

56 files changed

+0
-74
lines changed

src/compiler/checker.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11766,10 +11766,6 @@ namespace ts {
1176611766
checkSignatureDeclaration(node);
1176711767
let isAsync = isAsyncFunctionLike(node);
1176811768
if (isAsync) {
11769-
if (!compilerOptions.experimentalAsyncFunctions) {
11770-
error(node, Diagnostics.Experimental_support_for_async_functions_is_a_feature_that_is_subject_to_change_in_a_future_release_Specify_experimentalAsyncFunctions_to_remove_this_warning);
11771-
}
11772-
1177311769
emitAwaiter = true;
1177411770
}
1177511771

src/compiler/commandLineParser.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,6 @@ namespace ts {
222222
type: "boolean",
223223
description: Diagnostics.Watch_input_files,
224224
},
225-
{
226-
name: "experimentalAsyncFunctions",
227-
type: "boolean",
228-
description: Diagnostics.Enables_experimental_support_for_ES7_async_functions
229-
},
230225
{
231226
name: "experimentalDecorators",
232227
type: "boolean",

src/compiler/diagnosticMessages.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -783,10 +783,6 @@
783783
"category": "Error",
784784
"code": 1245
785785
},
786-
"Experimental support for async functions is a feature that is subject to change in a future release. Specify '--experimentalAsyncFunctions' to remove this warning.": {
787-
"category": "Error",
788-
"code": 1246
789-
},
790786

791787
"'with' statements are not allowed in an async function block.": {
792788
"category": "Error",
@@ -2282,10 +2278,6 @@
22822278
"category": "Message",
22832279
"code": 6066
22842280
},
2285-
"Option 'experimentalAsyncFunctions' cannot be specified when targeting ES5 or lower.": {
2286-
"category": "Message",
2287-
"code": 6067
2288-
},
22892281
"Enables experimental support for ES7 async functions.": {
22902282
"category": "Message",
22912283
"code": 6068

src/compiler/program.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,11 +1071,6 @@ namespace ts {
10711071
!options.experimentalDecorators) {
10721072
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "emitDecoratorMetadata", "experimentalDecorators"));
10731073
}
1074-
1075-
if (options.experimentalAsyncFunctions &&
1076-
options.target !== ScriptTarget.ES6) {
1077-
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_experimentalAsyncFunctions_cannot_be_specified_when_targeting_ES5_or_lower));
1078-
}
10791074
}
10801075
}
10811076
}

src/compiler/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2086,7 +2086,6 @@ namespace ts {
20862086
watch?: boolean;
20872087
isolatedModules?: boolean;
20882088
experimentalDecorators?: boolean;
2089-
experimentalAsyncFunctions?: boolean;
20902089
emitDecoratorMetadata?: boolean;
20912090
moduleResolution?: ModuleResolutionKind;
20922091
/* @internal */ stripInternal?: boolean;

tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// @target: ES6
22
// @noEmitHelpers: true
3-
// @experimentalAsyncFunctions: true
43

54
var foo = async foo(): Promise<void> => {
65
// Legal to use 'await' in a type context.
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// @target: ES6
22
// @noEmitHelpers: true
3-
// @experimentalAsyncFunctions: true
43

54
var foo = async (): Promise<void> => {
65
};
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// @target: ES6
22
// @noEmitHelpers: true
3-
// @experimentalAsyncFunctions: true
43
var f = (await) => {
54
}
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// @target: ES6
22
// @noEmitHelpers: true
3-
// @experimentalAsyncFunctions: true
43
function f(await = await) {
54
}
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// @target: ES6
22
// @noEmitHelpers: true
3-
// @experimentalAsyncFunctions: true
43
var await = () => {
54
}

0 commit comments

Comments
 (0)