phetsims / axon

Axon provides powerful and concise models for interactive simulations, based on observable Properties and related patterns.
MIT License
10 stars 8 forks source link

Generic type 'EnumerationProperty<T>' requires 1 type argument(s). #372

Closed samreid closed 2 years ago

samreid commented 2 years ago

@KatieWoe pointed out that a number of sims are failing CT with:

number-play : build
Build failed with status code 1:
Running "report-media" task

Running "clean" task

Running "build" task
Fatal error: tsc failed with code: 2
stdout:
js/game/model/CountingGameLevel.ts(27,43): error TS2314: Generic type 'EnumerationProperty<T>' requires 1 type argument(s).
js/game/model/CountingGameLevel.ts(44,35): error TS2554: Expected 3 arguments, but got 2.

2 problems found.

stderr:

Snapshot from 12/10/2021, 2:12:38 AM

This is because EnumerationProperty was made generic without visiting all instantiation sites.

I'll take a look at high priority, but I have a few meetings this morning.

samreid commented 2 years ago

I put an <any> band-aid on until I can focus on this more.

samreid commented 2 years ago

I rolled EnumerationProperty back to *.js and removed the type parameters. We will proceed with the proposals in https://github.com/phetsims/chipper/issues/1106 instead, closing.