mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 17:25:39 +01:00
Adds backwards compatability for diagnostic chains
This commit is contained in:
parent
7e5cb3e7ac
commit
c8b92c097f
8 changed files with 15576 additions and 8652 deletions
|
|
@ -30,6 +30,12 @@ const TYPESCRIPT_LIB_DESTINATION = path.join(__dirname, '../src/lib');
|
|||
tsServices.replace(/return require\(fileNameToRequire\);/, `// MONACOCHANGE\n return undefined;\n // END MONACOCHANGE`)
|
||||
);
|
||||
|
||||
// Make sure process.args don't get called in the browser, this
|
||||
// should only happen in TS 2.6.2
|
||||
const beforeProcess = `ts.perfLogger.logInfoEvent("Starting TypeScript v" + ts.versionMajorMinor + " with command line: " + JSON.stringify(process.argv));`
|
||||
const afterProcess = `// MONACOCHANGE\n ts.perfLogger.logInfoEvent("Starting TypeScript v" + ts.versionMajorMinor + " with command line: " + JSON.stringify([]));\n// END MONACOCHANGE`
|
||||
tsServices = tsServices.replace(beforeProcess, afterProcess);
|
||||
|
||||
var tsServices_amd = tsServices +
|
||||
`
|
||||
// MONACOCHANGE
|
||||
|
|
@ -64,6 +70,7 @@ export = ts;
|
|||
// END MONACOCHANGE
|
||||
`;
|
||||
fs.writeFileSync(path.join(TYPESCRIPT_LIB_DESTINATION, 'typescriptServices.d.ts'), dtsServices);
|
||||
|
||||
})();
|
||||
|
||||
function importLibs() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue