Skip to content

Commit

Permalink
Screen-related work for phetsims/joist#827
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanolson committed Aug 3, 2022
1 parent 15dabe4 commit fd1f75e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/isArray.js → js/isArray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
*/

import phetCore from './phetCore.js';
import IntentionalAny from './types/IntentionalAny.js';

function isArray( array ) {
function isArray( array: IntentionalAny ): array is IntentionalAny[] {
// yes, this is actually how to do this. see http://stackoverflow.com/questions/4775722/javascript-check-if-object-is-array
return Object.prototype.toString.call( array ) === '[object Array]';
}
Expand Down

0 comments on commit fd1f75e

Please sign in to comment.