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