<p dir="auto">This is a follow-up issue of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="318148150" data-permission-text="Title is private" data-url="https://github.com/DefinitelyTyped/DefinitelyTyped/issues/25342" data-hovercard-type="issue" data-hovercard-url="/DefinitelyTyped/DefinitelyTyped/issues/25342/hovercard" href="https://github.com/DefinitelyTyped/DefinitelyTyped/issues/25342">#25342</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="258248230" data-permission-text="Title is private" data-url="https://github.com/DefinitelyTyped/DefinitelyTyped/issues/19799" data-hovercard-type="issue" data-hovercard-url="/DefinitelyTyped/DefinitelyTyped/issues/19799/hovercard" href="https://github.com/DefinitelyTyped/DefinitelyTyped/issues/19799">#19799</a>.</p>
<p dir="auto">In <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="317398689" data-permission-text="Title is private" data-url="https://github.com/DefinitelyTyped/DefinitelyTyped/issues/25269" data-hovercard-type="pull_request" data-hovercard-url="/DefinitelyTyped/DefinitelyTyped/pull/25269/hovercard" href="https://github.com/DefinitelyTyped/DefinitelyTyped/pull/25269">#25269</a> the <code class="notranslate">URL</code> and <code class="notranslate">URLSearchParams</code> classes have been added as globals because since Node.js 10.0 they are <a href="https://nodejs.org/api/url.html#url_class_url" rel="nofollow">exposed as globals</a>.</p>
<p dir="auto">Because <code class="notranslate">lib.dom.d.ts</code> also exposes them as globals, projects <em>which referenced both</em>, <code class="notranslate">node</code> and <code class="notranslate">lib.dom</code>, got "Duplicate identifier 'URL'" errors (see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="318148150" data-permission-text="Title is private" data-url="https://github.com/DefinitelyTyped/DefinitelyTyped/issues/25342" data-hovercard-type="issue" data-hovercard-url="/DefinitelyTyped/DefinitelyTyped/issues/25342/hovercard" href="https://github.com/DefinitelyTyped/DefinitelyTyped/issues/25342">#25342</a>). Therefore the global <code class="notranslate">URL</code> and <code class="notranslate">URLSearchParams</code> has been removed again.</p>
<p dir="auto">This fix (actually a workaround  for a missing declaration merging feature of TypeScript) now has the drawback that we cannot use the global <code class="notranslate">URL</code> class in Node.js-code (instead we need to import it from the <code class="notranslate">url</code> module). This is especially bad for universal modules which are supposed to work in the browser + node by just using the global <code class="notranslate">URL</code> (which works since Node.js 10).</p>
<p dir="auto">So I want to discuss solutions for this atm. unsupported scenario here. (Without having local declarations in consuming projects.)</p>
<hr>
<p dir="auto">One solution would be to support this scenario in TypeScript (allow - exactly same? - global class definitions in multiple declaration files). <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/weswigham/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/weswigham">@weswigham</a> Would this be possible?</p>
<p dir="auto">A more straight-foward solution would be to create a new DT package (e.g. <code class="notranslate">node-global-url</code> or maybe better <code class="notranslate">whatwg-global-url</code>) which can be installed additionally and selected by using e.g. <code class="notranslate">"types": ["node", "node-global-url"]</code> in a <code class="notranslate">tsconfig.json</code> for projects which face the mentioned scenario above.</p>
<p dir="auto">Any other ideas?</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the <code class="notranslate">@types/react-redux</code> package and had problems.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the latest stable version of tsc. <a href="https://www.npmjs.com/package/typescript" rel="nofollow">https://www.npmjs.com/package/typescript</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have a question that is inappropriate for <a href="https://stackoverflow.com/" rel="nofollow">StackOverflow</a>.  (Please ask any appropriate questions there).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/blog/821-mention-somebody-they-re-notified">Mention</a> the authors (see <code class="notranslate">Definitions by:</code> in <code class="notranslate">index.d.ts</code>) so they can respond.</li>
</ul>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jamesreggio/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jamesreggio">@jamesreggio</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/JounQin/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/JounQin">@JounQin</a></p>
<p dir="auto">updating from <code class="notranslate">@types/react-redux 7.0.1</code> to <code class="notranslate">@types/react-redux 7.0.2</code> gives the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="'/node_modules/hoist-non-react-statics' has no exported member 'NonReactStatics'.

47 import { NonReactStatics } from 'hoist-non-react-statics';"><pre class="notranslate"><code class="notranslate">'/node_modules/hoist-non-react-statics' has no exported member 'NonReactStatics'.

47 import { NonReactStatics } from 'hoist-non-react-statics';
</code></pre></div>
<p dir="auto">seems like it was introduced here: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/DefinitelyTyped/DefinitelyTyped/commit/8b1beff944f6c7bf913b6fcee31fb5f7129064a7/hovercard" href="https://github.com/DefinitelyTyped/DefinitelyTyped/commit/8b1beff944f6c7bf913b6fcee31fb5f7129064a7"><tt>8b1beff</tt></a></p>