File tree 2 files changed +25
-4
lines changed
2 files changed +25
-4
lines changed Original file line number Diff line number Diff line change @@ -218,10 +218,7 @@ namespace ts.moduleSpecifiers {
218
218
for ( const patternText of paths [ key ] ) {
219
219
const pattern = removeFileExtension ( normalizePath ( patternText ) ) ;
220
220
const indexOfStar = pattern . indexOf ( "*" ) ;
221
- if ( indexOfStar === 0 && pattern . length === 1 ) {
222
- continue ;
223
- }
224
- else if ( indexOfStar !== - 1 ) {
221
+ if ( indexOfStar !== - 1 ) {
225
222
const prefix = pattern . substr ( 0 , indexOfStar ) ;
226
223
const suffix = pattern . substr ( indexOfStar + 1 ) ;
227
224
if ( relativeToBaseUrl . length >= prefix . length + suffix . length &&
Original file line number Diff line number Diff line change
1
+ /// <reference path="fourslash.ts" />
2
+
3
+ // @Filename : /a.ts
4
+ ////export const foo = 0;
5
+
6
+ // @Filename : /b.ts
7
+ ////foo;
8
+
9
+ // @Filename : /tsconfig.json
10
+ ////{
11
+ //// "compilerOptions": {
12
+ //// "baseUrl": ".",
13
+ //// "paths": {
14
+ //// "@root/*": ["*"],
15
+ //// }
16
+ //// }
17
+ //// }
18
+
19
+ goTo . file ( "/b.ts" ) ;
20
+ verify . importFixAtPosition ( [
21
+ `import { foo } from "@root/a";
22
+
23
+ foo;` ,
24
+ ] ) ;
You can’t perform that action at this time.
0 commit comments