Skip to content

defaultState is now declared as a getter in the declaration file#409

Merged
WebReflection merged 1 commit into
WebReflection:masterfrom
yuretz:master
Aug 10, 2022
Merged

defaultState is now declared as a getter in the declaration file#409
WebReflection merged 1 commit into
WebReflection:masterfrom
yuretz:master

Conversation

@yuretz

@yuretz yuretz commented Aug 10, 2022

Copy link
Copy Markdown
Contributor

This is a tiny change to the .d.ts file that solves the issue described here with defaultState not being declared exactly the same way it was implemented and upsetting the type checker when e.g. overridden in a class derived from the Component.

get/set declarations in d.ts files should be supported since 3.6 release of TypeScript, which was 3 years ago. So, while in theory someone using hyperHTML with an older TS version is most likely to get unexpected type checking errors because of this change, but in practice there wouldn't be many people like this, I assume. I don't quite know what's your policy regarding breaking changes in the type declarations file, but now you know about it's potential effect.

Maybe TS compatibility warrants a note in the Readme somewhere, what do you think?

@coveralls

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 2832464441

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 85.179%

Totals Coverage Status
Change from base Build 1315038057: 0.0%
Covered Lines: 314
Relevant Lines: 347

💛 - Coveralls

@WebReflection WebReflection merged commit b26fc6f into WebReflection:master Aug 10, 2022
@yuretz

yuretz commented Aug 11, 2022

Copy link
Copy Markdown
Contributor Author

Thanks for merging it Andrea, very much appreciated! 🙏
Do you think you would be able to publish a new version to npm sometime soon?

@WebReflection

Copy link
Copy Markdown
Owner

@yuretz apologies I'm on vacation it took your reminder to remind me to do that ... which I did now 👋

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants