export function all( arr: any[], predicate: (val: any) => val is T ): arr is T[] { return arr.every(predicate); }