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
typeA=number|stringfunctionisNumber(_): _ is number{returntypeof_==='number'}constas: A[]=[1,2,'3']// (1) - OK: bs is number[]letbs=as.filter(isNumber)// (2) - Not OK - cs is still A[], but should be number[]letcs=as.filter(_=>isNumber(_))// (3) - Not OK - ds is still A[], but should be string[]letds=as.filter(_=>!isNumber(_))
Similar issues: #7657, #5101, #5951