You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously, the type SpecWatchFilter in spec_test_runner was specified as a tuple, but it was later used with push. It's actually an array with a first element that is guaranteed to be present, and of type TargetId[].
In the upcoming Typescript 2.7, tuples will be fixed-length and this usage will fail. The fix is to change the definition of SpecWatchFilter to an interface that extends Array<TargetId[] | string> and whose required '0' property is a TargetId[]. I'll have a PR up shortly that does this.
Steps to reproduce:
Build with typescript@next.
Relevant Code:
// this will be an error in Typescript 2.7, because [targetIds].length === 1 // but [SpecFilterId[], string].length: 2constfilter: [SpecFilterId[],string]=[targetIds]as[SpecFilterId[],string];
The text was updated successfully, but these errors were encountered:
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
Previously, the type SpecWatchFilter in spec_test_runner was specified as a tuple, but it was later used with
push
. It's actually an array with a first element that is guaranteed to be present, and of type TargetId[].In the upcoming Typescript 2.7, tuples will be fixed-length and this usage will fail. The fix is to change the definition of SpecWatchFilter to an interface that extends Array<TargetId[] | string> and whose required '0' property is a TargetId[]. I'll have a PR up shortly that does this.
Steps to reproduce:
Build with typescript@next.
Relevant Code:
The text was updated successfully, but these errors were encountered: