Async TypeScript function return jQuery promise
问题 I'm trying to build an MVC like controller in TypeScript and I'm having difficulty getting my async method to return a deferred promise. Here's my function signature: static async GetMatches(input: string, loc?: LatLng):JQueryPromise<any> { The compiler tells me that a 'JQueryPromise' is not a valid async function return type. I would have thought that something like this would be the most common use case for an async function but I can't find any examples. Any help? 回答1: JQueryPromise does