export interface UnsafeArray extends Array { 0: T; 1: T; 2: T; // Add more as you need, for testing purpose only } export const fromArray = (arr: Array) => arr as UnsafeArray; export const fromPromiseOfArray = (promise: Promise>) => promise as Promise>;