C:\\dev\\OpenCMS\\Website\\Frontend\\Scripts\\libs\\sinnovations>tsc sinnovations.listv iewbase.ts --module amd C:/dev/OpenCMS/Website/Frontend/Scripts/li
I am afraid you need to define the interface in another file. e.g.
a.ts:
interface Column {
label: string;
}
and your code :
///
///
import ko = require('knockout');
var _templateBase = '/Frontend/Templates/ListView/';
class ListViewBase {
columns: KnockoutObservableArray = ko.observableArray([]);
rows: KnockoutObservableArray = ko.observableArray([]);
constructor(public templateHeaderRow = _templateBase+'DefaultTableHeaderTemplate', public templateBodyRow = _templateBase + 'DefaultTableRowTemplate') {
}
addColumn(column: Column) {
this.columns.push(column);
}
addRow(row: T) {
this.rows.push(row);
}
static configure(templateBase) {
_templateBase = templateBase;
}
}
export = ListViewBase;