I have a property on a component that worked in JavaScript, but have problems with Typescript:
props: {
keep_open: {
type: Array,
default: () => [],
}
}
This definition doesn't fail here, but later in the code:
let keepOpen: Array<string> = [this.data.popupId];
this.keep_open.forEach((id) => {
keepOpen.push(id);
});
The id from Keep_Open is type undefined and will not push into KeepOpen.
How do I fix this, either in the later code or in the definition of the properties?
type: Array as PropType<Array<string>>?