9cdbb7248b
* add new error + suggestions * push down assert defined * remove comment * fix esm module import detection, update baselines * add and update new tests * fix review comments * remove renamed baseline references * update node modules test baselines * fix error message, add new tests * update old tests with new error message
13 lines
723 B
Plaintext
13 lines
723 B
Plaintext
=== /src/bar.cts ===
|
|
// Extensionless relative path dynamic import in a cjs module
|
|
import("./foo").then(x => x); // should error, ask for extension
|
|
>import("./foo").then(x => x) : Promise<any>
|
|
>import("./foo").then : <TResult1 = any, TResult2 = never>(onfulfilled?: (value: any) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
|
>import("./foo") : Promise<any>
|
|
>"./foo" : "./foo"
|
|
>then : <TResult1 = any, TResult2 = never>(onfulfilled?: (value: any) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
|
>x => x : (x: any) => any
|
|
>x : any
|
|
>x : any
|
|
|