Closed zepumph closed 1 year ago
We also considered passing in an array of ()=>Screen
. But @zepumph and I agree that this or the proposal above is not a good use of time. We would like to avoid this explicit "non-goal" of TypeScript in https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals#non-goals
[the goal is not to] Apply a sound or "provably correct" type system. Instead, strike a balance between correctness and productivity.
Over in https://github.com/phetsims/joist/issues/886, @samreid and I came to an initial understanding (needs more investigation) that one of the only "fully correct" solutions for the TypeScript parameterization of Screen is to remove the notion of createView, which takes a TModel as a parameter.
For example, this patch is supportive of having AnyScreen's model type be TModel: