• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/// <reference path="fourslash.ts" />
2
3// @module: commonjs
4// @checkJs: true
5
6// @Filename: /node_modules/unified/package.json
7//// {
8////   "name": "unified",
9////   "types": "types/ts3.444/index.d.ts",
10////   "typesVersions": {
11////     ">=4.0": {
12////       "types/ts3.444/*": [
13////         "types/ts4.0/*"
14////       ]
15////     }
16////   }
17//// }
18
19// @Filename: /node_modules/unified/types/ts3.444/index.d.ts
20//// export declare const x: number;
21
22// @Filename: /node_modules/unified/types/ts4.0/index.d.ts
23//// export declare const x: number;
24
25// @Filename: /foo.js
26//// import {} from "unified";
27
28// @Filename: /index.js
29//// x/**/
30
31verify.importFixModuleSpecifiers("", [
32  "unified",
33  // This obviously doesn't look like a desired module specifier, but the package.json is misconfigured
34  // (taken from a real-world example). The fact that it resolves (according to TS) is good enough to
35  // generate it.
36  "unified/types/ts3.444/index.js",
37], { importModuleSpecifierEnding: "js" });
38