A receiver subscripting the enclosing class's object: `this. [k]` → `this. []`, `this['svc']` → `this.svc`; None for any other subscript. Mirrors tsThisSubscriptReceiver.
(&self, receiver: Node<'t>)
| 1953 | /// → `this.<field>[]`, `this['svc']` → `this.svc`; None for any other |
| 1954 | /// subscript. Mirrors tsThisSubscriptReceiver. |
| 1955 | fn this_subscript_of(&self, receiver: Node<'t>) -> Option<String> { |
| 1956 | if receiver.kind() != "subscript_expression" { |
| 1957 | return None; |
| 1958 | } |
| 1959 | let object = peel_receiver(receiver.child_by_field_name("object")?); |
| 1960 | if object.kind() == "this" { |
| 1961 | let key = self.quoted_identifier(receiver.child_by_field_name("index")?)?; |
| 1962 | return Some(format!("this.{key}")); |
| 1963 | } |
| 1964 | self.this_field_of(object).map(|field| format!("this.{field}[]")) |
| 1965 | } |
| 1966 | |
| 1967 | /// `await f<T>(x)` parses with `await f` as the callee (#2586), and a |
| 1968 | /// prefix operator over a generic call the same way |
no test coverage detected