(formTree, options)
| 22 | import {REGISTER_WEBMCP_FORM, RegisterWebMcpForm} from './tokens'; |
| 23 | |
| 24 | const registerWebMcpForm: RegisterWebMcpForm = async (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 | effect(() => { |
| 30 | untracked(() => { |
| 31 | initWebMcpForm(formTree, options, injector); |
| 32 | }); |
| 33 | }); |
| 34 | }; |
| 35 | |
| 36 | function initWebMcpForm( |
| 37 | formTree: FieldTree<unknown>, |
no test coverage detected
searching dependent graphs…