Method
constructor
(
tabs: Array<Tab | TabParam> = [],
public selectedIndex = tabs.length - 1,
)
Source from the content-addressed store, hash-verified
| 450 | tabs: Tab[] = [] |
| 451 | |
| 452 | constructor( |
| 453 | tabs: Array<Tab | TabParam> = [], |
| 454 | public selectedIndex = tabs.length - 1, |
| 455 | ) { |
| 456 | this.tabs = tabs.map((t) => { |
| 457 | if (t instanceof BookTab || t instanceof PageTab) return t |
| 458 | const isPage = typeof t === 'function' |
| 459 | return isPage ? new PageTab(t) : new BookTab(t) |
| 460 | }) |
| 461 | } |
| 462 | |
| 463 | get selectedTab() { |
| 464 | return this.tabs[this.selectedIndex] |
Callers
nothing calls this directly
Tested by
no test coverage detected