mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-19 10:41:56 -05:00
No error on toplevel return in JS
Turns out it's only an error in modules. It's possible to keep this error on the list of "OK for JS" errors and make the checker code stop issuing it for JS scripts only. However, I don't think the error is valuable enough to do that. Fixes #48224
This commit is contained in:
@@ -913,7 +913,6 @@ namespace ts {
|
||||
Diagnostics.A_rest_parameter_cannot_have_an_initializer.code,
|
||||
Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list.code,
|
||||
Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma.code,
|
||||
Diagnostics.A_return_statement_can_only_be_used_within_a_function_body.code,
|
||||
Diagnostics.A_return_statement_cannot_be_used_inside_a_class_static_block.code,
|
||||
Diagnostics.A_set_accessor_cannot_have_rest_parameter.code,
|
||||
Diagnostics.A_set_accessor_must_have_exactly_one_parameter.code,
|
||||
|
||||
Reference in New Issue
Block a user