[labs/context]: Invalid example code
See original GitHub issueDescription
The example given under “Consuming a context” is invalid. The code raises a TypeScript error.
Steps to Reproduce
The code in the example already produces the error. It also imports contextRequest
and then uses contextProvided
.
Expected Results
The example code should be valid.
Actual Results
Argument of type 'Logger' is not assignable to parameter of type 'ReactiveElement & Record<"logger", Logger>'.
Type 'Logger' is not assignable to type 'Record<"logger", Logger>'.
Types of property 'logger' are incompatible.
Type 'Logger | undefined' is not assignable to type 'Logger'.
Type 'undefined' is not assignable to type 'Logger'.
Browsers Affected
- Chrome
- Firefox
- Edge
- Safari 11
- Safari 10
- IE 11
Issue Analytics
- State:
- Created a year ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
User documentation and Field Lab plan
Field Labs Context. Design of architecture. TITANIUM partners have chosen a general policy to develop their tools, on-premises software ...
Read more >Sketchup Mirror Component - Niya Strumenti Musicali
Live Components by SketchUp Labs SketchUp Labs. Context-click the component and ... Autocad/Sketchup Video Tutorial Collection-----Need more Tutorials ??
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 FreeTop 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
Top GitHub Comments
I have a fix for this in https://github.com/lit/lit/pull/3398
Yep I was suggesting this as a workaround rather than good practice 😃