Created
April 13, 2025 05:38
-
-
Save avin-kavish/3586b3175eb52682e9c6fb485f0a98c5 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 GitProvider { | |
| download(): Code | |
| } | |
| class ProviderBase { | |
| endpoint: string | |
| } | |
| class GitHubProvider extends ProviderBase implements GitProvider { | |
| download() {} | |
| } | |
| class GitLabProvider extends ProviderBase implements GitProvider { | |
| download() {} | |
| } | |
| class CodeUser { | |
| constructor(private git: GitProvider) { | |
| } | |
| useCode() { | |
| const code = this.git.download() | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment