(p: SyntaxNode)
| 336 | const params = getChildByField(declarator, 'parameters'); |
| 337 | if (!params || params.namedChildCount < 2) return undefined; |
| 338 | const loneIdentText = (p: SyntaxNode): string | null => |
| 339 | p.type === 'parameter_declaration' && |
| 340 | p.namedChildCount === 1 && |
| 341 | p.namedChild(0)?.type === 'type_identifier' |
| 342 | ? getNodeText(p.namedChild(0)!, source) |
| 343 | : null; |
| 344 | const first = params.namedChild(0); |
| 345 | const name = first ? loneIdentText(first) : null; |
| 346 | if (!name || !/[a-z]/.test(name)) return undefined; |
no test coverage detected