mirror of
https://github.com/chinchang/web-maker.git
synced 2025-05-15 14:55:20 +02:00
fix typescript compilation
This commit is contained in:
parent
758e91df31
commit
80b8da075c
@ -557,13 +557,19 @@ settingsBtn, onboardModal, notificationsBtn, onboardShowInTabOptionBtn, onboardD
|
||||
/* eslint-disable no-throw-literal */
|
||||
throw ({ description: code.diagnostics[0].messageText, lineNumber: ts.getLineOfLocalPosition(code.diagnostics[0].file,code.diagnostics[0].start) });
|
||||
}
|
||||
try {
|
||||
ast = esprima.parse(code.outputText, {
|
||||
tolerant: true,
|
||||
jsx: true
|
||||
});
|
||||
} finally {
|
||||
if (shouldPreventInfiniteLoops !== false) {
|
||||
utils.addInfiniteLoopProtection(ast);
|
||||
}
|
||||
d.resolve(escodegen.generate(ast));
|
||||
}
|
||||
} catch (e) {
|
||||
showErrors('js', [ { lineNumber: e.lineNumber - 1, message: e.description } ]);
|
||||
} finally {
|
||||
if (shouldPreventInfiniteLoops !== false) {
|
||||
// utils.addInfiniteLoopProtection(ast);
|
||||
}
|
||||
d.resolve(code.outputText);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user