π Search Terms
"inferred type cannot be named", "paths"
π Version & Regression Information
β― Playground Link
https://github.com/haines/typescript-paths-inferred-type-cannot-be-named
π» Code
Please see the linked repo (sorry, I couldn't reduce it any further).
π Actual behavior
In a multiproject build where app depends on lib, setting paths in lib's tsconfig breaks app's build with
error TS2742: The inferred type of '...' cannot be named without a reference to '...'. This is likely not portable. A type annotation is necessary.
π Expected behavior
Adding paths shouldn't break the dependent project.
Additional information about the issue
Judging by the PR that I was able to bisect to, this seems like it could a bad interaction between paths in tsconfig.json and exports in package.json.
π Search Terms
"inferred type cannot be named", "paths"
π Version & Regression Information
package.jsonimportsfieldΒ #55015β― Playground Link
https://github.com/haines/typescript-paths-inferred-type-cannot-be-named
π» Code
Please see the linked repo (sorry, I couldn't reduce it any further).
π Actual behavior
In a multiproject build where
appdepends onlib, settingpathsinlib's tsconfig breaksapp's build withπ Expected behavior
Adding
pathsshouldn't break the dependent project.Additional information about the issue
Judging by the PR that I was able to bisect to, this seems like it could a bad interaction between
pathsin tsconfig.json andexportsin package.json.