Last active
October 12, 2017 06:23
-
-
Save schotime/1d530095078659715fec7bd574acb6e5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface A<T> { | |
something: T | |
} | |
function call(arg: (input: A<void>) => void): () => void; | |
function call<T>(arg: (input: A<T>) => T): (input: T) => void { | |
return {} as any; | |
} | |
interface Input { | |
title: string | |
} | |
call<Input>(x => x.something)({ title: "wow" }); //fails | |
call(x => x.something)(); //works |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment