Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
jbphet committed Jun 8, 2020
2 parents d6782d4 + f9afc50 commit aefb873
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
15 changes: 11 additions & 4 deletions js/Multilink.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
// Copyright 2014-2020, University of Colorado Boulder

/**
* A Multilink is an instance that can be used to link to multiple properties. It is very similar to a DerivedProperty,
* but has no value and does not conform to the Property API because it is intended for use with callbacks that do not
* compute a value. Multilink should not be created through calling its constructor directly, but through the
* Property.multilink and Property.lazyMultilink functions.
* Multilink is used to link to multiple properties. It is very similar to a DerivedProperty, but has no value and
* does not conform to the Property API because it is intended for use with callbacks that do not compute a value.
*
* For situations where a reference to the Multilink instance is not needed (for calling dispose), use convenience
* methods Property.multilink or Property.lazyLink to avoid these types of lint errors:
*
* // lint error: Do not use 'new' for side effects (no-new)
* new Multilink( ... );
*
* // lint error: 'multilink' is assigned a value but never used (no-unused-vars)
* const multilink = new Multilink( ... );
*
* @author Sam Reid (PhET Interactive Simulations)
*/
Expand Down
2 changes: 2 additions & 0 deletions js/ObservableArray.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ class ObservableArray extends PhetioObject {
* Returns true if some element in this ObservableArray matches the predicate.
* @param {function(item:*):boolean} predicate
* @returns {boolean}
* @public
*/
some( predicate ) {
return _.some( this._array, predicate );
Expand Down Expand Up @@ -430,6 +431,7 @@ class ObservableArray extends PhetioObject {
* Changes the ordering of elements in the array. Requires a Random source so that shuffles can be reproducible.
* No items are added or removed, and this method does not send out any notifications.
* @param {Random} random - from dot
* @public
*/
shuffle( random ) {
assert && assert( random, 'random must be supplied' );
Expand Down
1 change: 1 addition & 0 deletions js/PropertyStateHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class PropertyStateHandler {

/**
* @param {PhetioStateEngine} phetioStateEngine
* @public
*/
initialize( phetioStateEngine ) {
assert && assert( !this.initialized, 'cannot initialize twice' );
Expand Down

0 comments on commit aefb873

Please sign in to comment.