MCPcopy
hub / github.com/angular/angular / getDefaultAttributeToPropertyInputs

Function getDefaultAttributeToPropertyInputs

packages/elements/src/utils.ts:82–93  ·  view source on GitHub ↗
(
  inputs: readonly {propName: string; templateName: string; transform?: (value: any) => any}[],
)

Source from the content-addressed store, hash-verified

80
81/** Gets a map of default set of attributes to observe and the properties they affect. */
82export function getDefaultAttributeToPropertyInputs(
83 inputs: readonly {propName: string; templateName: string; transform?: (value: any) => any}[],
84) {
85 const attributeToPropertyInputs: {
86 [key: string]: [propName: string, transform: ((value: any) => any) | undefined];
87 } = {};
88 inputs.forEach(({propName, templateName, transform}) => {
89 attributeToPropertyInputs[camelToDashCase(templateName)] = [propName, transform];
90 });
91
92 return attributeToPropertyInputs;
93}
94
95/**
96 * Gets a component's set of inputs. Uses the injector to get the component factory where the inputs

Callers 1

createCustomElementFunction · 0.90

Calls 2

camelToDashCaseFunction · 0.85
forEachMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…