shellscape/koa-webpack

How to use the package in typescript?

budarin opened this issue · 3 comments

There is now top level await for common.js modules (which is node app) in TypeScript

How to use it in code with TypeScript?

I'm not really sure what you're asking, but this package doesn't use top level await. If you're asking how to use this package in TS, then I'd refer you to ES6 import fundamentals. MDN has good info on that.

const middleware = await koaWebpack({ compiler }); - it's a top level async call

That's an example of how to use the export method. It's not telling you to use a top-level await. This package's job is not to give you a full implementation as an example. You must understand how to use Koa.