(customElements: string | Record<string, CustomElementSpec> | undefined)
| 326 | }; |
| 327 | |
| 328 | const addCustomElements = (customElements: string | Record<string, CustomElementSpec> | undefined) => { |
| 329 | if (Type.isObject(customElements)) { |
| 330 | Obj.each(customElements as Record<string, CustomElementSpec>, (spec, name) => { |
| 331 | const componentUrl = spec.componentUrl; |
| 332 | if (Type.isString(componentUrl)) { |
| 333 | addComponentUrl(name, componentUrl); |
| 334 | } |
| 335 | |
| 336 | addCustomElement(name, spec); |
| 337 | }); |
| 338 | } else if (Type.isString(customElements)) { |
| 339 | addCustomElementsFromString(customElements); |
| 340 | } |
| 341 | }; |
| 342 | |
| 343 | // Adds valid children to the schema object |
| 344 | const addValidChildren = (validChildren: string | undefined) => { |
no test coverage detected
searching dependent graphs…