Skip to content

Commit 547a634

Browse files
module: prune strip-types experimental warning calls
1 parent b171afe commit 547a634

File tree

3 files changed

+1
-4
lines changed

3 files changed

+1
-4
lines changed

lib/internal/modules/cjs/loader.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,6 @@ function initializeCJS() {
449449

450450
const tsEnabled = getOptionValue('--experimental-strip-types');
451451
if (tsEnabled) {
452-
emitExperimentalWarning('Type Stripping');
453452
Module._extensions['.cts'] = loadCTS;
454453
Module._extensions['.ts'] = loadTS;
455454
}

lib/internal/modules/esm/translators.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,6 @@ translators.set('require-commonjs', (url, source, isMain) => {
250250
// Handle CommonJS modules referenced by `require` calls.
251251
// This translator function must be sync, as `require` is sync.
252252
translators.set('require-commonjs-typescript', (url, source, isMain) => {
253-
emitExperimentalWarning('Type Stripping');
254253
assert(cjsParse);
255254
const code = stripTypeScriptModuleTypes(stringify(source), url);
256255
return createCJSModuleWrap(url, code, isMain, 'commonjs-typescript');
@@ -464,7 +463,6 @@ translators.set('wasm', async function(url, source) {
464463

465464
// Strategy for loading a commonjs TypeScript module
466465
translators.set('commonjs-typescript', function(url, source) {
467-
emitExperimentalWarning('Type Stripping');
468466
assertBufferSource(source, true, 'load');
469467
const code = stripTypeScriptModuleTypes(stringify(source), url);
470468
debug(`Translating TypeScript ${url}`);
@@ -473,7 +471,6 @@ translators.set('commonjs-typescript', function(url, source) {
473471

474472
// Strategy for loading an esm TypeScript module
475473
translators.set('module-typescript', function(url, source) {
476-
emitExperimentalWarning('Type Stripping');
477474
assertBufferSource(source, true, 'load');
478475
const code = stripTypeScriptModuleTypes(stringify(source), url);
479476
debug(`Translating TypeScript ${url}`);

lib/internal/modules/typescript.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ function processTypeScriptCode(code, options) {
115115
* @returns {TransformOutput} The stripped TypeScript code.
116116
*/
117117
function stripTypeScriptModuleTypes(source, filename) {
118+
emitExperimentalWarning('Type Stripping');
118119
assert(typeof source === 'string');
119120
if (isUnderNodeModules(filename)) {
120121
throw new ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING(filename);

0 commit comments

Comments
 (0)