Skip to content

Commit

Permalink
feat(objectOf): add TS support
Browse files Browse the repository at this point in the history
  • Loading branch information
bigslycat committed Mar 3, 2019
1 parent 4353655 commit 3e54073
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,15 @@ export declare var isUndef: typeof undef;
export declare var passUndef: typeof undef;
export declare var isVoid: typeof undef;
export declare var passVoid: typeof undef;

export declare function objectOf<T, L extends string | number | boolean>(
...rules: Array<
((name: string, value: unknown) => ValidationError | T) | L
>
): Contract<{ readonly [key: string]: T | L }>;

export declare var isObjectOf: typeof objectOf;
export declare var passObjectOf: typeof objectOf;
export declare var objOf: typeof objectOf;
export declare var isObjOf: typeof objectOf;
export declare var passObjOf: typeof objectOf;

0 comments on commit 3e54073

Please sign in to comment.