Bump dev w/ eslint (#603)

* Bump dev w/ eslint

* Mop-up remaining lint issues

* Update stringShorten expectation
This commit is contained in:
Jaco Greeff
2020-05-23 14:23:13 +02:00
committed by GitHub
parent fd9ce319a5
commit 18a202c460
52 changed files with 436 additions and 352 deletions
+4 -4
View File
@@ -21,8 +21,8 @@ import isUndefined from '../is/undefined';
* ```
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export default function arrayFilter (array: any[], allowNulls = true): any[] {
return array.filter((value): boolean => {
return !isUndefined(value) && (allowNulls || !isNull(value));
});
export default function arrayFilter <T = any> (array: T[], allowNulls = true): T[] {
return array.filter((value) =>
!isUndefined(value) && (allowNulls || !isNull(value))
);
}