Skip to content

Commit

Permalink
refactor: introduce type MeiData
Browse files Browse the repository at this point in the history
Refs: #105
  • Loading branch information
yinanazhou committed Jul 10, 2024
1 parent e07d4d9 commit 01fff80
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Editor/MeiTools.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import Handsontable from 'handsontable';
import { updateStatus } from './ValidationTools';
import * as Notification from '../utils/Notification';
import { MeiData } from '../Types';

export class MeiTools {
private meiData: any[];
private meiData: MeiData;
public validationInProgress = false;
public pendingValidations = 0;
public hasInvalid = false;
Expand All @@ -18,7 +19,7 @@ export class MeiTools {
const mei = row[inputMeiHeader];
if (mei) {
this.meiData.push({
mei,
mei: mei,
row: rowIndex,
isValid: null,
errorMsg: null,
Expand Down
7 changes: 7 additions & 0 deletions src/Types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,10 @@ export type TableEvent =
| 'afterRemoveRow'
| 'afterRowMove'
| 'afterRowSequenceChange';

export type MeiData = {
mei: string;
row: number;
isValid: boolean | null;
errorMsg: string | null;
}[];

0 comments on commit 01fff80

Please sign in to comment.