Skip to content

Commit

Permalink
Use validate instead of assertInstanceOf, see phetsims/axon#226
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid authored and zepumph committed Oct 22, 2019
1 parent 2b480ef commit 45302cf
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions js/accessibility/UtteranceQueueIO.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,13 @@ define( function( require ) {
var StringIO = require( 'TANDEM/types/StringIO' );
var VoidIO = require( 'TANDEM/types/VoidIO' );

// ifphetio
var assertInstanceOf = require( 'ifphetio!PHET_IO/assertInstanceOf' );

/**
* IO type for phet/scenery-phet's utteranceQueue
* @param {Object} utteranceQueue
* @param {string} phetioID
* @constructor
*/
function UtteranceQueueIO( utteranceQueue, phetioID ) {
assert && assertInstanceOf( utteranceQueue, Object );
ObjectIO.call( this, utteranceQueue, phetioID );
}

Expand Down Expand Up @@ -92,7 +88,8 @@ define( function( require ) {
}
}, {
documentation: 'Manages a queue of Utterances that are read in order by a screen reader.',
events: [ 'announced' ]
events: [ 'announced' ],
validator: { valueType: Object }
} );

sceneryPhet.register( 'UtteranceQueueIO', UtteranceQueueIO );
Expand Down

0 comments on commit 45302cf

Please sign in to comment.