TypeScript
TypeScript copied to clipboard
I can't get the interface's props to load properly in the monorepo environment w/o relative path
Bug Report
🔎 Search Terms
- monorepo
- import
- export
- interface
- type annotation
- absolute path
- relative path
- paths on tsconfig.json
🕗 Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about monorepo
⏯ Playground Link
GitHub Public Repository for this case w/ pnpm. https://github.com/Sn-Kinos/monorepo-interface
It issues on Yarn workspace too.
💻 Code
// We can quickly address your report if:
// - The code sample is short. Nearly all TypeScript bugs can be demonstrated in 20-30 lines of code!
// - It doesn't use external libraries. These are often issues with the type definitions rather than TypeScript bugs.
// - The incorrectness of the behavior is readily apparent from reading the sample.
// Reports are slower to investigate if:
// - We have to pare too much extraneous code.
// - We have to clone a large repo and validate that the problem isn't elsewhere.
// - The sample is confusing or doesn't clearly demonstrate what's wrong.

With above image, Type annotation for AppObjectWithInterface and AppObjectWithType on apps/app/index.ts didn't work properly.
🙁 Actual behavior
LibraryTypeonapps/shows itany.LibraryInterfaceonapps/does not includespathsandabsolute.
🙂 Expected behavior
LibraryTypeonapps/shows properly.LibraryInterfaceonapps/includespathsandabsolute.
Typescript obviously can't know if you're running pnpm or not, so please provide a repro that doesn't depend on that tool
Typescript obviously can't know if you're running pnpm or not, so please provide a repro that doesn't depend on that tool
Can I set up monorepo without pnpm? I did it also with Yarn Workspaces, But It didn't works. 😢
I also published npm branch that make monorepo with npm. And as I wrote in the text, the same problem occurred in Yarn, so I don't think this is a problem caused by a specific package manager... 🤔
@RyanCavanaugh May I ask if there is anything else I can do to resolve?
@Sn-Kinos I'd like you to provide a repro that doesn't require running tools that aren't TypeScript. TypeScript can only see the layout of files on disk so whatever problem you have is related to that layout of files, and should be reproducible