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>)
| 1800 | /// → `this.<field>[]`, `this['svc']` → `this.svc`; None for any other |
| 1801 | /// subscript. Mirrors tsThisSubscriptReceiver. |
| 1802 | fn this_subscript_of(&self, receiver: Node<'t>) -> Option<String> { |
| 1803 | if receiver.kind() != "subscript_expression" { |
| 1804 | return None; |
| 1805 | } |
| 1806 | let object = peel_receiver(receiver.child_by_field_name("object")?); |
| 1807 | if object.kind() == "this" { |
| 1808 | let key = self.quoted_identifier(receiver.child_by_field_name("index")?)?; |
| 1809 | return Some(format!("this.{key}")); |
| 1810 | } |
| 1811 | self.this_field_of(object).map(|field| format!("this.{field}[]")) |
| 1812 | } |
| 1813 | |
| 1814 | /// `await f<T>(x)` parses with `await f` as the callee (#2586), and a |
| 1815 | /// prefix operator over a generic call the same way |
no test coverage detected