mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
Unnecessary elaboration about not being assignable to type parameters (#42952)
This commit is contained in:
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;
|
||||
Reference in new issue
Block a user