.vscode/debug-ts.js
function TS2JS(tsFile) {
  const srcFolder = path.join(__dirname, '..', 'src');
  const distFolder = path.join(__dirname, '..', 'build', 'main');

  const tsPathObj = path.parse(tsFile);

  return path.format({
    dir: tsPathObj.dir.replace(srcFolder, distFolder),
    ext: '.js',
    name: tsPathObj.name,
    root: tsPathObj.root
  });
}
function TS2JS(tsFile) {
  const srcFolder = path.join(__dirname, '..', 'src');
  const distFolder = path.join(__dirname, '..', 'build', 'main');

  const tsPathObj = path.parse(tsFile);

  return path.format({
    dir: tsPathObj.dir.replace(srcFolder, distFolder),
    ext: '.js',
    name: tsPathObj.name,
    root: tsPathObj.root
  });
}
function TS2JS ( tsFile ) { const srcFolder = path . join ( __dirname , '..' , 'src' ) ; const distFolder = path . join ( __dirname , '..' , 'build' , 'main' ) ; const tsPathObj = path . parse ( tsFile ) ; return path . format ( { dir : tsPathObj . dir . replace ( srcFolder , distFolder ) , ext : '.js' , name : tsPathObj . name , root : tsPathObj . root } ) ; }
get associated compiled js file path

@param tsFile  path
@return string path
get associated compiled js file path