MCPcopy Create free account
hub / github.com/angular/angular / makeKey

Function makeKey

packages/forms/signals/test/node/api/metadata.spec.ts:84–92  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

82 const created: string[] = [];
83 const destroyed: string[] = [];
84 const makeKey = (name: string) =>
85 createManagedMetadataKey((_state, params: Signal<string | undefined>) => {
86 assertNotInReactiveContext(makeKey);
87 expect(inject(TOKEN)).toBe('provided');
88 contexts.push(inject(Injector));
89 created.push(name);
90 inject(DestroyRef).onDestroy(() => destroyed.push(name));
91 return params;
92 });
93 const FIRST = makeKey('first');
94 const SECOND = makeKey('second');
95 const model = signal([{value: 'a'}, {value: 'b'}]);

Callers 1

metadata.spec.tsFile · 0.85

Calls 5

injectFunction · 0.90
createManagedMetadataKeyFunction · 0.85
onDestroyMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected