Skip to content

Commit 9c7bc8c

Browse files
authored
Merge pull request #129 from kukuhyoniatmoko/master
improve type def for `CompilationFunction`
2 parents b538cd9 + ad26068 commit 9c7bc8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ declare module 'fastest-validator' {
786786

787787
type CheckerFunction<T = unknown> = (value: T, schema: ValidationSchema, path: string, parent: object | null, context: Context) => true | ValidationError[];
788788

789-
type CompilationFunction = (rule: CompilationRule, path: string, context: Context) => { sanitized?: boolean, source: string };
789+
type CompilationFunction = (this: Validator, rule: CompilationRule, path: string, context: Context) => { sanitized?: boolean, source: string };
790790

791791
class Validator {
792792
/**

0 commit comments

Comments
 (0)