Skip to content

Commit

Permalink
chore: add-table-body-cell-directive-guard
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Platonov committed Jun 13, 2024
1 parent 3fca6ec commit f45b2dc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,11 @@ export class TableBodyCellTemplateDirective<T> {
@Input() public pupaTableBodyCellTemplateTypeFrom: T;

constructor(public readonly templateRef: TemplateRef<TableBodyCellContext<T>>) {}

public static ngTemplateContextGuard<T>(
_directive: TableBodyCellTemplateDirective<T>,
_context: unknown
): _context is TableBodyCellContext<T> {
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,11 @@ export class InfiniteScrollerItemTemplateDirective<T> {
@Input() public pupaInfiniteScrollerItemTemplateTypeFrom: T;

constructor(public readonly templateRef: TemplateRef<InfinityScrollerItemContext<T>>) {}

public static ngTemplateContextGuard<T>(
_directive: InfiniteScrollerItemTemplateDirective<T>,
_context: unknown
): _context is InfinityScrollerItemContext<T> {
return true;
}
}

0 comments on commit f45b2dc

Please sign in to comment.