/** * for narrowing instance types with array.filter */ export const isInstanceOf = (Constructor: new (...args: any[]) => T) => (value: unknown): value is T => value instanceof Constructor