Skip to content

Commit

Permalink
🤖 Merge PR DefinitelyTyped#71669 feat: Fix typings for @types/skmeans…
Browse files Browse the repository at this point in the history
  • Loading branch information
Undistraction authored Jan 30, 2025
1 parent 8436701 commit 53499d6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion types/skmeans/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
type CentroidValues<TPoint extends number | number[]> = TPoint[] | "kmrand" | "kmpp";

interface TestResult<TPoint> {
idx: number
centroid: TPoint
}

interface DataResult<TPoint extends number | number[]> {
it: number;
k: number;
centroids: TPoint[];
idxs: number[];
test: (x: TPoint, distance?: (x: TPoint, y: TPoint) => number) => void;
test: (x: TPoint, distance?: (x: TPoint, y: TPoint) => number) => TestResult<TPoint>;
}

/**
Expand Down

0 comments on commit 53499d6

Please sign in to comment.