From d9712e605e116dbb8fd1652cfea62d884ff98703 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Tue, 24 Mar 2026 16:51:52 +0100 Subject: [PATCH] refactor(core): expand input flags type Expands the type for the input flags in definitions since the current one prevents some of the generated code from compiling. --- packages/core/src/render3/definition.ts | 10 ++-------- packages/core/src/render3/interfaces/definition.ts | 5 ++--- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/packages/core/src/render3/definition.ts b/packages/core/src/render3/definition.ts index 17e025b6a43..3cf976ef513 100644 --- a/packages/core/src/render3/definition.ts +++ b/packages/core/src/render3/definition.ts @@ -35,8 +35,7 @@ import type { ViewQueriesFunction, } from './interfaces/definition'; import {InputFlags} from './interfaces/input_flags'; -import type {TAttributes, TConstantsOrFactory} from './interfaces/node'; -import {CssSelectorList} from './interfaces/projection'; +import type {TAttributes} from './interfaces/node'; import {stringifyCSSSelectorList} from './node_selector_matcher'; import {StandaloneService} from './standalone_service'; @@ -104,12 +103,7 @@ type DirectiveInputs = Record< | string // Complex input when there are flags, or differing public name and declared name, or there // is a transform. Such inputs are not as common, so the array form is only generated then. - | [ - flags: InputFlags, - publicName: string, - declaredName?: string, - transform?: InputTransformFunction, - ] + | [flags: number, publicName: string, declaredName?: string, transform?: InputTransformFunction] | undefined >; diff --git a/packages/core/src/render3/interfaces/definition.ts b/packages/core/src/render3/interfaces/definition.ts index 17965514d7f..2d002598d5c 100644 --- a/packages/core/src/render3/interfaces/definition.ts +++ b/packages/core/src/render3/interfaces/definition.ts @@ -17,7 +17,6 @@ import {FactoryFn} from '../definition_factory'; import {TAttributes, TConstantsOrFactory} from './node'; import {CssSelectorList} from './projection'; import type {TView} from './view'; -import {InputFlags} from './input_flags'; import type {ControlDirectiveDef} from './control'; /** @@ -119,7 +118,7 @@ export interface DirectiveDef { */ readonly inputs: Record< string, - [minifiedName: string, flags: InputFlags, transform: InputTransformFunction | null] + [minifiedName: string, flags: number, transform: InputTransformFunction | null] >; /** @@ -127,7 +126,7 @@ export interface DirectiveDef { * used to do further processing after the `inputs` have been inverted. */ readonly inputConfig: { - [P in keyof T]?: string | [InputFlags, string, string?, InputTransformFunction?]; + [P in keyof T]?: string | [number, string, string?, InputTransformFunction?]; }; /**