summaryrefslogtreecommitdiff
path: root/src/api/validator2.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-03-02 17:16:55 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-03-02 17:16:55 +0900
commit85f43b49cffc645019e23e996f3ce85413d5b25f (patch)
treeacf68452117e4e1033cc26be4fa379565b501f25 /src/api/validator2.ts
parentFix bug (diff)
downloadsharkey-85f43b49cffc645019e23e996f3ce85413d5b25f.tar.gz
sharkey-85f43b49cffc645019e23e996f3ce85413d5b25f.tar.bz2
sharkey-85f43b49cffc645019e23e996f3ce85413d5b25f.zip
いい感じに
Diffstat (limited to 'src/api/validator2.ts')
-rw-r--r--src/api/validator2.ts32
1 files changed, 15 insertions, 17 deletions
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;