From 8b7d5600f5166cdef5b5830ff8e7311bf0346cd2 Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Mon, 4 May 2020 03:13:25 +0300 Subject: [PATCH] refactor(core): add partial to context types in projection.strategy --- .../src/lib/strategies/projection.strategy.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/npm/ng-packs/packages/core/src/lib/strategies/projection.strategy.ts b/npm/ng-packs/packages/core/src/lib/strategies/projection.strategy.ts index e7a62383a2..bc7c9201fd 100644 --- a/npm/ng-packs/packages/core/src/lib/strategies/projection.strategy.ts +++ b/npm/ng-packs/packages/core/src/lib/strategies/projection.strategy.ts @@ -95,7 +95,10 @@ export class TemplateProjectionStrategy> extends Proj } export const PROJECTION_STRATEGY = { - AppendComponentToBody>(component: T, context?: InferredInstanceOf) { + AppendComponentToBody>( + component: T, + context?: Partial>, + ) { return new RootComponentProjectionStrategy( component, context && CONTEXT_STRATEGY.Component(context), @@ -104,7 +107,7 @@ export const PROJECTION_STRATEGY = { AppendComponentToContainer>( component: T, containerRef: ViewContainerRef, - context?: InferredInstanceOf, + context?: Partial>, ) { return new ComponentProjectionStrategy( component, @@ -115,7 +118,7 @@ export const PROJECTION_STRATEGY = { AppendTemplateToContainer>( templateRef: T, containerRef: ViewContainerRef, - context?: InferredContextOf, + context?: Partial>, ) { return new TemplateProjectionStrategy( templateRef, @@ -126,7 +129,7 @@ export const PROJECTION_STRATEGY = { PrependComponentToContainer>( component: T, containerRef: ViewContainerRef, - context?: InferredInstanceOf, + context?: Partial>, ) { return new ComponentProjectionStrategy( component, @@ -137,7 +140,7 @@ export const PROJECTION_STRATEGY = { PrependTemplateToContainer>( templateRef: T, containerRef: ViewContainerRef, - context?: InferredContextOf, + context?: Partial>, ) { return new TemplateProjectionStrategy( templateRef, @@ -148,7 +151,7 @@ export const PROJECTION_STRATEGY = { ProjectComponentToContainer>( component: T, containerRef: ViewContainerRef, - context?: InferredInstanceOf, + context?: Partial>, ) { return new ComponentProjectionStrategy( component, @@ -159,7 +162,7 @@ export const PROJECTION_STRATEGY = { ProjectTemplateToContainer>( templateRef: T, containerRef: ViewContainerRef, - context?: InferredContextOf, + context?: Partial>, ) { return new TemplateProjectionStrategy( templateRef,