Skip to content

Commit

Permalink
[fixed] types on motionObservable._read()
Browse files Browse the repository at this point in the history
Reviewers: O2 Material Motion, O3 Material JavaScript platform reviewers, #material_motion, featherless

Reviewed By: O2 Material Motion, #material_motion, featherless

Tags: #material_motion

Differential Revision: http://codereview.cc/D3084
  • Loading branch information
appsforartists committed Apr 21, 2017
1 parent 426dd48 commit 850dc7c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/core/src/operators/foundation/_read.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
} from '../../types';

export interface MotionReadable<T> extends Observable<T> {
_read(): T;
_read(): T | undefined;
}

export function withRead<T, S extends Constructor<Observable<T>>>(superclass: S): S & Constructor<MotionReadable<T>> {
Expand All @@ -29,8 +29,8 @@ export function withRead<T, S extends Constructor<Observable<T>>>(superclass: S)
* Returns the current value of an observable property (e.g. a subject or
* remembered stream).
*/
_read(): T {
let result: T;
_read(): T | undefined {
let result: T | undefined;

this.subscribe(
(value: T) => {
Expand Down

0 comments on commit 850dc7c

Please sign in to comment.