Skip to content

Commit 19d3296

Browse files
committed
lib: expose tsParse
1 parent a4f609f commit 19d3296

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

lib/internal/bootstrap/node.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,9 @@ internalBinding('process_methods').setEmitWarningSync(emitWarningSync);
373373
}
374374

375375
{
376-
const { getBuiltinModule } = require('internal/modules/helpers');
376+
const { getBuiltinModule, tsParse } = require('internal/modules/helpers');
377377
process.getBuiltinModule = getBuiltinModule;
378+
process.tsParse = tsParse;
378379
}
379380

380381
function setupProcessObject() {
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'use strict';
2+
3+
const common = require('../common');
4+
const assert = require('assert');
5+
6+
if (!common.isMainThread)
7+
common.skip('process.tsParse is not available in Workers');
8+
9+
assert.strictEqual(process.tsParse('let s: string'), 'let s ');

0 commit comments

Comments
 (0)