(result: PngWorkerJobResult)
| 61 | } |
| 62 | |
| 63 | function resultBufferViews(result: PngWorkerJobResult): Uint8Array[] { |
| 64 | switch (result.kind) { |
| 65 | case 'decode': |
| 66 | return [result.data]; |
| 67 | case 'encode': |
| 68 | return [result.png]; |
| 69 | case 'diff-pixels': |
| 70 | return [result.diffData, result.diffMask]; |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | const port = parentPort; |
| 75 | if (port) { |
no outgoing calls
no test coverage detected