Unnecessary elaboration about not being assignable to type parameters (#42952)

This commit is contained in:
Jonas Hübotter authored and GitHub committed 2021-03-05 11:15:05 -08:00
1 parent 408c804103
commit 25375a2213
22 files changed
+162 -186

No files matched your search

@@ -0,0 +1,13 @@
// @lib: es2015
// @target: ES5
async function foo<T>(x: T): Promise<T> {
let yaddable = await getXOrYadda(x);
return yaddable;
}
interface Yadda {
stuff: string,
things: string,
}
declare function getXOrYadda<T>(x: T): T | Yadda;