Permalink
Browse files

Fix typo(?): `ValidationResult` -> `Availability` (#1845)

  • Loading branch information...
dgoldman-pdx authored and freak4pc committed Jan 3, 2019
1 parent fb37967 commit 833378b69124c386647db5ec95cd377a6414a094
Showing with 3 additions and 3 deletions.
  1. +3 −3 Documentation/Examples.md
@@ -146,7 +146,7 @@ self.usernameOutlet.rx.text
let loadingValue = Availability.pending(message: "Checking availability ...")
// This will fire a server call to check if the username already exists.
// Its type is `Observable<ValidationResult>`
// Its type is `Observable<Bool>`
return API.usernameAvailable(username)
.map { available in
if available {
@@ -159,8 +159,8 @@ self.usernameOutlet.rx.text
// use `loadingValue` until server responds
.startWith(loadingValue)
}
// Since we now have `Observable<Observable<ValidationResult>>`
// we need to somehow return to a simple `Observable<ValidationResult>`.
// Since we now have `Observable<Observable<Availability>>`
// we need to somehow return to a simple `Observable<Availability>`.
// We could use the `concat` operator from the second example, but we really
// want to cancel pending asynchronous operations if a new username is provided.
// That's what `switchLatest` does.

0 comments on commit 833378b

Please sign in to comment.