From be9d059efc71fc43181116986fe14a6ae8bd769d Mon Sep 17 00:00:00 2001 From: Pete Bacon Darwin Date: Thu, 11 Mar 2021 13:44:16 +0000 Subject: [PATCH] refactor(compiler): move `type` in shared `R3PartialDeclaration` interface (#41080) All interfaces that extend `R3PartialDeclaration` require a `type` property so it makes sense to put it in the base interface. PR Close #41080 --- packages/compiler/src/render3/partial/api.ts | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/packages/compiler/src/render3/partial/api.ts b/packages/compiler/src/render3/partial/api.ts index d64931985e..b289e7fde7 100644 --- a/packages/compiler/src/render3/partial/api.ts +++ b/packages/compiler/src/render3/partial/api.ts @@ -20,6 +20,11 @@ export interface R3PartialDeclaration { * to all Angular exports, including Ivy instructions. */ ngImport: o.Expression; + + /** + * Reference to the decorated class, which is subject to this partial declaration. + */ + type: o.Expression; } /** @@ -34,11 +39,6 @@ export interface R3DeclareDirectiveMetadata extends R3PartialDeclaration { */ selector?: string; - /** - * Reference to the directive class itself. - */ - type: o.Expression; - /** * A mapping of inputs from class property names to binding property names, or to a tuple of * binding property name and class property name if the names are different. @@ -268,11 +268,6 @@ export interface R3DeclareQueryMetadata { * enforced during linking. */ export interface R3DeclarePipeMetadata extends R3PartialDeclaration { - /** - * Reference to the pipe class itself. - */ - type: o.Expression; - /** * The name to use in templates to refer to this pipe. */