From a3564af820c9de64c24ffe69e3f589fb8d9a70b0 Mon Sep 17 00:00:00 2001 From: Dumitru Deveatii Date: Wed, 6 Feb 2019 10:40:08 +0200 Subject: [PATCH] ISP sample: review formatting --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index c515fd6..9dff248 100644 --- a/README.md +++ b/README.md @@ -1660,13 +1660,13 @@ What it really means is that you should always design your abstractions in a way **Bad:** ```ts -interface ISmartPrinter { +interface SmartPrinter { print(); fax(); scan(); } -class AllInOnePrinter implements ISmartPrinter { +class AllInOnePrinter implements SmartPrinter { print() { // ... } @@ -1680,7 +1680,7 @@ class AllInOnePrinter implements ISmartPrinter { } } -class EconomicPrinter implements ISmartPrinter { +class EconomicPrinter implements SmartPrinter { print() { // ... } @@ -1698,19 +1698,19 @@ class EconomicPrinter implements ISmartPrinter { **Good:** ```ts -interface IPrinter { +interface Printer { print(); } -interface IFax { +interface Fax { fax(); } -interface IScanner { +interface Scanner { scan(); } -class AllInOnePrinter implements IPrinter, IFax, IScanner { +class AllInOnePrinter implements Printer, Fax, Scanner { print() { // ... } @@ -1724,7 +1724,7 @@ class AllInOnePrinter implements IPrinter, IFax, IScanner { } } -class EconomicPrinter implements IPrinter { +class EconomicPrinter implements Printer { print() { // ... }