mirror of
https://github.com/hanzoai/ts-node.git
synced 2026-10-30 19:36:25 +00:00
* increase formatting print-width to 120; 80 hurts legibility of TS too much * apply formatting * fix
15 lines
420 B
JavaScript
Executable File
15 lines
420 B
JavaScript
Executable File
import { fileURLToPath } from 'url';
|
|
import { createRequire } from 'module';
|
|
const require = createRequire(fileURLToPath(import.meta.url));
|
|
|
|
/** @type {import('../../dist')} **/
|
|
const { createEsmHooks, register } = require('ts-node');
|
|
|
|
const tsNodeInstance = register({
|
|
compilerOptions: {
|
|
noUnusedLocals: true,
|
|
},
|
|
});
|
|
|
|
export const { resolve, getFormat, transformSource, load } = createEsmHooks(tsNodeInstance);
|