refactor(client): add proper types to never[] (#9340)
This commit is contained in:
parent
af9034355c
commit
bb3d274db6
5 changed files with 78 additions and 28 deletions
|
|
@ -123,7 +123,7 @@ export function lessThan(xs: number[], ys: number[]): boolean {
|
|||
* Returns the longest prefix of elements that satisfy the predicate
|
||||
*/
|
||||
export function takeWhile<T>(f: Predicate<T>, xs: T[]): T[] {
|
||||
const ys = [];
|
||||
const ys: T[] = [];
|
||||
for (const x of xs) {
|
||||
if (f(x)) {
|
||||
ys.push(x);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue