This is an asynchronous function that returns a Promise.
Note: If you want to remove a downloaded file from disk and erase it from history, you have to call downloads.removeFile() before you call erase(). If you try it the other way around you'll get an error when calling downloads.removeFile(), because it no longer exists according to the browser.
A Promise. If the call was successful, the promise will be fulfilled with an array of integers representing the ids of the erased DownloadItems. If no items matching the query parameter could be found, the array will be empty. If the call failed, the promise will be rejected with an error message.