(node: Node, module: SourceModule)
| 1157 | } |
| 1158 | |
| 1159 | const isGlobalHost = (node: Node, module: SourceModule): boolean => { |
| 1160 | const target = unwrapExpression(node) |
| 1161 | if (isUnboundGlobal(target, module, globalHostNames)) return true |
| 1162 | if (target.type !== "MemberExpression") return false |
| 1163 | const name = memberNameOf(target) |
| 1164 | return ( |
| 1165 | typeof name === "string" && |
| 1166 | globalHostNames.has(name) && |
| 1167 | isGlobalHost(target.object, module) |
| 1168 | ) |
| 1169 | } |
| 1170 | |
| 1171 | // e.g. `Array`, `Object`, `globalThis.Array`, `window.Object` |
| 1172 | const isBuiltinCtor = (node: Node, module: SourceModule): boolean => { |
no test coverage detected