Skip to content

@my-swu/simulator-client


@my-swu/simulator-client / PendingChoiceView

Type Alias: PendingChoiceView ​

PendingChoiceView = PendingAbilityCardChoiceView & object | PendingAbilityModeChoiceView & object | PendingAbilityNameChoiceView & object | PendingAbilityAspectChoiceView & object | PendingAbilityAttackChoiceView & object | PendingDistributionView & object | PendingAbilityOrderChoiceView & object | DelayedEffectOrderChoiceView & object

Defined in: packages/ts-sdk/src/generated/types/common.ts:4714

The single prompt payload a viewer is being asked for.

One variant per legal prompt, so "exactly one payload is present" is a property of the type rather than an agreement between seven Options and the [PromptState] discriminant. The payload types are the same ones the individual fields carry, so a migrating client changes only where it reads from, never what it reads.

Example:

ts
import type { PendingChoiceView } from '@my-swu/simulator-client'

const pendingChoiceView: PendingChoiceView = {
  "abilityId": 0,
  "sourceCardId": 0,
  "label": 'example',
  "min": 0,
  "max": 0,
  "hiddenZone": "deckSearch",
  "hiddenZoneOwner": "one",
  "chooser": "one",
  "revealMode": "privateLook",
  "searchedCards": [],
  "candidateCards": [],
  "creditTokenCounts": [],
  "type": "abilityCard",
}

console.log(pendingChoiceView)

Released under the MIT License.