-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
61 getting rid of workbookValidation files and just attempted to Type…
…script the validate-upload.js file
- Loading branch information
1 parent
70bcbf3
commit b4ae20f
Showing
4 changed files
with
194 additions
and
1,175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
export type FormatterFunction = (value: string | number) => string | number | ||
|
||
export type Rule = { | ||
key: string | ||
index: number | ||
required: boolean | string | ||
dataType: string | ||
maxLength: number | ||
listVals: string[] | ||
columnName: string | ||
humanColName: string | ||
ecCodes: string[] | boolean | ||
version?: string | ||
isRequiredFn?: (value: WorkbookContentItem) => boolean | ||
validationFormatters: FormatterFunction[] | ||
} | ||
|
||
export type WorkbookContentItem = Record<string, string | number> | ||
|
||
export type WorkbookRecord = { | ||
type: string | ||
content: WorkbookContentItem | ||
subcategory?: string | ||
} |
Oops, something went wrong.