From 8d59a9eb08d9fa1da08ccf016f9f8565ba422492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sat, 13 Jul 2019 15:05:23 +0200 Subject: [PATCH] feat: add TS definition --- .gitignore | 1 - distance-matrix.d.ts | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 distance-matrix.d.ts diff --git a/.gitignore b/.gitignore index 4ebb8d3..b7bdd55 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,3 @@ logs npm-debug.log* coverage distance-matrix.js -distance-matrix.d.ts diff --git a/distance-matrix.d.ts b/distance-matrix.d.ts new file mode 100644 index 0000000..7731453 --- /dev/null +++ b/distance-matrix.d.ts @@ -0,0 +1,8 @@ +declare module 'ml-distance-matrix' { + declare function distanceMatrix( + data: DataType[], + distanceFunction: (valueA: DataType, valueB: DataType) => DistanceType, + ): DistanceType[][]; + + export = distanceMatrix; +}