mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Prefer ChakraHost when available to node and WScript
This commit is contained in:
@@ -642,7 +642,10 @@ namespace ts {
|
||||
};
|
||||
}
|
||||
|
||||
if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") {
|
||||
if (typeof ChakraHost !== "undefined") {
|
||||
return getChakraSystem();
|
||||
}
|
||||
else if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") {
|
||||
return getWScriptSystem();
|
||||
}
|
||||
else if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof require !== "undefined") {
|
||||
@@ -650,9 +653,6 @@ namespace ts {
|
||||
// process.browser check excludes webpack and browserify
|
||||
return getNodeSystem();
|
||||
}
|
||||
else if (typeof ChakraHost !== "undefined") {
|
||||
return getChakraSystem();
|
||||
}
|
||||
else {
|
||||
return undefined; // Unsupported host
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user