(children: React.ReactNode)
| 72 | } |
| 73 | |
| 74 | function hasTextContent(children: React.ReactNode): boolean { |
| 75 | return Children.toArray(children).some(child => { |
| 76 | if (typeof child === 'string') { |
| 77 | return child.trim().length > 0; |
| 78 | } |
| 79 | |
| 80 | if (typeof child === 'number') { |
| 81 | return true; |
| 82 | } |
| 83 | |
| 84 | if (!isValidElement<{ children?: React.ReactNode }>(child)) { |
| 85 | return false; |
| 86 | } |
| 87 | |
| 88 | return hasTextContent(child.props.children); |
| 89 | }); |
| 90 | } |
| 91 | |
| 92 | function windowOpen( |
| 93 | url: string, |
no outgoing calls
no test coverage detected
searching dependent graphs…