example export const until = async < DataType = unknown , ErrorType = Error > ( promise ) : Promise < [ ErrorType , DataType ] > => { try { const data = await promise ( ) . catch ( ( error ) => { throw error ; } ) ; return [ null , data ] ; } catch ( error ) { return [ error , null ] ; } } ;