Having trouble with imports in a TypeScript package.
I have two classes, A
and B
, located in the models directory.
Currently, I am importing class B into class A like this:
import B from "models/B"
interface A {
b: B
}
export default A;
However, after building, the A.d.ts
file cannot recognize the B
interface.
I've attempted to set the exports
in the package.json
but it's still not resolving the issue.
How can I successfully import an interface into another interface? I need to be able to use these interfaces directly after installation, for example:
import A from "@space/my-package/models/A"