I have a project created with create-react-app-ts
I also have a set of d.ts
files that are generated interfaces from JSON-schema. They define some interface
Based on tsconfig compiler options, you should use option typeRoots
. This section of documentation describes the difference between @types
, typeRoots
and types
.
For your specific case this tsconfig.json
file should do the trick:
{
"compilerOptions": {
"typeRoots" : ["./type-definitions-folder"]
}
}
If you are also using type definitions from npm you should also add ./node_modules/@types
.
{
"compilerOptions": {
"typeRoots" : ["./node_modules/@types", "./type-definitions-folder"]
}
}