How to use paths in tsconfig for a single module?
问题 This question is a follow-on from How to use paths in tsconfig.json? except I want to do it for a single module. I have a module: It's implemented in src/functions/foo.ts Its contents are: export default interface Bar { } It's imported by another module elsewhere using a non-relative path: import * as Foo from "foo" The compiler doesn't find it: error TS2307: Cannot find module 'foo' This tsconfig doesn't fix that problem ... { "compilerOptions": { "noEmit": true, "strict": true, "module":