phetsims / projectile-motion

"Projectile Motion" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
15 stars 13 forks source link

KeypadLayer.js:10:1 - error TS9005: Declaration emit for this file requires using private name 'addHelloText' #265

Closed samreid closed 3 years ago

samreid commented 3 years ago

From https://github.com/phetsims/chipper/issues/1055, I saw this error:

~/apache-document-root/main/chipper/tsconfig/projectile-motion$ tsc -b
../../../projectile-motion/js/lab/view/KeypadLayer.js:10:1 - error TS9005: Declaration emit for this file requires using private name 'addHelloText'. An explicit type annotation may unblock declaration emit.

10 import Utils from '../../../../dot/js/Utils.js';
   ~~~~~~

Found 1 error.

Like in https://github.com/phetsims/molecule-shapes/issues/185, I don't understand the cause of the problem, but maybe there is a trivial workaround.

samreid commented 3 years ago

I don't really understand the root cause of the problem, but it seemed it should be an arrow function like the other ones, and that seems to fix the problem. This seemed straightforward and I tested that the behavior is unchanged, so I don't think it warrants review, closing.