Skip to content
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

Fix Event after changes to @types/node #19373

Closed
wants to merge 2 commits into from
Closed

Commits on Oct 6, 2022

  1. Fix Event after @types/node changes

    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.
    thw0rted committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    465803b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    996acbb View commit details
    Browse the repository at this point in the history