(src: string)
| 142 | } |
| 143 | |
| 144 | function dispatcherField(src: string): string | null { |
| 145 | const forOf = src.match(/\bof\s+(?:Array\.from\(\s*)?this\.(\w+)/); |
| 146 | if (forOf && /\b\w+\s*\(/.test(src)) return forOf[1]!; |
| 147 | const forEach = src.match(/this\.(\w+)\.forEach\(/); |
| 148 | if (forEach) return forEach[1]!; |
| 149 | return null; |
| 150 | } |
| 151 | |
| 152 | const FN_KINDS = new Set(['method', 'function', 'component']); |
| 153 |