MCPcopy Index your code
hub / github.com/angular/angular / makeDirectiveMeta

Function makeDirectiveMeta

packages/compiler/test/render3/view/binding_spec.ts:21–47  ·  view source on GitHub ↗
(config: {
  name: string;
  selector: string | null;
  inputs?: Record<string, string>;
  outputs?: Record<string, string>;
  exportAs?: string[];
  isComponent?: boolean;
  isStructural?: boolean;
  matchSource?: MatchSource;
})

Source from the content-addressed store, hash-verified

19let keyCounter = 0;
20
21function makeDirectiveMeta(config: {
22 name: string;
23 selector: string | null;
24 inputs?: Record<string, string>;
25 outputs?: Record<string, string>;
26 exportAs?: string[];
27 isComponent?: boolean;
28 isStructural?: boolean;
29 matchSource?: MatchSource;
30}): DirectiveMeta {
31 return {
32 name: config.name,
33 ref: {
34 key: `${config.name}#${keyCounter++}`,
35 },
36 exportAs: config.exportAs ?? null,
37 inputs: ClassPropertyMapping.fromMappedObject(config.inputs || {}),
38 outputs: ClassPropertyMapping.fromMappedObject(config.outputs || {}),
39 isComponent: !!config.isComponent,
40 isStructural: !!config.isStructural,
41 selector: config.selector,
42 animationTriggerNames: null,
43 ngContentSelectors: null,
44 preserveWhitespaces: false,
45 matchSource: config.matchSource ?? MatchSource.Selector,
46 };
47}
48
49function makeSelectorMatcher(): SelectorMatcher<DirectiveMeta[]> {
50 const matcher = new SelectorMatcher<DirectiveMeta[]>();

Callers 2

makeSelectorMatcherFunction · 0.85
binding_spec.tsFile · 0.85

Calls 1

fromMappedObjectMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…