We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4f609f commit b197239Copy full SHA for b197239
lib/internal/bootstrap/node.js
@@ -377,6 +377,11 @@ internalBinding('process_methods').setEmitWarningSync(emitWarningSync);
377
process.getBuiltinModule = getBuiltinModule;
378
}
379
380
+{
381
+ const { tsParse } = require('internal/modules/helpers');
382
+ process.tsParse = tsParse;
383
+}
384
+
385
function setupProcessObject() {
386
const EventEmitter = require('events');
387
const origProcProto = ObjectGetPrototypeOf(process);
test/parallel/test-process-tsparse.js
@@ -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.equal(process.tsParse('let s: string'), 'let s ');
0 commit comments