I am using @lit-labs/context v0.3.3 and typescript v4.7.4 with experimentalDecorators support enabled. I have this custom element using lit context:
class MyComponent extends LitElement {
@consume({ context: loggedInContext })
@property({ attribute: false })
loggedIn: Boolean = false;
}
The context is working as expected, however I am getting the following typescript error just for the @consume
line:
Unable to resolve signature of property decorator when called as an expression.
Argument of type 'MyComponent' is not assignable to parameter of type 'ReactiveElement'.
Types have separate declarations of a private property '__instanceProperties'.ts(1240)
The other decorators have no such issue. Why am I seeing this error just for the @consume
decorator?