Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
After merging my [recent PR](DefinitelyTyped/DefinitelyTyped#59905) for `@types/node`, I was alerted that a couple dependents of this package were failing to compile. I have identified a fix that I believe should preserve the original behavior of this code while resolving those errors. I don't know anything about Storybook, so if I'm wrong, or if there's a better fix for the issue, please feel free to do your own thing. For background: I don't think Storybook, or the packages with failing `dtslint` runs, `storybook-readme` and `storybook-addon-jsx`, directly depend on `@types/node`, but it's common for frontend packages to install build tooling that does depend on the package. This causes Node types to be introduced to the default `typeRoot`, so you wind up with Node types merged in with those in the DOM lib. (Storybook may be a bit of an odd duck, because it looks like in some cases, React declares its own empty DOM interfaces in `@types/react/globals.d.ts`.) At any rate, I hope the proposed fix works for you.
- Loading branch information