What is the alternative for createProperty? #4434
-
Just upgraded to version 3.x and we get following warning in console:
We have export class ApplicationElement extends LitElement {
static createProperty(name, options) {
super.createProperty(name, { converter: CustomConverter, ...options });
}
} How should we solve this without |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
That's an excellent question. Pinging @justinfagnani and @rictic to see if they might have thoughts. Currently using the I think the alternative to overriding This does change the ergonomics such that users now have to use a different decorator rather than extend from the base class with the overridden p.s. Apologies for the missing doc on this. We do have an outstanding issue to address missing warning messages. |
Beta Was this translation helpful? Give feedback.
That's an excellent question. Pinging @justinfagnani and @rictic to see if they might have thoughts.
Currently using the
static properties
block or experimental TypeScript decorators will still callcreateProperty
. This deprecation is in preparation for removing thestatic properties
block and moving completely over to standard decorators when the feature has been available in all major browsers which will be way way in the future (likely years).I think the alternative to overriding
createProperty
for use with standard decorators would have to be creating your own version of the@property()
decorator. It could wrap the existing one herelit/packages/reactive-element/src/decorators/pro…