Skip to content
This repository has been archived by the owner on Nov 20, 2022. It is now read-only.

Commit

Permalink
Fixed type definitions of sanitizers and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Luuk van Houdt committed Feb 28, 2020
1 parent 53fa602 commit 3937e38
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export default class Schema {
constructor(instructions?: SchemaInstructions);

sanitize(input: object): object;

path(propName: string): Property;
}

Expand All @@ -13,6 +14,7 @@ export class Property {
constructor(name: string, definition?: SanitizerDefinition);

sanitize(input: any): any;

sanitizeObject(input: object): object;
}

Expand All @@ -22,11 +24,11 @@ interface SanitizerDefinition {
convert: ConvertSanitizer
}

type RemoveSanitizer = RegExp;
type RemoveSanitizer = string | RegExp;

interface FormatSanitizer {
from: RegExp,
to: string | number,
from: string | RegExp,
to: string | number | Function,
}

interface ConvertSanitizer {
Expand Down

0 comments on commit 3937e38

Please sign in to comment.