1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-06-05 22:09:38 +02:00

refactor(types): Sintassi "moderna" Array

This commit is contained in:
Maicol Battistini
2021-11-30 14:47:35 +01:00
parent a29a0c1c70
commit 17951a52dc
3 changed files with 6 additions and 6 deletions

View File

@ -87,11 +87,11 @@ export default class DataTable extends Component {
</div>;
}
tableColumns(children: Array<Children>) {
tableColumns(children: Children[]) {
return this.filterElements(children.flat(), TableColumn);
}
tableRows(children: Array<Children>) {
tableRows(children: Children[]) {
let rows = this.filterElements(children.flat(), TableRow);
if (this.attrs.has('checkable')) {
@ -105,11 +105,11 @@ export default class DataTable extends Component {
return rows;
}
tableFooter(children: Array<Children>) {
tableFooter(children: Children[]) {
return this.filterElements(children.flat(), TableFooter);
}
filterElements(elements: Array<Children>, tag: Component | string): Array<Children> {
filterElements(elements: Children[], tag: Component | string): Children[] {
const filtered = [];
for (const element: Vnode of elements) {