mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-08 03:00:02 +00:00
Updated argument of validator function to be optional.
This commit is contained in:
3
types/simpl-schema/index.d.ts
vendored
3
types/simpl-schema/index.d.ts
vendored
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/aldeed/simple-schema-js
|
||||
// Definitions by: Andreas Richter <https://github.com/arichter83>
|
||||
// Qkramer <https://github.com/Qkramer>
|
||||
// Deskoh <https://github.com/deskoh>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export interface ValidationContext extends SimpleSchemaValidationContextStatic {
|
||||
@@ -133,7 +134,7 @@ interface SimpleSchemaStatic {
|
||||
newContext(): ValidationContext;
|
||||
objectKeys(keyPrefix: any): any[];
|
||||
validate(obj: any, options?: ValidationOption): void;
|
||||
validator(options: ValidationOption): () => boolean;
|
||||
validator(options?: ValidationOption): () => boolean;
|
||||
RegEx: {
|
||||
Email: RegExp;
|
||||
EmailWithTLD: RegExp;
|
||||
|
||||
@@ -35,6 +35,12 @@ StringSchema.validate({
|
||||
regExpString: "id"
|
||||
}, {keys: ['basicString']});
|
||||
|
||||
StringSchema.validator();
|
||||
|
||||
StringSchema.validator({
|
||||
clean: true
|
||||
});
|
||||
|
||||
const StringSchemaWithOptions = new SimpleSchema({
|
||||
basicString: {
|
||||
type: String
|
||||
|
||||
Reference in New Issue
Block a user