Skip to content

Commit

Permalink
fix(Table): refactor to fix docs generation issue
Browse files Browse the repository at this point in the history
Apparently compodoc can't handle an array being passed to exports and declarations
  • Loading branch information
benjamincharity committed Feb 18, 2020
1 parent fbb5fc1 commit 49fabff
Showing 1 changed file with 35 additions and 22 deletions.
57 changes: 35 additions & 22 deletions terminus-ui/table/src/table.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,7 @@ export * from './row';
export * from './table.component';


const EXPORTED_DECLARATIONS = [
// Table
TsTableComponent,

// Template definitions
TsCellDefDirective,
TsColumnDefDirective,
TsHeaderCellDefDirective,
TsHeaderRowDefDirective,
TsRowDefDirective,

// Cell directives
TsCellDirective,
TsHeaderCellDirective,

// Row directives
TsHeaderRowComponent,
TsRowComponent,
];

// NOTE: Moving declarations/exports items into shared array breaks documentation generation.
@NgModule({
imports: [
CdkTableModule,
Expand All @@ -54,10 +35,42 @@ const EXPORTED_DECLARATIONS = [
TsSortModule,
],
declarations: [
...EXPORTED_DECLARATIONS,
// Table
TsTableComponent,

// Template definitions
TsCellDefDirective,
TsColumnDefDirective,
TsHeaderCellDefDirective,
TsHeaderRowDefDirective,
TsRowDefDirective,

// Cell directives
TsCellDirective,
TsHeaderCellDirective,

// Row directives
TsHeaderRowComponent,
TsRowComponent,
],
exports: [
...EXPORTED_DECLARATIONS,
// Table
TsTableComponent,

// Template definitions
TsCellDefDirective,
TsColumnDefDirective,
TsHeaderCellDefDirective,
TsHeaderRowDefDirective,
TsRowDefDirective,

// Cell directives
TsCellDirective,
TsHeaderCellDirective,

// Row directives
TsHeaderRowComponent,
TsRowComponent,
],
})
export class TsTableModule {}

0 comments on commit 49fabff

Please sign in to comment.