Skip to content

Commit

Permalink
[_refactored] properties into own folder
Browse files Browse the repository at this point in the history
Reviewers: O3 Material JavaScript platform reviewers, #material_motion, O2 Material Motion, featherless

Reviewed By: #material_motion, O2 Material Motion, featherless

Tags: #material_motion

Differential Revision: http://codereview.cc/D2493
  • Loading branch information
appsforartists committed Jan 12, 2017
1 parent aa5b217 commit 6682bae
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ import {

import {
IndefiniteSubject,
} from './IndefiniteSubject';
} from '../IndefiniteSubject';

import {
ScopedReadable,
ScopedWritable,
} from './types';
} from '../types';

export class ReactiveProperty<T> implements Observable<T>, ScopedReadable<T>, ScopedWritable<T> {
// ReactiveProperty delegates all of its reactive functionality to an internal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@

import {
ScopedReadable,
} from './types';
} from '../types';

export function constantProperty<T>(value: T): ScopedReadable<T> {
return {
read: () => value,
};
};
export default constantProperty;
21 changes: 21 additions & 0 deletions packages/streams/src/properties/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/** @license
* Copyright 2016 - present The Material Motion Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/

export * from './ReactiveProperty';
export { default as ReactiveProperty } from './ReactiveProperty';

export * from './constantProperty';
export { default as constantProperty } from './constantProperty';

0 comments on commit 6682bae

Please sign in to comment.