<p dir="auto">For example, a variable of type</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="type Path = string &amp; { __pathBrand: any };"><pre class="notranslate"><span class="pl-k">type</span> <span class="pl-smi">Path</span> <span class="pl-c1">=</span> <span class="pl-smi">string</span> <span class="pl-c1">&amp;</span> <span class="pl-kos">{</span> <span class="pl-c1">__pathBrand</span>: <span class="pl-smi">any</span> <span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">cannot be used as an indexer type, and cannot be used to index an object with a <code class="notranslate">string</code> type indexer (despite being safely usable as a <code class="notranslate">string</code> in all other locations).</p>
<p dir="auto">If an intersection type contains types which are valid for use in an index signature, then the intersection type itself should probably be valid as an index signature.</p>
<p dir="auto">I was experimenting with intersection types and primitives, and I discovered that when you create an intersection type with a number, you can't use it in arithmetics and element access:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="type extendedNumber = number &amp; { extended: any };
let a: extendedNumber;
let obj: any;

a + 1; // Operator '+' cannot be applied to types 'number &amp; { extended: any }' and 'number'.
obj[a]; // An index expression argument must be of type 'string', 'number', 'symbol, or 'any'."><pre class="notranslate"><span class="pl-k">type</span> <span class="pl-smi">extendedNumber</span> <span class="pl-c1">=</span> <span class="pl-smi">number</span> <span class="pl-c1">&amp;</span> <span class="pl-kos">{</span> <span class="pl-c1">extended</span>: <span class="pl-smi">any</span> <span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-k">let</span> <span class="pl-s1">a</span>: <span class="pl-smi">extendedNumber</span><span class="pl-kos">;</span>
<span class="pl-k">let</span> <span class="pl-s1">obj</span>: <span class="pl-smi">any</span><span class="pl-kos">;</span>

<span class="pl-s1">a</span> <span class="pl-c1">+</span> <span class="pl-c1">1</span><span class="pl-kos">;</span> <span class="pl-c">// Operator '+' cannot be applied to types 'number &amp; { extended: any }' and 'number'.</span>
<span class="pl-s1">obj</span><span class="pl-kos">[</span><span class="pl-s1">a</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-c">// An index expression argument must be of type 'string', 'number', 'symbol, or 'any'.</span></pre></div>
<p dir="auto">Though you can't create properties on numbers, this can be useful to add brands to numbers, like this:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="type int = number &amp; { __intBrand: void };
function int(value: number) {
  return &lt;int&gt; (value | 0);
}"><pre class="notranslate"><span class="pl-k">type</span> <span class="pl-smi">int</span> <span class="pl-c1">=</span> <span class="pl-smi">number</span> <span class="pl-c1">&amp;</span> <span class="pl-kos">{</span> <span class="pl-c1">__intBrand</span>: <span class="pl-smi"><span class="pl-k">void</span></span> <span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-k">function</span> <span class="pl-en">int</span><span class="pl-kos">(</span><span class="pl-s1">value</span>: <span class="pl-smi">number</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
  <span class="pl-k">return</span> <span class="pl-kos">&lt;</span><span class="pl-smi">int</span><span class="pl-kos">&gt;</span> <span class="pl-kos">(</span><span class="pl-s1">value</span> <span class="pl-c1">|</span> <span class="pl-c1">0</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Currently intersections are only allowed on these locations if all parts of the intersection are number or string, but that rule should only apply to union types. Suggestion: for intersection types (at least) one type should be number (or string) if it's used in arithmetics or element access.</p>
<p dir="auto">I've implemented a fix in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="102071786" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/4373" data-hovercard-type="pull_request" data-hovercard-url="/microsoft/TypeScript/pull/4373/hovercard" href="https://github.com/microsoft/TypeScript/pull/4373">#4373</a>.</p>