mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
5a5813b055
Fix compilation issue with TypeScript nightly. TypeScript added a field `0` to `RegExpMatchArray` in https://github.com/microsoft/TypeScript/commit/3b80ddca212959ae5dcf2f48704be627283c6468. Before that, `RegExpMatchArray` and `RegExpExecArray` were identical. In one place Angular incorrectly expects `RegExpMatchArray` as the result of a RegExp#exec() call. This assignment fails on TypeScript nightly with the error: Property '0' is missing in type 'RegExpExecArray' but required in type 'RegExpMatchArray'. Fix the issue by using the type `RegExpExecArray` instead. This also works for older TypeScript versions. PR Close #47169