From 85f43b49cffc645019e23e996f3ce85413d5b25f Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 2 Mar 2017 17:16:55 +0900 Subject: いい感じに 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(-) (limited to 'src') diff --git a/src/api/validator2.ts b/src/api/validator2.ts index a1c5ba164b..923f102e42 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; -- cgit v1.2.3-freya