I would like to convert my existing Javascript CustomElements/WebComponents (made with Lit v1 and ported to v2) to TypeScript.
Example:
export class MyElement extends LitElement {
...
@property({type: String})
name = 'World';
...
}
... or another one: https://github.com/lit/lit-element-starter-ts/blob/main/src/my-element.ts#L37
How can I define a property as an array of my custom typescript classes?
E.g. something like this:
export class MyElement extends LitElement {
...
@property({type: Array<MyCustomClass>})
customClassArray = [];
// or: customClassArray = [new MyCustomClass("foo")];
...
}