Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add types file #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions ml-matrix-peaks-finder.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
declare module 'ml-matrix-peaks-finder' {
interface FindPeaks2DRegionOptions {
nStdDev: number;
kernel?: number[][] | Float64Array[];
originalData: number[] | Float64Array;
filteredData: number[] | Float64Array;
rows: number;
cols: number;
labelling?: 'drain' | 'floodfill';
}
interface Peak2D {
id?: string;
x: number;
y: number;
z: number;
maxX: number;
minX: number;
maxY: number;
minY: number;
}
function findPeaks2DRegion(
absoluteData: number[] | Float64Array,
options?: FindPeaks2DRegionOptions,
): Peak2D[];
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "The peak picking routines for 2D arrays. This library looks for the local maxima of the given input matrix. The input matrix has to be specified as a single vector.",
"main": "lib/index.js",
"module": "src/index.js",
"types": "ml-matrix-peaks-finder.d.ts",
"files": [
"lib",
"src"
Expand Down