Skip to content

Commit f9c5171

Browse files
committed
fix: remove I from interfaces
1 parent 6aa38fc commit f9c5171

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

src/gsd.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ interface LastType {
3838
index: number;
3939
}
4040

41-
export interface IGSDOptions {
41+
export interface GSDOptions {
4242
noiseLevel?: number;
4343
sgOptions?: {
4444
windowSize: number;
@@ -54,7 +54,7 @@ export interface IGSDOptions {
5454
factor?: number;
5555
}
5656

57-
export function gsd(data: DataXY, options: IGSDOptions = {}): Peak1D[] {
57+
export function gsd(data: DataXY, options: GSDOptions = {}): Peak1D[] {
5858
let {
5959
noiseLevel,
6060
sgOptions = {

src/post/broadenPeaks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { Peak1D } from '../gsd';
55
* Because peaks may not be symmetric after we add 2 properties, from and to.
66
* @return {Array} peakList
77
*/
8-
export interface IBroadenPeaksOptions {
8+
export interface BroadenPeaksOptions {
99
/**
1010
* @default 2
1111
*/
@@ -23,7 +23,7 @@ interface InternPeak1D extends Peak1D {
2323
}
2424
export function broadenPeaks(
2525
peakList: Peak1D[],
26-
options: IBroadenPeaksOptions = {},
26+
options: BroadenPeaksOptions = {},
2727
): Peak1D[] {
2828
const { factor = 2, overlap = false } = options;
2929

src/post/joinBroadPeaks.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { DataXY } from 'cheminfo-types';
22
import type { Shape1D } from 'ml-peak-shape-generator';
33
import SG from 'ml-savitzky-golay-generalized';
44
import { optimize } from 'ml-spectra-fitting';
5-
import type { IOptimizationOptions } from 'ml-spectra-fitting';
5+
import type { OptimizationOptions } from 'ml-spectra-fitting';
66
import { xFindClosestIndex } from 'ml-spectra-processing';
77

88
import type { Peak1D } from '../gsd';
@@ -24,7 +24,7 @@ interface GetSoftMaskOptions {
2424
broadRatio: number;
2525
}
2626

27-
export interface IJoinBroadPeaksOptions extends Partial<GetSoftMaskOptions> {
27+
export interface JoinBroadPeaksOptions extends Partial<GetSoftMaskOptions> {
2828
/**
2929
* width limit to join peaks.
3030
* @default 0.25
@@ -37,14 +37,14 @@ export interface IJoinBroadPeaksOptions extends Partial<GetSoftMaskOptions> {
3737
/**
3838
* it's specify the kind and options of the algorithm use to optimize parameters.
3939
*/
40-
optimization?: IOptimizationOptions;
40+
optimization?: OptimizationOptions;
4141
broadMask?: boolean[];
4242
}
4343

4444
export function joinBroadPeaks(
4545
data: DataXY,
4646
peakList: Peak1D[],
47-
options: IJoinBroadPeaksOptions = {},
47+
options: JoinBroadPeaksOptions = {},
4848
): Peak1D[] {
4949
let {
5050
broadMask,

src/post/optimizePeaks.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { DataXY } from 'cheminfo-types';
22
import type { Shape1D } from 'ml-peak-shape-generator';
33
import { getShape1D } from 'ml-peak-shape-generator';
44
import { optimize } from 'ml-spectra-fitting';
5-
import type { IOptimizationOptions } from 'ml-spectra-fitting';
5+
import type { OptimizationOptions } from 'ml-spectra-fitting';
66
import { xGetFromToIndex } from 'ml-spectra-processing';
77

88
import type { Peak1D } from '../gsd';
@@ -15,7 +15,7 @@ import { groupPeaks } from './groupPeaks';
1515
* @param data - An object containing the x and y data to be fitted.
1616
* @param peakList - A list of initial parameters to be optimized. e.g. coming from a peak picking [{x, y, width}].
1717
*/
18-
export interface IOptimizePeaksOptions {
18+
export interface OptimizePeaksOptions {
1919
/**
2020
* times of width to group peaks.
2121
* @default 1
@@ -33,13 +33,13 @@ export interface IOptimizePeaksOptions {
3333
/**
3434
* it's specify the kind and options of the algorithm use to optimize parameters.
3535
*/
36-
optimization?: IOptimizationOptions;
36+
optimization?: OptimizationOptions;
3737
}
3838

3939
export function optimizePeaks(
4040
data: DataXY,
4141
peakList: Peak1D[],
42-
options: IOptimizePeaksOptions = {},
42+
options: OptimizePeaksOptions = {},
4343
): Peak1D[] {
4444
const {
4545
factorWidth = 1,
@@ -53,7 +53,7 @@ export function optimizePeaks(
5353
timeout: 10,
5454
},
5555
},
56-
}: IOptimizePeaksOptions = options;
56+
}: OptimizePeaksOptions = options;
5757

5858
if (data.x[0] > data.x[1]) {
5959
data.x.reverse();

0 commit comments

Comments
 (0)