fix(49483): throw error on await inside non-async function (#49496)

This commit is contained in:
Oleksandr T
2022-06-15 02:08:25 +03:00
committed by GitHub
parent 3fc5f968ca
commit 0ada54c006
6 changed files with 63 additions and 0 deletions

View File

@@ -954,6 +954,7 @@ namespace ts {
Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations.code,
Diagnostics.Class_constructor_may_not_be_a_generator.code,
Diagnostics.Class_constructor_may_not_be_an_accessor.code,
Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,
]);
/**