I am currently working on a unique Angular and AngularJs hybrid application with TypeScript versions 9.07, 1.5.11, and 3.7.5. Our HTTP requests are all handled by a wrapper service written in plain Javascript, which was originally designed for the "legacy" AngularJs part of the application. This service generates $q promises using the AngularJs $http service, even for requests made from new Angular components. Since the service is plain JavaScript, there are no typing issues with return values as TypeScript treats them as any
, allowing me to cast them as IPromise<TReturnType>
.
My main query revolves around whether these promises are fully compatible with TypeScript's async
and await
keywords. I have tested it with simple examples and it seems to work fine, but I am wary of potential runtime issues that may arise when using those keywords with non-native Promises.