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
{{ message }}
Repository navigation
Wrong tuple inference of async IIFE return valueΒ #44992
// β Type '(string | number)[]' is not assignable to type '[one: number, two: string]'.constnowork: Promise<[one: number,two: string]>=(async()=>{return[1,'two'];})();
π Expected behavior
As with supplying an instance of Promise, correctly infer returned value as assignable to the variable.
Activity
RyanCavanaugh commentedon Jul 12, 2021
Also works: