versea 的的 tapable 事件库。
npm install @versea/tapableversea 的的 tapable 事件库。
``bash`
npm install --save @versea/tapable
`ts
import { AsyncSeriesHook, HookContext } from '@versea/tapable';
interface Context extends HookContext {
test: string;
}
const testAsyncSeriesHook = new AsyncSeriesHook
testAsyncSeriesHook.tap('name', async () => {
return Promise.resolve();
});
void testAsyncSeriesHook.call({ test: 'test' });
``