(
codeRef: RefObject<HTMLDivElement | null>,
files: DownloadFiles['files'],
urls: {[name: string]: string},
entry: string | undefined
)
| 283 | } |
| 284 | |
| 285 | function getExampleFiles( |
| 286 | codeRef: RefObject<HTMLDivElement | null>, |
| 287 | files: DownloadFiles['files'], |
| 288 | urls: {[name: string]: string}, |
| 289 | entry: string | undefined |
| 290 | ): DownloadFiles['files'] { |
| 291 | if (!entry) { |
| 292 | return { |
| 293 | ...files, |
| 294 | 'Example.tsx': {contents: getExampleCode(codeRef, urls)} |
| 295 | }; |
| 296 | } |
| 297 | |
| 298 | return files; |
| 299 | } |
| 300 | |
| 301 | function getTextContent(element: Element) { |
| 302 | // Manually walk over text nodes inside the element and concatenate them. |
no test coverage detected