Update comment

This commit is contained in:
Andrew Branch committed 2019-07-29 10:21:32 -07:00
1 parent 410ade094b
commit b646317d37
1 file changed
+3 -4
+3 -4
View File
@@ -704,10 +704,9 @@ namespace ts.codefix {
}
// If we’re in JavaScript, it can be difficult to tell whether the user wants to import
// from Node core modules or not. We can start by seeing if type acquisition has already
// downloaded @types/node, because if it has, that indicates that the user has already
// been using some Node core modules directly, as opposed to simply having @types/node
// accidentally as a dependency of a dependency.
// from Node core modules or not. We can start by seeing if the user is actually using
// any node core modules, as opposed to simply having @types/node accidentally as a
// dependency of a dependency.
if (isSourceFileJS(fromFile) && JsTyping.nodeCoreModules.has(moduleSpecifier)) {
if (usesNodeCoreModules === undefined) {
usesNodeCoreModules = consumesNodeCoreModules(fromFile);