mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 02:33:53 -06:00
parent
c4dca618ce
commit
eca6410c6e
@ -187,7 +187,7 @@ namespace ts.Completions.PathCompletions {
|
||||
|
||||
const pathPrefix = path.slice(0, path.length - 1);
|
||||
if (!startsWith(fragment, pathPrefix)) {
|
||||
return emptyArray;
|
||||
return [pathPrefix];
|
||||
}
|
||||
|
||||
const remainingFragment = fragment.slice(pathPrefix.length);
|
||||
|
||||
@ -0,0 +1,17 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
// @Filename: /x/src/a.ts
|
||||
////import {} from "[|/**/|]";
|
||||
|
||||
// @Filename: /x/tsconfig.json
|
||||
////{
|
||||
//// "compilerOptions": {
|
||||
//// "baseUrl": ".",
|
||||
//// "paths": {
|
||||
//// "foo/*": ["src/*"]
|
||||
//// }
|
||||
//// }
|
||||
////}
|
||||
|
||||
const [replacementSpan] = test.ranges();
|
||||
verify.completionsAt("", ["src", "foo/"].map(name => ({ name, replacementSpan })));
|
||||
Loading…
x
Reference in New Issue
Block a user