Skip to content

Commit

Permalink
refactor(grid-iterators): add GridIterator2D/3D type aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Dec 26, 2022
1 parent 0059766 commit 610ad0e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/grid-iterators/src/api.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { FnU2 } from "@thi.ng/api";
import type { Fn, FnU2 } from "@thi.ng/api";

/**
* Higher order point coordinate transformation function. First is called with
Expand All @@ -24,3 +24,10 @@ export interface GridIterOpts {
*/
tx?: PointTransform;
}

export type GridIterator2D = Fn<GridIterOpts, Iterable<[number, number]>>;

export type GridIterator3D = Fn<
GridIterOpts,
Iterable<[number, number, number]>
>;

0 comments on commit 610ad0e

Please sign in to comment.