From 85f43b49cffc645019e23e996f3ce85413d5b25f Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 2 Mar 2017 17:16:55 +0900 Subject: [PATCH] =?UTF-8?q?=E3=81=84=E3=81=84=E6=84=9F=E3=81=98=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/validator2.ts | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/src/api/validator2.ts b/src/api/validator2.ts index a1c5ba164..923f102e4 100644 --- a/src/api/validator2.ts +++ b/src/api/validator2.ts @@ -79,25 +79,23 @@ class NumberValidator extends ValidatorCore { } } -const it = (value) => { - return { - must: { - be: { - a: { - string: 0, - number: () => new NumberValidator(value), - boolean: 0, - set: 0 - }, - an: { - id: 0, - array: 0, - object: 0 - } +const it = (value: any) => ({ + must: { + be: { + a: { + string: 0, + number: () => new NumberValidator(value), + boolean: 0, + set: 0 + }, + an: { + id: 0, + array: 0, + object: 0 } } - }; -}; + } +}); export default it;