Files
NapCatQQ/.pnpm-store/v3/files/f9/e65c4014a0cf013816504bd3383500c4320d6c90293dab396e871d2051e2faac5d701e717ec8003e87f8c10368aff99b59b99920d5413e3df093e07a3889f0
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

25 lines
1.2 KiB
Plaintext

import type { ClientRect } from '../../types';
import type { Collision, CollisionDescriptor } from './types';
/**
* Sort collisions from smallest to greatest value
*/
export declare function sortCollisionsAsc({ data: { value: a } }: CollisionDescriptor, { data: { value: b } }: CollisionDescriptor): number;
/**
* Sort collisions from greatest to smallest value
*/
export declare function sortCollisionsDesc({ data: { value: a } }: CollisionDescriptor, { data: { value: b } }: CollisionDescriptor): number;
/**
* Returns the coordinates of the corners of a given rectangle:
* [TopLeft {x, y}, TopRight {x, y}, BottomLeft {x, y}, BottomRight {x, y}]
*/
export declare function cornersOfRectangle({ left, top, height, width }: ClientRect): {
x: number;
y: number;
}[];
/**
* Returns the first collision, or null if there isn't one.
* If a property is specified, returns the specified property of the first collision.
*/
export declare function getFirstCollision(collisions: Collision[] | null | undefined): Collision | null;
export declare function getFirstCollision<T extends keyof Collision>(collisions: Collision[] | null | undefined, property: T): Collision[T] | null;