fix: Add Types for Match Method

This commit is contained in:
sqwk 2017-07-05 01:02:48 +02:00 committed by GitHub
parent 1184d4ab86
commit bebdfcd941

View File

@ -1382,7 +1382,7 @@ declare module 'paper' {
* @param options.guides - hit-test items that have Item#guide set to true.
* @param options.selected - only hit selected items.
*/
hitTest(point: Point, options?: { tolerance?: number; class?: string; fill?: boolean; stroke?: boolean; segments?: boolean; curves?: boolean; handles?: boolean; ends?: boolean; bounds?: boolean; center?: boolean; guides?: boolean; selected?: boolean; }): HitResult;
hitTest(point: Point, options?: { tolerance?: number; class?: string; fill?: boolean; stroke?: boolean; segments?: boolean; curves?: boolean; handles?: boolean; ends?: boolean; bounds?: boolean; center?: boolean; guides?: boolean; selected?: boolean; match: (hit: HitResult) => boolean; }): HitResult;
/**
* Checks whether the item matches the criteria described by the given object, by iterating over all of its properties and matching against their values through matches(name, compare).