(attr: string)
| 695 | |
| 696 | // Validate that the attributes are compatible with use as a structural directive. |
| 697 | const isValid = (attr: string): boolean => { |
| 698 | // The base attribute is valid by default. |
| 699 | if (attr === baseAttr) { |
| 700 | return true; |
| 701 | } |
| 702 | |
| 703 | // Non-base attributes must all be prefixed with the base attribute. |
| 704 | if (!attr.startsWith(baseAttr)) { |
| 705 | return false; |
| 706 | } |
| 707 | |
| 708 | // Non-base attributes must also correspond to directive inputs. |
| 709 | if (!meta.inputs.hasBindingPropertyName(attr)) { |
| 710 | return false; |
| 711 | } |
| 712 | |
| 713 | // This attribute is compatible. |
| 714 | return true; |
| 715 | }; |
| 716 | |
| 717 | if (!attributes.every(isValid)) { |
| 718 | continue; |
no test coverage detected