# cp.rx.go.If.Then

A Statement.Modifier that defines what happens when an If matches.


# Submodules


# API Overview

Constants - Useful values which cannot be changed

  • Then

Methods - API calls which can only be made on an object returned by a constructor

  • Otherwise
  • Then

# API Documentation

# Constants

# Then

Signature cp.rx.go.If.Then <cp.rx.go.Statement.Modifier>
Type Constant
Description This is a configuration of SetProp, which should be created via SetProp:To(value)
Notes None
Source src/extensions/cp/rx/go/SetProp.lua line 99

# Methods

# Otherwise

Signature cp.rx.go.If.Then:Otherwise(...) -> If.Then.Otherwise
Type Method
Description Call this to define what will happen if value doesn't resolve successfully.
Parameters
  • ... - The list of resolveable values to process for the unsuccessful If result.
Returns
  • The Then Statement.Modifier.
Notes
  • The parameters can be any resolvable type.
  • For example:
  • lua</li><li>If(anObservable)</li><li>:Then(function(aResult)</li><li> doSomethingWith(aResult, anotherResult)</li><li> return true</li><li>end)</li><li>:Otherwise(false)</li><li>
Examples None
Source src/extensions/cp/rx/go/If.lua line 165

# Then

Signature cp.rx.go.If.Then:Then(...) -> If.Then
Type Method
Description Each Then can have a subsequent Then which will be executed after the previous one resolves.
Parameters
  • ... - The list of resolvable values to process for the sucessful If result.
Returns
Notes None
Examples None
Source src/extensions/cp/rx/go/If.lua line 150