Issue
I'm working on a typescript module (as part of a larger monorepo) and I can't seem to import types from one package in to another (via node modules). My types are built to ./types
and my package.json as a types: types/index.d.ts
key in it. For whatever reason, I can't seem to import the types in to another module, when developing locally.
It seems as though it should just work and that npm/typescript would resolve these appropriately.
My tsconfig looks like this:
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "./src",
"rootDir": "./src",
"outDir": "./dist",
"declaration": true,
"declarationDir": "./types"
},
"include": [
"./src"
],
"exclude": [
"node_modules",
"dist"
]
}
Solution
User error - I'd redefined the library in global.d.ts
in the project...
Answered By - hjfitz
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.