-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
No error on toplevel return in JS (#48874)
* 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 * Restore 'return' statement. * Update Baselines and/or Applied Lint Fixes * Re-add missing baselines * No error in toplevel script files Only issue "no top-level return" error for modules, not scripts, regardless of whether it's TS or JS. * Keep Disallowing return in ambient locations * Allow toplevel return only in non-ESM JS files * Add test of toplevel return in JS script * Revert "Add test of toplevel return in JS script" This reverts commit 2a6dec4. * Revert "Allow toplevel return only in non-ESM JS files" This reverts commit 6291ae3. * Revert "Keep Disallowing return in ambient locations" This reverts commit 714ea8e. * Revert "No error in toplevel script files" This reverts commit 2056e13. * restore orphaned baseline Co-authored-by: Daniel Rosenwasser <[email protected]> Co-authored-by: TypeScript Bot <[email protected]>
- Loading branch information
1 parent
46e8306
commit 650c056
Showing
6 changed files
with
1 addition
and
297 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 0 additions & 47 deletions
47
tests/baselines/reference/emitDecoratorMetadata_isolatedModules.errors.txt
This file was deleted.
Oops, something went wrong.
99 changes: 0 additions & 99 deletions
99
tests/baselines/reference/emitDecoratorMetadata_isolatedModules.js
This file was deleted.
Oops, something went wrong.
72 changes: 0 additions & 72 deletions
72
tests/baselines/reference/emitDecoratorMetadata_isolatedModules.symbols
This file was deleted.
Oops, something went wrong.
74 changes: 0 additions & 74 deletions
74
tests/baselines/reference/emitDecoratorMetadata_isolatedModules.types
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters