Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

secondLocaleStringsProperty has type any #18

Open
pixelzoom opened this issue Jan 12, 2023 · 2 comments
Open

secondLocaleStringsProperty has type any #18

pixelzoom opened this issue Jan 12, 2023 · 2 comments

Comments

@pixelzoom
Copy link
Contributor

In NumberSuiteCommonPreferences.ts, this use of IntentionalAny seems to be causing problems with addressing phetsims/number-play#197:

  // helper Properties derived from preference Properties
  public readonly secondLocaleStringsProperty: TReadOnlyProperty<IntentionalAny>;

I'll investigate why this is IntentionalAny, and whether we can make it type-specific.

@pixelzoom pixelzoom self-assigned this Jan 12, 2023
@pixelzoom
Copy link
Contributor Author

secondLocaleStringsProperty is an object literal that contains the complete set of strings for the second locale.

@pixelzoom
Copy link
Contributor Author

pixelzoom commented Jan 12, 2023

This is a nasty little problem, and resolving it means addressing phetsims/number-play#199 and the problem of string Properties for the secondary locale. Since that issues is deferred, I decided to (mostly) punt on this issue for now, and label it as deferred.

I did rename a couple of things for clarity, see above commits. And I replace the multiple occurrences of IntentionalAny with a type that is defined in NumberSuiteCommonPreferences.ts:

//TODO https://github.com/phetsims/number-suite-common/issues/18 replace any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export type SecondLocaleStrings = any;

@pixelzoom pixelzoom removed their assignment Jan 12, 2023
@pixelzoom pixelzoom changed the title secondLocaleStringsProperty: TReadOnlyProperty<IntentionalAny> secondLocaleStringsProperty has type any Jan 12, 2023
zepumph added a commit that referenced this issue Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant