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

Function registerWebMcpForm

packages/forms/signals/src/webmcp/registration.ts:24–36  ·  view source on GitHub ↗
(formTree, options)

Source from the content-addressed store, hash-verified

22import {REGISTER_WEBMCP_FORM, RegisterWebMcpForm} from './tokens';
23
24const registerWebMcpForm: RegisterWebMcpForm = (formTree, options) => {
25 const injector = inject(Injector);
26
27 // we want to defer the registration until the context is fully initialized,
28 // This is especially useful if the form model is a derivation of a required input
29 return new Promise<void>((resolve, reject) => {
30 effect(() => {
31 untracked(() => {
32 initWebMcpForm(formTree, options, injector).then(resolve, reject);
33 });
34 });
35 });
36};
37
38async function initWebMcpForm(
39 formTree: FieldTree<unknown>,

Callers 2

webmcp.spec.tsFile · 0.85
formFunction · 0.85

Calls 5

injectFunction · 0.90
effectFunction · 0.90
untrackedFunction · 0.90
initWebMcpFormFunction · 0.85
thenMethod · 0.65

Tested by

no test coverage detected