|
|
@ -1,10 +1,10 @@ |
|
|
|
export type InputTestValue = bigint | number | null | string | undefined; |
|
|
|
export type InputTestValue = bigint | number | null | string | undefined; |
|
|
|
|
|
|
|
|
|
|
|
export type InputTestArgs = { |
|
|
|
export type InputTestArgs = { |
|
|
|
compare?: InputTestValue; |
|
|
|
compare?: InputTestValue[]; |
|
|
|
displayMax?: string; |
|
|
|
displayMax?: string; |
|
|
|
displayMin?: string; |
|
|
|
displayMin?: string; |
|
|
|
getCompare?: () => InputTestValue; |
|
|
|
getCompare?: () => InputTestValue[]; |
|
|
|
getValue?: () => InputTestValue; |
|
|
|
getValue?: () => InputTestValue; |
|
|
|
max?: bigint | number; |
|
|
|
max?: bigint | number; |
|
|
|
min?: bigint | number; |
|
|
|
min?: bigint | number; |
|
|
@ -15,10 +15,18 @@ export type MinimalInputTestArgs = Required< |
|
|
|
Omit<InputTestArgs, 'displayMax' | 'displayMin' | 'getCompare' | 'getValue'> |
|
|
|
Omit<InputTestArgs, 'displayMax' | 'displayMin' | 'getCompare' | 'getValue'> |
|
|
|
>; |
|
|
|
>; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export type CallbackAppendArgs = { |
|
|
|
|
|
|
|
append: { |
|
|
|
|
|
|
|
[arg: string]: InputTestValue; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export type InputTestSuccessCallback = () => void; |
|
|
|
|
|
|
|
|
|
|
|
export type InputTest = { |
|
|
|
export type InputTest = { |
|
|
|
onFailure?: (args: InputTestArgs) => void; |
|
|
|
onFailure?: (args: InputTestArgs & CallbackAppendArgs) => void; |
|
|
|
onSuccess?: () => void; |
|
|
|
onSuccess?: InputTestSuccessCallback; |
|
|
|
test: (args: MinimalInputTestArgs) => boolean; |
|
|
|
test: (args: MinimalInputTestArgs & CallbackAppendArgs) => boolean; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
export type InputTestInputs = { |
|
|
|
export type InputTestInputs = { |
|
|
@ -28,7 +36,7 @@ export type InputTestInputs = { |
|
|
|
export type InputTestBatches = { |
|
|
|
export type InputTestBatches = { |
|
|
|
[id: string]: { |
|
|
|
[id: string]: { |
|
|
|
defaults?: InputTestArgs & { |
|
|
|
defaults?: InputTestArgs & { |
|
|
|
onSuccess?: () => void; |
|
|
|
onSuccess?: InputTestSuccessCallback; |
|
|
|
}; |
|
|
|
}; |
|
|
|
onFinishBatch?: () => void; |
|
|
|
onFinishBatch?: () => void; |
|
|
|
optionalTests?: Array<InputTest>; |
|
|
|
optionalTests?: Array<InputTest>; |
|
|
|