What is the behaviour you expect?
I just used the origin property in the transformation of my SVG root element. As the documentation suggests I used 'top left' to set the origin to the top left corner.
What is happening instead?
My IDE gives a TypeError. It seems that the type definition for the MatrixAlias is not correct for the origin property.
What error message are you getting?
TS2345: Argument of type '{ origin: string; flip: "y"; scale: number; }' is not assignable to parameter of type 'MatrixAlias'.
Types of property 'origin' are incompatible.
Type 'string' is not assignable to type 'ArrayXY | { x: number; y: number; } | undefined'.
Idea for a fix
Maybe it's enough to add string as an allowed type to the origin property in MatrixAlias?
Update
Also the origin is not changing to the top left corner. Is it a mistake in the documentation or implementation?
Bug report
Explanation
What is the behaviour you expect? I just used the origin property in the transformation of my SVG root element. As the documentation suggests I used 'top left' to set the origin to the top left corner.
What is happening instead? My IDE gives a TypeError. It seems that the type definition for the MatrixAlias is not correct for the origin property.
What error message are you getting? TS2345: Argument of type '{ origin: string; flip: "y"; scale: number; }' is not assignable to parameter of type 'MatrixAlias'. Types of property 'origin' are incompatible. Type 'string' is not assignable to type 'ArrayXY | { x: number; y: number; } | undefined'.
Idea for a fix Maybe it's enough to add string as an allowed type to the origin property in MatrixAlias?
Update
Also the origin is not changing to the top left corner. Is it a mistake in the documentation or implementation?