No idea who would I contact.
Using Typescript 3.4.1, React 16.8 and ArcGIS JS 4.11
I'm unable to compile when I added @types/arcgis-js-api, even when not using it.
Attached is a very simple typescript react.
It does nothing but unable to compile when @types/arcgis-js-api is installed.
Any suggestions?
Error output:
node_modules/@types/react/index.d.ts:100:31 - error TS2344: Type 'T' does not satisfy the constraint 'string | ((props: any) => ReactElement<any, string | ... | (new (props: any) => Component<any, any, any>)>) | (new (props: any) => Component<any, any, any>)'.
Type 'string | number | ((props: any) => ReactElement<any, string | ... | (new (props: any) => Component<any, any, any>)>) | (new (props: any) => Component<any, any, any>)' is not assignable to type 'string | ((props: any) => ReactElement<any, string | ... | (new (props: any) => Component<any, any, any>)>) | (new (props: any) => Component<any, any, any>)'.
Type 'number' is not assignable to type 'string | ((props: any) => ReactElement<any, string | ... | (new (props: any) => Component<any, any, any>)>) | (new (props: any) => Component<any, any, any>)'.
Type 'T' is not assignable to type 'string'.
Type 'string | number | ((props: any) => ReactElement<any, string | ... | (new (props: any) => Component<any, any, any>)>) | (new (props: any) => Component<any, any, any>)' is not assignable to type 'string'.
Type 'number' is not assignable to type 'string'.
100 > extends ReactElement<P, T> { }<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>package.json
<SPAN class="punctuation token">{</SPAN>
<SPAN class="string token">"name"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="string token">"test2"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"version"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="string token">"1.0.0"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"description"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="string token">""</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"main"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="string token">"index.js"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"scripts"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="string token">"test"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="string token">"echo \"Error: no test specified\" && exit 1"</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"author"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="string token">""</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"license"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="string token">"ISC"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"dependencies"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="string token">"react"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="string token">"^16.8.6"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"react-dom"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="string token">"^16.8.6"</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"devDependencies"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="string token">"@types/arcgis-js-api"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="string token">"^4.11.0"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"@types/react"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="string token">"^16.8.11"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"@types/react-dom"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="string token">"^16.8.3"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"typescript"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="string token">"^3.4.1"</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>tsconfig.json
<SPAN class="punctuation token">{</SPAN>
<SPAN class="string token">"compileOnSave"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">true</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"compilerOptions"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="string token">"target"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"es5"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"module"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"umd"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"removeComments"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">true</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"noEmitOnError"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">true</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"sourceMap"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">true</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"declaration"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">false</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"jsx"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"react"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"moduleResolution"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"node"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"esModuleInterop"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">true</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"forceConsistentCasingInFileNames"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">true</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"experimentalDecorators"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">true</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"lib"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="string token">"dom"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"scripthost"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"es5"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"es2015.promise"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"es2015.core"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"es2015.collection"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"es2015.iterable"</SPAN><SPAN class="punctuation token">]</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>