Last active
August 21, 2023 22:06
-
-
Save tuler/587195cfd9f01fd117a1457236860702 to your computer and use it in GitHub Desktop.
Factories and interfaces
This file contains 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 IShape {} | |
class Shape implements IShape {} | |
// Option A | |
interface IShapeFactory { | |
create(): Shape; | |
} | |
// Option B | |
interface IShapeFactory { | |
create(): IShape; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment