Skip to content

Commit d9712e6

Browse files
crisbetoleonsenft
authored andcommitted
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.
1 parent 78c2d0a commit d9712e6

2 files changed

Lines changed: 4 additions & 11 deletions

File tree

packages/core/src/render3/definition.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ import type {
3535
ViewQueriesFunction,
3636
} from './interfaces/definition';
3737
import {InputFlags} from './interfaces/input_flags';
38-
import type {TAttributes, TConstantsOrFactory} from './interfaces/node';
39-
import {CssSelectorList} from './interfaces/projection';
38+
import type {TAttributes} from './interfaces/node';
4039
import {stringifyCSSSelectorList} from './node_selector_matcher';
4140
import {StandaloneService} from './standalone_service';
4241

@@ -104,12 +103,7 @@ type DirectiveInputs = Record<
104103
| string
105104
// Complex input when there are flags, or differing public name and declared name, or there
106105
// is a transform. Such inputs are not as common, so the array form is only generated then.
107-
| [
108-
flags: InputFlags,
109-
publicName: string,
110-
declaredName?: string,
111-
transform?: InputTransformFunction,
112-
]
106+
| [flags: number, publicName: string, declaredName?: string, transform?: InputTransformFunction]
113107
| undefined
114108
>;
115109

packages/core/src/render3/interfaces/definition.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import {FactoryFn} from '../definition_factory';
1717
import {TAttributes, TConstantsOrFactory} from './node';
1818
import {CssSelectorList} from './projection';
1919
import type {TView} from './view';
20-
import {InputFlags} from './input_flags';
2120
import type {ControlDirectiveDef} from './control';
2221

2322
/**
@@ -119,15 +118,15 @@ export interface DirectiveDef<T> {
119118
*/
120119
readonly inputs: Record<
121120
string,
122-
[minifiedName: string, flags: InputFlags, transform: InputTransformFunction | null]
121+
[minifiedName: string, flags: number, transform: InputTransformFunction | null]
123122
>;
124123

125124
/**
126125
* Contains the raw input information produced by the compiler. Can be
127126
* used to do further processing after the `inputs` have been inverted.
128127
*/
129128
readonly inputConfig: {
130-
[P in keyof T]?: string | [InputFlags, string, string?, InputTransformFunction?];
129+
[P in keyof T]?: string | [number, string, string?, InputTransformFunction?];
131130
};
132131

133132
/**

0 commit comments

Comments
 (0)