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> { }
package.json
{
"name": "test2",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"react": "^16.8.6",
"react-dom": "^16.8.6"
},
"devDependencies": {
"@types/arcgis-js-api": "^4.11.0",
"@types/react": "^16.8.11",
"@types/react-dom": "^16.8.3",
"typescript": "^3.4.1"
}
}
tsconfig.json
{
"compileOnSave": true,
"compilerOptions": {
"target": "es5",
"module": "umd",
"removeComments": true,
"noEmitOnError": true,
"sourceMap": true,
"declaration": false,
"jsx": "react",
"moduleResolution": "node",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"experimentalDecorators": true,
"lib": ["dom", "scripthost", "es5", "es2015.promise", "es2015.core", "es2015.collection", "es2015.iterable"]
}
}