I am seeking to convert my existing JavaScript CustomElements/WebComponents (created with Lit v1 and later migrated to v2) into TypeScript.
For instance:
export class MyElement extends LitElement {
...
@property({type: String})
name = 'World';
...
}
... or you can check this example out: https://github.com/lit/lit-element-starter-ts/blob/main/src/my-element.ts#L37
Is there a way for me to declare a property as an array of my custom TypeScript classes?
For example, like this:
export class MyElement extends LitElement {
...
@property({type: Array<MyCustomClass>})
customClassArray = [];
// or: customClassArray = [new MyCustomClass("foo")];
...
}