Calendar/src/types/ColumnDataSource.ts

19 lines
543 B
TypeScript
Raw Normal View History

/**
* IColumnDataSource - Defines the contract for providing column data
*
* This interface abstracts away whether columns represent dates or resources,
* allowing the calendar to switch between date-based and resource-based views.
*/
export interface IColumnDataSource {
/**
* Get the list of column identifiers to render
* @returns Array of identifiers (dates or resource IDs)
*/
getColumns(): Date[];
/**
* Get the type of columns this datasource provides
*/
getType(): 'date' | 'resource';
}