Skip to content
This repository has been archived by the owner on Aug 13, 2021. It is now read-only.

Commit

Permalink
Standardize internal generic types.
Browse files Browse the repository at this point in the history
Reviewers: O4 Material Motion Apple platform reviewers, O2 Material Motion, markwei

Reviewed By: O4 Material Motion Apple platform reviewers, O2 Material Motion, markwei

Tags: #material_motion

Differential Revision: http://codereview.cc/D2156
  • Loading branch information
Jeff Verkoeyen committed Dec 8, 2016
1 parent 772c31e commit f6c06bc
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/MotionObservable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ import IndefiniteObservable
Spec: https://material-motion.github.io/material-motion/starmap/specifications/streams/MotionObservable
*/
public class MotionObservable<V>: IndefiniteObservable<MotionObserver<V>> {
public class MotionObservable<T>: IndefiniteObservable<MotionObserver<T>> {

/** Sugar for subscribing a MotionObserver. */
public func subscribe(next: @escaping (V) -> Void,
public func subscribe(next: @escaping (T) -> Void,
state: @escaping (MotionState) -> Void) -> Subscription {
return super.subscribe(observer: MotionObserver<V>(next: next, state: state))
return super.subscribe(observer: MotionObserver<T>(next: next, state: state))
}
}

Expand All @@ -55,15 +55,15 @@ public enum MotionState {
}

// Used internally to store observer state.
final class MotionObserver<V>: Observer {
public typealias Value = V
final class MotionObserver<T>: Observer {
public typealias Value = T

public init(next: @escaping (V) -> Void,
public init(next: @escaping (T) -> Void,
state: @escaping (MotionState) -> Void) {
self.next = next
self.state = state
}

public let next: (V) -> Void
public let next: (T) -> Void
public let state: (MotionState) -> Void
}

0 comments on commit f6c06bc

Please sign in to comment.