Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
rpetrich committed Dec 29, 2021
1 parent 2684c5a commit 92755ff
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions async-to-promises.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4817,14 +4817,20 @@ export default function ({
ImportDeclaration: {
exit(path) {
if (this.hasTopLevelAwait && readConfigKey(this.opts, "topLevelAwait") === "simple") {
throw path.buildCodeFrameError(`Cannot import after a top-level await when using topLevelAwait: "simple"!`, TypeError);
throw path.buildCodeFrameError(
`Cannot import after a top-level await when using topLevelAwait: "simple"!`,
TypeError
);
}
},
},
ExportDeclaration: {
exit(path) {
if (this.hasTopLevelAwait && readConfigKey(this.opts, "topLevelAwait") === "simple") {
throw path.buildCodeFrameError(`Cannot export after a top-level await when using topLevelAwait: "simple"!`, TypeError);
throw path.buildCodeFrameError(
`Cannot export after a top-level await when using topLevelAwait: "simple"!`,
TypeError
);
}
},
},
Expand Down

0 comments on commit 92755ff

Please sign in to comment.