File tree Expand file tree Collapse file tree 4 files changed +12
-5
lines changed Expand file tree Collapse file tree 4 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 1
1
lib
2
2
node_modules
3
- tests /core /index.js
4
- tests /utils /sum.js
3
+ tests /** /* .js
Original file line number Diff line number Diff line change 1
- import * as ts from "typescript" ;
1
+ import ts from "typescript" ;
2
2
import { dirname , resolve , relative } from "path" ;
3
3
4
4
const transformer = < T extends ts . Node > ( _ : ts . Program ) => {
@@ -28,7 +28,8 @@ const transformer = <T extends ts.Node>(_: ts.Program) => {
28
28
if ( match ) {
29
29
const out = path . resolve . replace ( / \* / g, match [ 1 ] ) ;
30
30
const file = relative ( fileDir , resolve ( baseUrl , out ) ) ;
31
- node . moduleSpecifier . text = file ;
31
+ // If it's in the same level or below add the ./
32
+ node . moduleSpecifier . text = file [ 0 ] === "." ? file : `./${ file } ` ;
32
33
break ;
33
34
}
34
35
}
Original file line number Diff line number Diff line change 1
1
import { sum } from "@utils/sum" ;
2
+ import { subs } from "@utils/subs" ;
2
3
3
- sum ( 2 , 3 )
4
+ sum ( 2 , 3 ) ;
5
+ subs ( 2 , 3 ) ;
Original file line number Diff line number Diff line change
1
+ import { sum } from "@utils/sum" ;
2
+
3
+ export function subs ( a : number , b : number ) {
4
+ return sum ( a , - b ) ;
5
+ }
You can’t perform that action at this time.
0 commit comments