Skip to content

Commit

Permalink
feat: add TS definition
Browse files Browse the repository at this point in the history
  • Loading branch information
targos committed Jul 13, 2019
1 parent cac9c7e commit 8d59a9e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ logs
npm-debug.log*
coverage
distance-matrix.js
distance-matrix.d.ts
8 changes: 8 additions & 0 deletions distance-matrix.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
declare module 'ml-distance-matrix' {
declare function distanceMatrix<DataType = number[], DistanceType = number>(
data: DataType[],
distanceFunction: (valueA: DataType, valueB: DataType) => DistanceType,
): DistanceType[][];

export = distanceMatrix;
}

0 comments on commit 8d59a9e

Please # to comment.