When using "moduleResolution" set to "classic", relative paths appear to be resolved in the same way as module paths, by looking at the parent folder. This behavior is incorrect and generates invalid paths.
Example:
// <root>/A.ts
export default class A {
test() { console.log("hello world"); }
}
// <root>/some/B.ts
import A from "./A"; // <- this should error
let x = new B();
x.test();
This example should not compile. Tested with:
tsc 1.5.3 => doesn't compile (as expected)
tsc 1.6.2, 1.7.5 (moduleResolution = classic) => compiles
tsc 1.6.2, 1.7.5 (moduleResolution = node) => doesn't compile (as expected)