From fd1f75e9a311d0c2cdbd6e756ce0644fa2a315eb Mon Sep 17 00:00:00 2001 From: Jonathan Olson Date: Wed, 3 Aug 2022 13:39:09 -0600 Subject: [PATCH] Screen-related work for https://github.com/phetsims/joist/issues/827 --- js/{isArray.js => isArray.ts} | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) rename js/{isArray.js => isArray.ts} (78%) diff --git a/js/isArray.js b/js/isArray.ts similarity index 78% rename from js/isArray.js rename to js/isArray.ts index c0657f6..463ad65 100644 --- a/js/isArray.js +++ b/js/isArray.ts @@ -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]'; }