How to use the package in typescript?
budarin opened this issue · 3 comments
budarin commented
There is now top level await for common.js modules (which is node app) in TypeScript
How to use it in code with TypeScript?
shellscape commented
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.
budarin commented
const middleware = await koaWebpack({ compiler });
- it's a top level async call
shellscape commented
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.