| 515 | } |
| 516 | |
| 517 | function getRootTViewTemplate( |
| 518 | creationBindings: Binding[] | null, |
| 519 | updateBindings: Binding[] | null, |
| 520 | ): ComponentTemplate<unknown> | null { |
| 521 | if (!creationBindings && !updateBindings) { |
| 522 | return null; |
| 523 | } |
| 524 | |
| 525 | return (flags) => { |
| 526 | if (flags & RenderFlags.Create && creationBindings) { |
| 527 | for (const binding of creationBindings as BindingInternal[]) { |
| 528 | binding.create!(); |
| 529 | } |
| 530 | } |
| 531 | |
| 532 | if (flags & RenderFlags.Update && updateBindings) { |
| 533 | for (const binding of updateBindings as BindingInternal[]) { |
| 534 | binding.update!(); |
| 535 | } |
| 536 | } |
| 537 | }; |
| 538 | } |
| 539 | |
| 540 | function isInputBinding(binding: Binding): boolean { |
| 541 | const kind = (binding as BindingInternal)[BINDING].kind; |