diff --git a/src/cdk/scrolling/virtual-for-of.ts b/src/cdk/scrolling/virtual-for-of.ts index f6bc01b86447..11dd31b1697c 100644 --- a/src/cdk/scrolling/virtual-for-of.ts +++ b/src/cdk/scrolling/virtual-for-of.ts @@ -395,4 +395,11 @@ export class CdkVirtualForOf index, }; } + + static ngTemplateContextGuard( + directive: CdkVirtualForOf, + context: unknown, + ): context is CdkVirtualForOfContext { + return true; + } } diff --git a/tools/public_api_guard/cdk/scrolling.md b/tools/public_api_guard/cdk/scrolling.md index f7e4792d97e4..9298a326f1f4 100644 --- a/tools/public_api_guard/cdk/scrolling.md +++ b/tools/public_api_guard/cdk/scrolling.md @@ -121,6 +121,8 @@ export class CdkVirtualForOf implements CdkVirtualScrollRepeater, Collecti ngDoCheck(): void; // (undocumented) ngOnDestroy(): void; + // (undocumented) + static ngTemplateContextGuard(directive: CdkVirtualForOf, context: unknown): context is CdkVirtualForOfContext; readonly viewChange: Subject; // (undocumented) static ɵdir: i0.ɵɵDirectiveDeclaration, "[cdkVirtualFor][cdkVirtualForOf]", never, { "cdkVirtualForOf": { "alias": "cdkVirtualForOf"; "required": false; }; "cdkVirtualForTrackBy": { "alias": "cdkVirtualForTrackBy"; "required": false; }; "cdkVirtualForTemplate": { "alias": "cdkVirtualForTemplate"; "required": false; }; "cdkVirtualForTemplateCacheSize": { "alias": "cdkVirtualForTemplateCacheSize"; "required": false; }; }, {}, never, never, true, never, false>;