Last active
August 31, 2021 07:02
-
-
Save Lxxyx/1114ca3e0e9b9185cba7f5e10fae0a06 to your computer and use it in GitHub Desktop.
protocol
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 ProtocolClient {} | |
interface ProtocolAdapter {} | |
interface ProtocolLifeCycle {} | |
interface ProtocolBuilder { | |
client: ProtocolClient; | |
adapter: ProtocolAdapter; | |
lifeCycle: ProtocolLifeCycle; | |
} | |
interface ProtocolAbstractBuilder { | |
buildClient (): void | |
buildFunction (): void | |
buildLifeCycle (): void | |
} | |
class ProtocolDirector { | |
build (builder: ProtocolAbstractBuilder): void { | |
builder.buildClient() | |
builder.buildFunction() | |
builder.buildLifeCycle() | |
} | |
} | |
interface TriggerAdapter { | |
is (): boolean | |
// client | |
// api | |
// lifecycle | |
} | |
interface TriggerBuilder { | |
setTrigger (adapter: TriggerAdapter) {} | |
buildApi () {} | |
buildClient () {} | |
buildLifeCycle () {} | |
} | |
interface TriggerLifeCycle { | |
onReady () {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment