Skip to content

Instantly share code, notes, and snippets.

@hw0k
Created March 26, 2020 06:28
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/7d656cd2494bc1018f5d70406c081f04 to your computer and use it in GitHub Desktop.
Save hw0k/7d656cd2494bc1018f5d70406c081f04 to your computer and use it in GitHub Desktop.
LID 11
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