swc/crates/swc_ecma_parser/tests/tsc/moduleResolutionWithoutExtension6.ts

8 lines
325 B
TypeScript
Raw Normal View History

// @moduleResolution: node12
// @module: node12
// @filename: /src/bar.cts
// Extensionless relative path import statement in a cjs module
// Import statements are not allowed in cjs files,
// but other errors should not assume that they are allowed
import { foo } from "./foo"; // should error, should not ask for extension