Closed pedrouid closed 4 years ago
The Typescript environment is generated using:
create-react-app APP_NAME --scripts-version=react-scripts-ts
Used the following tsconfig.json:
{
"compilerOptions": {
"baseUrl": ".",
"outDir": "build/dist",
"module": "esnext",
"target": "es5",
"lib": ["esnext", "es7", "dom"],
"sourceMap": true,
"allowJs": true,
"jsx": "react",
"moduleResolution": "node",
"rootDir": "src",
"forceConsistentCasingInFileNames": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noImplicitAny": true,
"importHelpers": true,
"strictNullChecks": true,
"suppressImplicitAnyIndexErrors": true,
"allowSyntheticDefaultImports": true,
"noUnusedLocals": true,
"resolveJsonModule": true
},
"exclude": [
"node_modules",
"build",
"scripts",
"acceptance-tests",
"webpack",
"jest",
"src/setupTests.ts"
]
}
Please try to use our missing typescript definition npm: https://github.com/netgum/netgum-types
Failed to compile because I got the following error message:
Could not find a declaration file for module 'ethjs'
I tried to install
@types/ethjs
but wasn't successfulI managed to work around it by adding an empty declaration to the root directory index.d.ts
declare module "ethjs";
But then I ended getting a different error that I couldn't fix:
Cannot use namespace 'IProvider' as a type.