diff --git a/extensions/postinstall.js b/extensions/postinstall.js index 875ad709df21b..e31009ac6b84a 100644 --- a/extensions/postinstall.js +++ b/extensions/postinstall.js @@ -7,13 +7,17 @@ const fs = require('fs'); const path = require('path'); -const toDelete = new Set(['tsc.js', 'tsserverlibrary.js', 'typescript.js', 'typescriptServices.js']); +const toDelete = new Set(['tsc.js', 'tsserverlibrary.js', 'typescriptServices.js']); const root = path.join(__dirname, 'node_modules', 'typescript', 'lib'); for (let name of fs.readdirSync(root)) { if (name === 'lib.d.ts' || name.match(/^lib\..*\.d\.ts$/) || name === 'protocol.d.ts') { continue; } + if (name === 'typescript.js' || name === 'typescript.d.ts') { + // used by html and extension editing + continue; + } if (toDelete.has(name) || name.match(/\.d\.ts$/)) { try {