Skip to content

[labs/context]: Invalid example code #3058

@oliversalzburg

Description

@oliversalzburg

Description

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions