15d294d350
- We didn't locate the package.json correctly in cases where the module to be imported is in a subdirectory of the package - We didn't look at the types element in package.json (just typings) - We didn't remove /index.js from the path if the main module was in a subdirectory Fixes #16963
26 lines
602 B
TypeScript
26 lines
602 B
TypeScript
/// <reference path="fourslash.ts" />
|
|
|
|
//// [|f1/*0*/('');|]
|
|
|
|
// @Filename: package.json
|
|
//// { "dependencies": { "package-name": "latest" } }
|
|
|
|
// @Filename: node_modules/package-name/bin/lib/index.d.ts
|
|
//// export function f1(text: string): string;
|
|
|
|
// @Filename: node_modules/package-name/bin/lib/index.js
|
|
//// function f1(text) { }
|
|
//// exports.f1 = f1;
|
|
|
|
// @Filename: node_modules/package-name/package.json
|
|
//// {
|
|
//// "main": "bin/lib/index.js",
|
|
//// "types": "bin/lib/index.d.ts"
|
|
//// }
|
|
|
|
verify.importFixAtPosition([
|
|
`import { f1 } from "package-name";
|
|
|
|
f1('');`
|
|
]);
|