Skip to content

Instantly share code, notes, and snippets.

@hw0k
Created March 26, 2020 06:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hw0k/7c1add34010f2b74e3955dc95617d493 to your computer and use it in GitHub Desktop.
Save hw0k/7c1add34010f2b74e3955dc95617d493 to your computer and use it in GitHub Desktop.
LID 12
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