Identifier-rooted member chains have no inferred property type (#1566), including host API chains (#1707). Keep the existing window namespace escape; call-result and `this` receivers are outside this guard.
(&self, receiver: Node<'t>)
| 2157 | /// including host API chains (#1707). Keep the existing window namespace |
| 2158 | /// escape; call-result and `this` receivers are outside this guard. |
| 2159 | fn is_unresolved_member_chain(&self, receiver: Node<'t>) -> bool { |
| 2160 | let mut cur = receiver; |
| 2161 | if !matches!(cur.kind(), "member_expression" | "subscript_expression") { |
| 2162 | return false; |
| 2163 | } |
| 2164 | while matches!(cur.kind(), "member_expression" | "subscript_expression") { |
| 2165 | match cur.child_by_field_name("object") { |
| 2166 | Some(next) => cur = next, |
| 2167 | None => return false, |
| 2168 | } |
| 2169 | } |
| 2170 | cur.kind() == "identifier" && self.text(cur) != "window" |
| 2171 | } |
| 2172 | |
| 2173 | pub(super) fn extract_call(&mut self, node: Node<'t>) { |
| 2174 | if self.stack.is_empty() { |