My await statements inside the async functions are calls to jQuery\'s $.post() method which return a valid promise, however I am getting this error in TypeScript:
JQueryXHR has its own version of .then() which has some additional options:
then(doneCallback: (data: any, textStatus: string, jqXHR: JQueryXHR) => R, failCallback?: (jqXHR: JQueryXHR, textStatus: string, errorThrown: any) => void): JQueryPromise;
To use await in TypeScript with $.post, I had to remove that line from jquery.d.ts. TypeScript will then see the .then defined on JQueryGenericPromise.