You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Windows.Foundation.WinRTPromise was defined as (WinRTPromiseBase<TResult, TProgress> & Promise<TResult>) to best represent what is actually projected, but this makes it harder to write mocks. TypeScript requires async methods to return a plain Promise<T> so returning a Windows.Foundation.WinRTPromise wouldn't be possible. Mocks would have to return an explicit Promise object instead of using async methods, or would have to cheat with as. So I would recommend defining Windows.Foundation.WinRTPromise as Promise<TResult> | (WinRTPromiseBase<TResult, TProgress> & Promise<TResult>);
The text was updated successfully, but these errors were encountered:
Windows.Foundation.WinRTPromise
was defined as(WinRTPromiseBase<TResult, TProgress> & Promise<TResult>)
to best represent what is actually projected, but this makes it harder to write mocks. TypeScript requires async methods to return a plainPromise<T>
so returning aWindows.Foundation.WinRTPromise
wouldn't be possible. Mocks would have to return an explicit Promise object instead of using async methods, or would have to cheat withas
. So I would recommend definingWindows.Foundation.WinRTPromise
asPromise<TResult> | (WinRTPromiseBase<TResult, TProgress> & Promise<TResult>);
The text was updated successfully, but these errors were encountered: