|
| 1 | +/// <reference path="../fourslash.ts" /> |
| 2 | + |
| 3 | +// @moduleResolution: node |
| 4 | + |
| 5 | +// This is just modified repro to ensure we are resolving module specifier thats not already present in the file |
| 6 | + |
| 7 | +// @Filename: /node_modules/@types/yargs/package.json |
| 8 | +//// { |
| 9 | +//// "name": "@types/yargs", |
| 10 | +//// "version": "1.0.0", |
| 11 | +//// "types": "./index.d.ts" |
| 12 | +//// } |
| 13 | + |
| 14 | +// @Filename: /node_modules/@types/yargs/callback.d.ts |
| 15 | +//// export declare class Yargs { positional(): Yargs; } |
| 16 | + |
| 17 | +// @Filename: /node_modules/@types/yargs/index.d.ts |
| 18 | +//// import { Yargs } from "./callback"; |
| 19 | +//// export declare function command(command: string, cb: (yargs: Yargs) => void): void; |
| 20 | + |
| 21 | +// @Filename: /node_modules/yargs/package.json |
| 22 | +//// { |
| 23 | +//// "name": "yargs", |
| 24 | +//// "version": "1.0.0", |
| 25 | +//// "main": "index.js" |
| 26 | +//// } |
| 27 | + |
| 28 | +// @Filename: /node_modules/yargs/callback.js |
| 29 | +//// export class Yargs { positional() { } } |
| 30 | + |
| 31 | +// @Filename: /node_modules/yargs/index.js |
| 32 | +//// import { Yargs } from "./callback"; |
| 33 | +//// export function command(cmd, cb) { cb(Yargs) } |
| 34 | + |
| 35 | +// @Filename: /index.ts |
| 36 | +//// import { command } from "yargs"; |
| 37 | +//// command("foo", yargs => { |
| 38 | +//// yargs.[|/*start*/positional|](); |
| 39 | +//// }); |
| 40 | + |
| 41 | +verify.baselineGoToSourceDefinition("start"); |
0 commit comments