Closed DonJayamanne closed 3 years ago
Yes please! What would be steps to achieve this?
tslab
generally supports top-level await https://github.com/yunabe/tslab/issues/16 (commit)
Edit: I realized, it actually works, but typescript does show errors anyway:
'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module. ts(1375)
Top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher. ts(1378)
Done, will be shipped soon
Shouldn't it be reopened as warnings still are visible?
It works okay, but warnings are very annoying...