Typescript Types change from version 4.0.6 to version 4.0.7
See original GitHub issueHello guys,
when updating from version 4.0.6 to version 4.0.7 I lost a lot of types in lib/model/lightstate/LightState.d.ts
(attached a graphical diff).
Is changed something in type generator? I’m collecting a lot of error like this one:
error TS2339: Property 'hue' does not exist on type 'States'.
error TS2339: Property 'sat' does not exist on type 'States'.
error TS2345: Argument of type 'BaseStates' is not assignable to parameter of type 'LightState'. Type 'BaseStates' is missing the following properties from type 'LightState': white, hsb, hsl, rgb, and 14 more.
Thanks!

Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Documentation - TypeScript 4.0
TypeScript 4.0 brings two fundamental changes, along with inference improvements, to make typing these possible. The first change is that spreads in tuple...
Read more >Releases · microsoft/TypeScript - GitHub
TypeScript is a superset of JavaScript that compiles to clean JavaScript output. ... b4d382b Cherry-pick changes for narrowing to tagged literal types.
Read more >Announcing TypeScript 4.0 Beta - Microsoft Developer Blogs
TypeScript 4.0 brings two fundamental changes, along with inference improvements, to make typing these possible. The first change is that ...
Read more >The Angular Compiler requires TypeScript >=3.4.0 and <3.5.0 ...
Removing it completely means it will prevent npm from installing/using the most recent minor version (3.5.3). "typescript": "3.4.5". Changing it ...
Read more >types/mongodb, NodeJS open source component - Meterian
The repository for high quality TypeScript type definitions. Latest version: 4.0.7 registry icon. Maintenance score ... 4.0.6, 0, 0, 0, 0.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ah, that is certainly the information I was needing here… So it is the fact that base classes return only instances of the base class, hence the chaining end up breaking because of this.
I will have to look deeper into what is going on with respect to the TypeScript definition generation as this is just driven from the JSDoc.
Thanks for the clarification.
These have been set as Objects in the JSDoc for sometime now, and they are actual objects with keys and properties. The data payloads change depending upon the instance of the light.
Why is this being an Object causing issues in this case?