fix(striker-ui): simplify testInput()

main
Tsu-ba-me 2 years ago
parent 10afba41cb
commit 441ac0e980
  1. 14
      striker-ui/lib/test_input/createTestInputFunction.ts
  2. 10
      striker-ui/lib/test_input/index.ts

@ -0,0 +1,14 @@
import testInput from './testInput';
import {
InputTestBatches,
TestInputFunction,
} from '../../types/TestInputFunction';
const createTestInputFunction =
(tests: InputTestBatches) =>
(
...[options, ...restArgs]: Parameters<TestInputFunction>
): ReturnType<TestInputFunction> =>
testInput({ tests, ...options }, ...restArgs);
export default createTestInputFunction;

@ -1,7 +1,15 @@
import createTestInputFunction from './createTestInputFunction';
import testInput from './testInput';
import testLength from './testLength';
import testMax from './testMax';
import testNotBlank from './testNotBlank';
import testRange from './testRange';
export { testInput, testLength, testMax, testNotBlank, testRange };
export {
createTestInputFunction,
testInput,
testLength,
testMax,
testNotBlank,
testRange,
};

Loading…
Cancel
Save