TS/JS wrappers that keep a member call's receiver the same object (mirrors TS_JS_TRANSPARENT_RECEIVER_TYPES in tree-sitter.ts).
(kind: &str)
| 2265 | /// TS/JS wrappers that keep a member call's receiver the same object |
| 2266 | /// (mirrors TS_JS_TRANSPARENT_RECEIVER_TYPES in tree-sitter.ts). |
| 2267 | fn is_transparent_receiver(kind: &str) -> bool { |
| 2268 | matches!( |
| 2269 | kind, |
| 2270 | "parenthesized_expression" |
| 2271 | | "non_null_expression" |
| 2272 | | "as_expression" |
| 2273 | | "satisfies_expression" |
| 2274 | | "type_assertion" |
| 2275 | | "await_expression" |
| 2276 | ) |
| 2277 | } |
| 2278 | |
| 2279 | /// Strip transparent wrappers off a receiver (mirrors peelTsJsReceiver), |
| 2280 | /// including the grammar's `(a && b)!` parse of `a && b!`. |