The first string an attribute's arguments open with, by position or as `name:`.
(args: string, name: string)
| 520 | |
| 521 | /** The first string an attribute's arguments open with, by position or as `name:`. */ |
| 522 | function firstArgument(args: string, name: string): string | null { |
| 523 | return new RegExp(`^\\s*(?:${name}\\s*:\\s*)?['"]([^'"]+)['"]`).exec(args)?.[1] ?? null; |
| 524 | } |
| 525 | |
| 526 | /** `#[Hook('x')]` on a method, or on a class, where it names the method or means `__invoke`. */ |
| 527 | function oopHookReferences(filePath: string, content: string, declarations: readonly AttributedDeclaration[]): UnresolvedRef[] { |
no test coverage detected