Loading
Convert IssueUrlRegexUtils to TypeScript
What does this MR do and why?
Converts IssueUrlRegexUtils and its spec to TypeScript. The Manage issue page and the Issues page use it to read issue URLs.
Closes #847 (closed)
What changed
- All three functions are now
functiondeclarations, like most helpers in the app (for exampleGidUtils.ts).isValidGitLabIssueUrlreturnsgetMatch(...) !== nullinstead of!!getMatch(...). - A judgment call:
typestays astring. Nothing reads it, and a'issues' | 'work_items'type would need a runtime check for something the regex already guarantees. Happy to narrow it if you'd prefer. - !3069 (merged) also imports
parseGitLabIssueUrl, inplatformIssues.ts. It already throws when the result isnull, so the two MRs can merge in either order.
Behaviour changes
None.
Part of &33.
Edited by Daniel Ahn