Skip to content

refactor(table): remove redundant constructors #12301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 26, 2018
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
23 changes: 4 additions & 19 deletions src/lib/table/cell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/

import {Directive, ElementRef, Input, TemplateRef} from '@angular/core';
import {Directive, ElementRef, Input} from '@angular/core';
import {
CdkCell,
CdkCellDef,
Expand All @@ -23,12 +23,7 @@ import {
selector: '[matCellDef]',
providers: [{provide: CdkCellDef, useExisting: MatCellDef}]
})
export class MatCellDef extends CdkCellDef {
// TODO(andrewseguin): Remove this constructor after compiler-cli is updated; see issue #9329
constructor(/** @docs-private */ public template: TemplateRef<any>) {
super(template);
}
}
export class MatCellDef extends CdkCellDef {}

/**
* Header cell definition for the mat-table.
Expand All @@ -38,12 +33,7 @@ export class MatCellDef extends CdkCellDef {
selector: '[matHeaderCellDef]',
providers: [{provide: CdkHeaderCellDef, useExisting: MatHeaderCellDef}]
})
export class MatHeaderCellDef extends CdkHeaderCellDef {
// TODO(andrewseguin): Remove this constructor after compiler-cli is updated; see issue #9329
constructor(/** @docs-private */ public template: TemplateRef<any>) {
super(template);
}
}
export class MatHeaderCellDef extends CdkHeaderCellDef {}

/**
* Footer cell definition for the mat-table.
Expand All @@ -53,12 +43,7 @@ export class MatHeaderCellDef extends CdkHeaderCellDef {
selector: '[matFooterCellDef]',
providers: [{provide: CdkFooterCellDef, useExisting: MatFooterCellDef}]
})
export class MatFooterCellDef extends CdkFooterCellDef {
// TODO(andrewseguin): Remove this constructor after compiler-cli is updated; see issue #9329
constructor(/** @docs-private */ public template: TemplateRef<any>) {
super(template);
}
}
export class MatFooterCellDef extends CdkFooterCellDef {}

/**
* Column definition for the mat-table.
Expand Down
22 changes: 3 additions & 19 deletions src/lib/table/row.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
ChangeDetectionStrategy,
Component,
Directive,
IterableDiffers, TemplateRef,
ViewEncapsulation
} from '@angular/core';
import {
Expand All @@ -30,12 +29,7 @@ import {
providers: [{provide: CdkHeaderRowDef, useExisting: MatHeaderRowDef}],
inputs: ['columns: matHeaderRowDef', 'sticky: matHeaderRowDefSticky'],
})
export class MatHeaderRowDef extends CdkHeaderRowDef {
// TODO(andrewseguin): Remove this constructor after compiler-cli is updated; see issue #9329
constructor(template: TemplateRef<any>, _differs: IterableDiffers) {
super(template, _differs);
}
}
export class MatHeaderRowDef extends CdkHeaderRowDef {}

/**
* Footer row definition for the mat-table.
Expand All @@ -46,12 +40,7 @@ export class MatHeaderRowDef extends CdkHeaderRowDef {
providers: [{provide: CdkFooterRowDef, useExisting: MatFooterRowDef}],
inputs: ['columns: matFooterRowDef', 'sticky: matFooterRowDefSticky'],
})
export class MatFooterRowDef extends CdkFooterRowDef {
// TODO(andrewseguin): Remove this constructor after compiler-cli is updated; see issue #9329
constructor(template: TemplateRef<any>, _differs: IterableDiffers) {
super(template, _differs);
}
}
export class MatFooterRowDef extends CdkFooterRowDef {}

/**
* Data row definition for the mat-table.
Expand All @@ -63,12 +52,7 @@ export class MatFooterRowDef extends CdkFooterRowDef {
providers: [{provide: CdkRowDef, useExisting: MatRowDef}],
inputs: ['columns: matRowDefColumns', 'when: matRowDefWhen'],
})
export class MatRowDef<T> extends CdkRowDef<T> {
// TODO(andrewseguin): Remove this constructor after compiler-cli is updated; see issue #9329
constructor(template: TemplateRef<any>, _differs: IterableDiffers) {
super(template, _differs);
}
}
export class MatRowDef<T> extends CdkRowDef<T> {}

/** Footer template container that contains the cell outlet. Adds the right class and role. */
@Component({
Expand Down