-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
Hello
as expectedTested with this tsconfig: https://gist.github.com/dominik-korsa/5888e24c196e50fa673154e030cf11ce
I wasn't able to test CommonJS (
require()
) syntax