diff --git a/bootstrap-validator/bootstrap-validator-tests.ts b/bootstrap-validator/bootstrap-validator-tests.ts new file mode 100644 index 0000000000..07d4753ed1 --- /dev/null +++ b/bootstrap-validator/bootstrap-validator-tests.ts @@ -0,0 +1,14 @@ +/// + +$('#myForm').validator(); +$('#myForm').validator('update'); +$('#myForm').validator('validate'); +$('#myForm').validator('destroy'); +$('#myForm').validator({ + delay: 500, + html: false, + disable: false, + focus: true, + feedback: {}, + custom: {} +}); diff --git a/bootstrap-validator/index.d.ts b/bootstrap-validator/index.d.ts new file mode 100644 index 0000000000..92dee2c310 --- /dev/null +++ b/bootstrap-validator/index.d.ts @@ -0,0 +1,20 @@ +// Type definitions for bootstrap-validator 0.11 +// Project: https://github.com/1000hz/bootstrap-validator +// Definitions by: Brady Liles +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +interface ValidatorOptions { + delay?: number; + html?: boolean; + disable?: boolean; + focus?: boolean; + feedback?: any; + custom?: any; +} + +interface JQuery { + validator(options?: ValidatorOptions): JQuery; + validator(command: string): JQuery; +} diff --git a/bootstrap-validator/tsconfig.json b/bootstrap-validator/tsconfig.json new file mode 100644 index 0000000000..d5bde637e0 --- /dev/null +++ b/bootstrap-validator/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "bootstrap-validator-tests.ts" + ] +} diff --git a/bootstrap-validator/tslint.json b/bootstrap-validator/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/bootstrap-validator/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" }