Skip to content
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.

Type theme property #612

Merged
merged 1 commit into from
Jul 25, 2017
Merged

Type theme property #612

merged 1 commit into from
Jul 25, 2017

Conversation

kitsonk
Copy link
Member

@kitsonk kitsonk commented Jul 12, 2017

Type: bug

The following has been addressed in the PR:

  • There is a related issue
  • All code matches the style guide
  • Unit or Functional tests are included in the PR

Description:

The theme property is typed as any when it could be typed as an index. This would prevent people from accidentally assigning themes that are not valid. I tried to type injectedTheme but there appears to be, likely, a code logic issue in that Themeable._theme is typed as ClassNames but there is also a comparison of theme !== injectedTheme in the code, which means that we are likely mis-handling something somewhere, but we should try to type injectedTheme and extraClasses with something that is more narrow than any as it is just too prone to downstream errors.

@kitsonk kitsonk merged commit 59790c9 into dojo:master Jul 25, 2017
@dylans dylans added this to the 2017.07 milestone Aug 9, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants