Originally posted by **owlcode** June 2, 2024
Looking at `SerializedPatternOptions` type [here](https://github.com/fabricjs/fabric.js/blob/1025c81c1d91e22df0c93ad3daea99d94e4435f0/src/Pattern/types.ts#L17C13-L17C37). Shouldn't it be union instead of intersection? Currently when I'm trying to do
```
Pattern.fromObject(
{
type: 'pattern',
source:
'data:image/png;base64,iVBORw0KGgoAAAANSU....',
},
{},
)
```
typescript is complaining that `source` needs to be of type `CanvasImageSource`. I'm using `6.0.0-rc1`
Discussed in https://github.com/fabricjs/fabric.js/discussions/9903