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