Skip to content

Commit 5244de2

Browse files
Simplify imports -- remove Promise.all and .then()
1 parent f506e7b commit 5244de2

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

apps/site/mdx/create-vfs-twoslasher.mjs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@
88
* generated at build time by `scripts/twoslash-fsmap/index.mjs`.
99
*/
1010
export async function createVfsTwoslasher() {
11-
const [{ createTwoslasher }, ts, fsMapJson] = await Promise.all([
12-
import('twoslash/core'),
13-
import('typescript').then(m => m.default),
14-
import('../generated/twoslash-fsmap.json', { with: { type: 'json' } }).then(
15-
m => m.default
16-
),
17-
]);
11+
const { createTwoslasher } = await import('twoslash/core');
12+
const ts = (await import('typescript')).default;
13+
const fsMapJson = (
14+
await import('../generated/twoslash-fsmap.json', { with: { type: 'json' } })
15+
).default;
1816

1917
const fsMap = new Map(Object.entries(fsMapJson));
2018

0 commit comments

Comments
 (0)