Answer the question
In order to leave comments, you need to log in
Why does the module not want to be declared?
1 module is declared fine, but when I try to do the same with koa-connect-flash, I get the error " Circular definition of import alias 'connectFlash' ", what could be the problem?
declare module 'koa-connect-flash' {
import connectFlash from 'koa-connect-flash';
export default connectFlash;
}
Answer the question
In order to leave comments, you need to log in
Cyclic dependency. You declare that your module uses itself. You can't do that. Only third-party modules can be imported into the declaration if they are used by the library.
The simplest option, in your case:
declare module 'koa-connect-flash' {
const def: any;
export default def;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question