I'm trying to add a custom types file to my angular project. I created typings.d.ts inside my Angular project (created with the CLI), inside the src folder. Then inside my tsconfig.json I have
"types": [
"src/typings.d.ts"
]
but regardless of what I've tried, I always get this error. Though from what I've Google over the last hour has been types is for specific files whereas typeRoots are for type directories.
ERROR in ./src/app/profile-mobile/profile-mobile.component.ts
Module not found: Error: Can't resolve 'src/typings' in 'C:\Users\errat\Documents\Projects\chat\src\app\profile-mobile'
also weirdly:
Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\DumpStack.log.tmp'
Though these errors don't happen after adding the types file, it's only after importing the Type in an angular component to use it (I don't even have to be using it).
typeRootsproperty:"typeRoots": [ "node_modules/@types", "../src/typings.d.ts" ], but then you need to explicitly include thenode_modules/@types. If not, they might be excluded.