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

Function registerWebMcpForm

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

Source from the content-addressed store, hash-verified

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

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