question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot find name 'jsdom'

See original GitHub issue

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?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:3
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
eightHundredscommented, Jul 5, 2019
// 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;
}
2reactions
quantuminformationcommented, Sep 12, 2018

Any elegant solutions planned for TS users? @simon360 where are you getting global.jsdom from?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Missing basic DOM types in TypeScript project - Stack Overflow
Based on my Googling I assuming I am missing something basic in my project setup. It seems like these types are just assumed...
Read more >
@types/jsdom - npm
Start using @types/jsdom in your project by running `npm i @types/jsdom`. There are 243 other projects in the npm registry using @types/jsdom.
Read more >
DefinitelyTyped/DefinitelyTyped - Gitter
node_modules/@types/jsdom/ts3.5/index.d.ts:8:24 - error TS2304: Cannot find name 'BigInt'. 8 BigInt: typeof BigInt; ~~~~~~.
Read more >
From v27 to v28 - Jest
For up-to-date documentation, see the latest version (29.3). ... If you are using JSDOM test environment, jest-environment-jsdom package now ...
Read more >
Cannot find name 'window' or 'document' in TypeScript
To solve the "Cannot find name window or document " error, add dom to the lib array in your tsconfig.json file. The dom...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found