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
// you need to save/refresh page in playground to get rid of effect after (un)comment// import '@total-typescript/ts-reset';constisPropTruthy=<T,KextendskeyofT>(propName: K)=>{return(item: T): item is T&Required<Pick<T,K>>=>!!item[propName];};interfaceUser{id?: string,//...}constclient={deleteUser: (id: string)=>{}};([]asUser[]).filter(isPropTruthy('id')).map((user)=>client.deleteUser(user.id));// inferred as User & Required<Pick<User, 'id'>//no rule// no errors//with rule// error TS2345: Argument of type 'string' is not assignable to parameter of type 'never'.// error TS2339: Property 'id' does not exist on type 'Required<Pick<unknown, never>>'.
Hi,
playground
Any idea what's causing inference to stop working?
Thank you!
tsc 5.3.2
The text was updated successfully, but these errors were encountered: