-
Notifications
You must be signed in to change notification settings - Fork 13
Cannot find name 'jsdom' #5
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
Comments
Hm, strange one. I've only used Since I haven't used Open to any suggestions or PRs on this, though! |
Add this line will solve this problem But I think this is not an elegant solution |
Another solution is to refer to |
Any elegant solutions planned for TS users? |
@quantuminformation this isn’t on my radar right now, but I’d love to see a pull request! |
FYI, for others that have experienced this issue, we fixed this by referring to
For more information on the globals file: https://www.typescriptlang.org/docs/handbook/declaration-files/templates/global-d-ts.html |
// global.d.ts
import { JSDOM } from 'jsdom';
declare global {
namespace globalThis {
const jsdom: JSDOM;
}
} easier // global.d.ts
import { JSDOM } from 'jsdom';
declare global {
const jsdom: JSDOM;
} |
Uh oh!
There was an error while loading. Please reload this page.
hello simon
In my project jest-environment-jsdom-global can run normally,
But jslint will prompt me
'Cannot find name 'jsdom'
my tslint version is
"^5.10.0"
,should i ignore this waring?The text was updated successfully, but these errors were encountered: