Created
August 22, 2018 20:32
-
-
Save ffMathy/d495e69c79dd9f172f3a640a1090d042 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
interface CalculatorInterface { | |
add(a: number, b: number): number; | |
subtract(a: number, b: number): number; | |
divide(a: number, b: number): number; | |
isEnabled: boolean; | |
} | |
class RealCalculator implements CalculatorInterface { | |
add(a: number, b: number) { return a + b; } | |
subtract(a: number, b: number) { return a - b; } | |
divide(a: number, b: number) { return a / b; } | |
get isEnabled() { return true; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment