Boolean filter improvement alternative: TS upgrade (#4840)
* upgrade typescript and use new feature * fix: typing error
This commit is contained in:
parent
50769b0b6f
commit
4437b9a557
6 changed files with 12 additions and 10 deletions
|
@ -375,11 +375,11 @@ export function usePostFeedQuery(
|
|||
}
|
||||
return undefined
|
||||
})
|
||||
.filter(<T>(n?: T): n is T => Boolean(n)),
|
||||
.filter(n => !!n),
|
||||
}
|
||||
return feedPostSlice
|
||||
})
|
||||
.filter(<T>(n?: T): n is T => Boolean(n)),
|
||||
.filter(n => !!n),
|
||||
})),
|
||||
],
|
||||
}
|
||||
|
|
|
@ -33,6 +33,6 @@ export function threadgateViewToSettings(
|
|||
}
|
||||
return setting
|
||||
})
|
||||
.filter(<T>(n?: T): n is T => Boolean(n))
|
||||
.filter(n => !!n)
|
||||
return settings
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue