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 11lib
22node_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" ;
22import { dirname , resolve , relative } from "path" ;
33
44const transformer = < T extends ts . Node > ( _ : ts . Program ) => {
@@ -28,7 +28,8 @@ const transformer = <T extends ts.Node>(_: ts.Program) => {
2828 if ( match ) {
2929 const out = path . resolve . replace ( / \* / g, match [ 1 ] ) ;
3030 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 } ` ;
3233 break ;
3334 }
3435 }
Original file line number Diff line number Diff line change 11import { sum } from "@utils/sum" ;
2+ import { subs } from "@utils/subs" ;
23
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