Skip to content

Commit

Permalink
type adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
tinacious committed Jul 2, 2020
1 parent e3891ad commit 7b43402
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions lib/tsconfig.tsbuildinfo
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,8 @@
"affectsGlobalScope": false
},
"../validate.ts": {
"version": "e574158b3a78b22fdf57d00262520c07fcf1e3f6d8075276831a73bbc76184af",
"signature": "e89f2133d08cc04210d873f2d104e460dbe91fc07fae1fcdcb8c42edd00ba7c6",
"version": "4a08d280125f4db77039fdb014b7cc85dc71bb0ae6818112d16887739b7b9d40",
"signature": "184296a64fcf8d92fa26d1be2577f9878dbde9bbe3c0a8582adae9cbbfb71f68",
"affectsGlobalScope": false
}
},
Expand Down
8 changes: 4 additions & 4 deletions lib/validate.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/// <reference types="hapi__joi" />
import { Handler } from 'express';
import { Schema } from '@hapi/joi';
import { SchemaMap } from '@hapi/joi';
interface Options {
params?: Schema;
body?: Schema;
query?: Schema;
params?: SchemaMap;
body?: SchemaMap;
query?: SchemaMap;
}
interface ExpressJoiValidate {
(schemaOptions: Options): Handler;
Expand Down
2 changes: 1 addition & 1 deletion lib/validate.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions validate.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Handler } from 'express';
import { Schema } from '@hapi/joi'
import { SchemaMap } from '@hapi/joi'
const Joi = require('@hapi/joi');

type SuppertedKeys = 'params' | 'body' | 'query'

interface Options {
params?: Schema
body?: Schema
query?: Schema
params?: SchemaMap
body?: SchemaMap
query?: SchemaMap
}

interface ExpressJoiValidate {
Expand Down

0 comments on commit 7b43402

Please sign in to comment.