Created
March 26, 2020 06:28
-
-
Save hw0k/7d656cd2494bc1018f5d70406c081f04 to your computer and use it in GitHub Desktop.
LID 11
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
class Keyboard implements Input { | |
getString(): string { | |
return 'Keyboard Input'; | |
} | |
} | |
class Console implements Output { | |
writeString(str: string): void { | |
console.log(`writed ${str} to console.`); | |
} | |
} | |
const k = new Keyboard(); | |
const c = new Console(); | |
Task.copy(k, c); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment