forked from swimlane/ngx-datatable
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: introduce proper types for public API (#49)
BREAKING CHANGE: Almost every public API has now proper types. While this should in theory not affect applications it will now fail compilation if the APIs were used in an incorrect manner.
- Loading branch information
1 parent
bdab162
commit c3e30c7
Showing
107 changed files
with
979 additions
and
664 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 8 additions & 2 deletions
10
projects/ngx-datatable/src/lib/components/body/body-group-header-template.directive.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
import { Directive, TemplateRef } from '@angular/core'; | ||
import { GroupContext } from '../../types/cell-context.type'; | ||
|
||
@Directive({ | ||
selector: '[ngx-datatable-group-header-template]' | ||
}) | ||
export class DatatableGroupHeaderTemplateDirective { | ||
constructor(public template: TemplateRef<any>) {} | ||
export class DatatableGroupHeaderTemplateDirective<TRow> { | ||
static ngTemplateContextGuard<TRow>( | ||
directive: DatatableGroupHeaderTemplateDirective<TRow>, | ||
context: unknown | ||
): context is GroupContext<TRow> { | ||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.