export const sleep = ( ms ) : Promise < null > => new Promise ( resolve => setTimeout ( ( ) => resolve ( null ) , ms ) ) ; export const id = ( str ) => `#${ str }` ; export const getOperationDisplayName = ( operation ) => { switch ( operation ) { case 'add' : return 'Adding' ; case 'edit' : return 'Updating' ; case 'complete' : return 'Fixing' ; default : throw new Error ( 'Unknown operation type' ) ; } } ;