d87620b239
* fix: Circular reference Signed-off-by: Mark Tolmacs <mark@lazycat.hu> * fix: Lint Signed-off-by: Mark Tolmacs <mark@lazycat.hu> * Trigger CI --------- Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
18 lines
417 B
TypeScript
18 lines
417 B
TypeScript
/**
|
|
* x and y position of top left corner, x and y position of bottom right corner
|
|
*/
|
|
export type Bounds = readonly [
|
|
minX: number,
|
|
minY: number,
|
|
maxX: number,
|
|
maxY: number,
|
|
];
|
|
|
|
export const isBounds = (box: unknown): box is Bounds =>
|
|
Array.isArray(box) &&
|
|
box.length === 4 &&
|
|
typeof box[0] === "number" &&
|
|
typeof box[1] === "number" &&
|
|
typeof box[2] === "number" &&
|
|
typeof box[3] === "number";
|