mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-10 11:40:16 +08:00
adding defs for https://github.com/gkz/type-check
This commit is contained in:
Vendored
+33
@@ -0,0 +1,33 @@
|
||||
// Type definitions for type-check v0.3.1
|
||||
// Project: https://github.com/gkz/type-check
|
||||
// Definitions by: Hans Windhoff <https://github.com/hansrwindhoff>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
declare module TypeCheck {
|
||||
|
||||
export interface CustomType {
|
||||
[typeName: string]: {
|
||||
typeOf: string;
|
||||
validate: (x: any)=> any;
|
||||
}
|
||||
}
|
||||
|
||||
export interface Options {
|
||||
customTypes: CustomType;
|
||||
}
|
||||
|
||||
export interface TC{
|
||||
VERSION: string;
|
||||
typeCheck: (typeDescription: string , inst: any, options?: Options) => boolean;
|
||||
parseType: (typeDescription: string) => Object;
|
||||
parsedTypeCheck: (parsedType: any, obj: any) => boolean;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
declare var typecheck: TypeCheck.TC;
|
||||
|
||||
declare module "type-check" {
|
||||
export=typecheck;
|
||||
}
|
||||
Reference in New Issue
Block a user