-
-
Save bleis-tift/4942909 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 { | |
hoge(str:string): string; | |
} | |
interface B { | |
hoge(str:string): string; | |
} | |
class AImpl implements A { | |
hoge(str) { | |
return str + "&" + str; | |
} | |
} | |
var fn = function(b: B) { | |
alert(b.hoge("test")); | |
} | |
fn(new AImpl()); | |
var aImpl = { | |
hoge:(str:string):string => { return "triple:" + str + str + str; } | |
}; | |
fn(aImpl); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment