MCPcopy Create free account
hub / github.com/anomalyco/opencode / toPollResult

Method toPollResult

packages/opencode/src/account/account.ts:107–113  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105 error_description: Schema.String,
106}) {
107 toPollResult(): PollResult {
108 if (this.error === "authorization_pending") return new PollPending()
109 if (this.error === "slow_down") return new PollSlow()
110 if (this.error === "expired_token") return new PollExpired()
111 if (this.error === "access_denied") return new PollDenied()
112 return new PollError({ cause: this.error })
113 }
114}
115
116const DeviceToken = Schema.Union([DeviceTokenSuccess, DeviceTokenError])

Callers 1

account.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected