export const sleep = (milliseconds: number): Promise => new Promise(res => { setTimeout(res, milliseconds) }) export const isRecord = (variable: any): variable is Record => { return ( typeof variable === 'object' && !Array.isArray(variable) && variable !== null ) }