Export all interfaces in declaration file#1682
Conversation
|
Good catch, it seems it is not good practice to use same variable name twice 🤔 declare namespace cheerio {...}
...
declare const cheerio: cheerio.CheerioAPI;
export = cheerio; |
It seems to be quite common, see Advanced Combinations for some examples |
|
@dominik-korsa Are you installed |
|
As far as I know |
|
@dominik-korsa i used cheerio version i already solved #1696 |
|
Would be great if this is merged, as exposing interfaces makes it easier to work than |
|
Thanks @dominik-korsa! |
|
This fix doesn't works for me. Also the |
like @keyiis said downgrade your version of cheerio to |


fixes #1540, fixes #1649
Note: I don't know what I'm doing, but this fix seems to be working for my case
In these examples, the code compiles and the console.log output
Helloas expectedTested with this tsconfig: https://gist.github.com/dominik-korsa/5888e24c196e50fa673154e030cf11ce
I wasn't able to test CommonJS (
require()) syntax