diff --git a/chapter-03-the-liskov-substitution-principle/dropboxFile.js b/chapter-03-the-liskov-substitution-principle/dropboxFile.js new file mode 100644 index 0000000..57391ba --- /dev/null +++ b/chapter-03-the-liskov-substitution-principle/dropboxFile.js @@ -0,0 +1,25 @@ +/** + * In order to improve the understanding of this code, this file it is supposing to implement the following interface: + * + * interface FileInterface { + * function rename(name); + * function changeOwner(user, group); + * } + * + * Quack Quack Quack 🦆 typing :D + */ + +function dropboxFile() { + function rename(name) {} + + function changeOwner(user, group) { + new Error('Not implemented for Dropbox files'); + } + + return { + rename, + changeOwner, + }; +} + +module.exports = dropboxFile;