(color: unknown)
| 39 | } |
| 40 | |
| 41 | function expectRgba(color: unknown) { |
| 42 | expect(color).toBeInstanceOf(RGBA) |
| 43 | if (!(color instanceof RGBA)) { |
| 44 | throw new Error("expected RGBA") |
| 45 | } |
| 46 | |
| 47 | return color |
| 48 | } |
| 49 | |
| 50 | function expectIndexed(color: unknown) { |
| 51 | const rgba = expectRgba(color) |
no outgoing calls
no test coverage detected