<p dir="auto">After updating lodash.TypeScript.DefinitelyTyped from nuget to version 2.3.3<br>
I have two d.ts files in folder typings/lodash: 'lodash-3.10.d.ts' and 'lodash.d.ts'<br>
After build I receive around 80 errors with content:  Duplicate Identifier </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 latest stable version of tsc (<code class="notranslate">typescript@latest</code> = <code class="notranslate">typescript@3.1.1</code>). <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 tried using the <code class="notranslate">@types/react-native@0.57.0</code> package and had problems.</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.
<ul dir="auto">
<li>Authors: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/alloy/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/alloy">@alloy</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/huhuanming/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/huhuanming">@huhuanming</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/iRoachie/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/iRoachie">@iRoachie</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Skn0tt/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Skn0tt">@Skn0tt</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/timwangdev/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/timwangdev">@timwangdev</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/kamal/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/kamal">@kamal</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/nelyousfi/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/nelyousfi">@nelyousfi</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/alexdunne/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/alexdunne">@alexdunne</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/swissmanu/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/swissmanu">@swissmanu</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/bm-software/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/bm-software">@bm-software</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tkrotoff/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tkrotoff">@tkrotoff</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/a-tarasyuk/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/a-tarasyuk">@a-tarasyuk</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mvdam/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mvdam">@mvdam</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Esemesek/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Esemesek">@Esemesek</a></li>
</ul>
</li>
</ul>
<p dir="auto">Current typings produce very strange errors being used with typescript 3.1.1<br>
I submit <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="364797239" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/27421" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/27421/hovercard" href="https://github.com/microsoft/TypeScript/issues/27421">microsoft/TypeScript#27421</a> to typescript repo, but sure that DT also should track this issue. Main problem, that I can't create minimal example for this. And I can't personally understand why ts since 3.1 behave so strangely. It would be good if anyone can help with this.</p>
<p dir="auto">Next is mostly duplication of info from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="364797239" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/27421" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/27421/hovercard" href="https://github.com/microsoft/TypeScript/issues/27421">microsoft/TypeScript#27421</a>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import React from 'react'
import { StyleSheet, Text } from 'react-native'

const s = StyleSheet.create({
  didNotWork: {
    fontSize: 16,
    fontWeight: '900', // if we comment this line, errors gone
    marginTop: 5, // if this line commented, errors also gone
  },
  work: {
    fontSize: 18,
//    fontWeight: '900', // when uncommented also work
  },
})

export const sample1 = &lt;Text style={s.work} /&gt;
export const sample2 = &lt;Text style={s.didNotWork} /&gt;
// ^ this line generate error:
// index.tsx:17:30 - error TS2322: Type 'RegisteredStyle&lt;{ fontSize: number; fontWeight: string; marginTop: number; }&gt;' is not assignable to type 'StyleProp&lt;TextStyle&gt;'.
//   Type 'RegisteredStyle&lt;{ fontSize: number; fontWeight: string; marginTop: number; }&gt;' is not assignable to type 'RecursiveArray&lt;false | TextStyle | RegisteredStyle&lt;TextStyle&gt; | null | undefined&gt;'.
//     Property 'length' is missing in type 'Number &amp; { __registeredStyleBrand: { fontSize: number; fontWeight: string; marginTop: number; }; }'.
// 17 export const sample2 = &lt;Text style={s.didNotWork} /&gt;
//                                 ~~~~~
//   node_modules/@types/react-native/index.d.ts:907:5
//     907     style?: StyleProp&lt;TextStyle&gt;;
//             ~~~~~
//     The expected type comes from property 'style' which is declared here on type 'IntrinsicAttributes &amp; IntrinsicClassAttributes&lt;Text&gt; &amp; Readonly&lt;{ children?: ReactNode; }&gt; &amp; Readonly&lt;TextProps&gt;'
export const sample3 = &lt;Text style={{fontSize: 16, fontWeight: '900', marginTop: 5}} /&gt;"><pre class="notranslate"><code class="notranslate">import React from 'react'
import { StyleSheet, Text } from 'react-native'

const s = StyleSheet.create({
  didNotWork: {
    fontSize: 16,
    fontWeight: '900', // if we comment this line, errors gone
    marginTop: 5, // if this line commented, errors also gone
  },
  work: {
    fontSize: 18,
//    fontWeight: '900', // when uncommented also work
  },
})

export const sample1 = &lt;Text style={s.work} /&gt;
export const sample2 = &lt;Text style={s.didNotWork} /&gt;
// ^ this line generate error:
// index.tsx:17:30 - error TS2322: Type 'RegisteredStyle&lt;{ fontSize: number; fontWeight: string; marginTop: number; }&gt;' is not assignable to type 'StyleProp&lt;TextStyle&gt;'.
//   Type 'RegisteredStyle&lt;{ fontSize: number; fontWeight: string; marginTop: number; }&gt;' is not assignable to type 'RecursiveArray&lt;false | TextStyle | RegisteredStyle&lt;TextStyle&gt; | null | undefined&gt;'.
//     Property 'length' is missing in type 'Number &amp; { __registeredStyleBrand: { fontSize: number; fontWeight: string; marginTop: number; }; }'.
// 17 export const sample2 = &lt;Text style={s.didNotWork} /&gt;
//                                 ~~~~~
//   node_modules/@types/react-native/index.d.ts:907:5
//     907     style?: StyleProp&lt;TextStyle&gt;;
//             ~~~~~
//     The expected type comes from property 'style' which is declared here on type 'IntrinsicAttributes &amp; IntrinsicClassAttributes&lt;Text&gt; &amp; Readonly&lt;{ children?: ReactNode; }&gt; &amp; Readonly&lt;TextProps&gt;'
export const sample3 = &lt;Text style={{fontSize: 16, fontWeight: '900', marginTop: 5}} /&gt;
</code></pre></div>
<p dir="auto">This sample shows the error. There is sandbox repo: <a href="https://github.com/vovkasm/rn-ts-3.1.1">https://github.com/vovkasm/rn-ts-3.1.1</a> (to reproduce, clone and <code class="notranslate">npm install &amp;&amp; npm test</code>)</p>
<ol dir="auto">
<li>If I comment out <code class="notranslate">fontWeight</code> or <code class="notranslate">marginTop</code> style of <code class="notranslate">didNotWork</code> key, error dissapeared</li>
<li>If I add <code class="notranslate">fontWeight</code> to <code class="notranslate">work</code> key, error dissapeared</li>
</ol>
<p dir="auto">Why is this?</p>