Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/navigation/column.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type { IView } from './view.ts'

import { checkOptionalProperty } from '../utils/objectValidation.ts'

interface ColumnData {
export interface IColumn {
/** Unique column ID */
id: string
/** Translated column title */
Expand All @@ -24,11 +24,11 @@ interface ColumnData {
summary?: (node: INode[], view: IView) => string
}

export class Column implements ColumnData {
export class Column implements IColumn {

private _column: ColumnData
private _column: IColumn

constructor(column: ColumnData) {
constructor(column: IColumn) {
validateColumn(column)
this._column = column
}
Expand Down Expand Up @@ -61,7 +61,7 @@ export class Column implements ColumnData {
* @param column - the column to check
* @throws {Error} if the column is not valid
*/
export function validateColumn(column: ColumnData): void {
export function validateColumn(column: IColumn): void {
if (typeof column !== 'object' || column === null) {
throw new Error('View column must be an object')
}
Expand Down
5 changes: 3 additions & 2 deletions lib/navigation/view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
*/

import type { IFolder, INode } from '../node/index.ts'
import type { IColumn } from './column.ts'

import isSvg from 'is-svg'
import { Column, validateColumn } from './column.ts'
import { validateColumn } from './column.ts'
import { checkOptionalProperty } from '../utils/objectValidation.ts'

export type ContentsWithRoot = {
Expand Down Expand Up @@ -82,7 +83,7 @@ export interface IView {
* This view column(s). Name and actions are
* by default always included
*/
columns?: Column[]
columns?: IColumn[]

/** The parent unique ID */
parent?: string
Expand Down