File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17257,10 +17257,10 @@ namespace ts {
1725717257 function checkElementTypeOfArrayOrString(arrayOrStringType: Type, errorNode: Node): Type {
1725817258 Debug.assert(languageVersion < ScriptTarget.ES2015);
1725917259
17260- // After we remove all types that are StringLike, we will know if there was a string constituent
17261- // based on whether the remaining type is the same as the initial type.
1726217260 let arrayType = arrayOrStringType;
1726317261 if (arrayOrStringType.flags & TypeFlags.Union) {
17262+ // After we remove all types that are StringLike, we will know if there was a string constituent
17263+ // based on whether the result of filter is a new array.
1726417264 const arrayTypes = (arrayOrStringType as UnionType).types;
1726517265 const filteredTypes = filter(arrayTypes, t => !(t.flags & TypeFlags.StringLike));
1726617266 if (filteredTypes !== arrayTypes) {
You can’t perform that action at this time.
0 commit comments