Debian Codegraph @

packages/babel-core/test/fixtures/async/plugin-post/plugin.js

raw
1 const wait = t => new Promise(r => setTimeout(r, t));
2
3 module.exports = function plugin({ types: t }) {
4 return {
5 async post() {
6 await wait(50);
7 },
8
9 visitor: {
10 Program(path) {
11 path.pushContainer("body", t.stringLiteral("success"));
12 },
13 },
14 };
15 };