Skip to content
This repository was archived by the owner on Apr 19, 2022. It is now read-only.

Latest commit

 

History

History
187 lines (114 loc) · 4.15 KB

compiler_main.md

File metadata and controls

187 lines (114 loc) · 4.15 KB

indicative-compilercompiler/main

External module: compiler/main

Index

Classes

Interfaces

Type aliases

Type aliases

ArrayWrapper

Ƭ ArrayWrapper: function

Array wrapper to wrap children nodes of inside a wildcard or indexed array

Type declaration:

▸ (index: string, field: string, children: T | U[], dotPath: string[]): U

Parameters:

Name Type
index string
field string
children T | U[]
dotPath string[]

ConsumerFn

Ƭ ConsumerFn: function

Tree node consumer called by the TreeWalker

Type declaration:

▸ (field: string, type: "literal" | "object" | "array", rules: ParsedRule[], dotPath: string[], pointer: string): T

Parameters:

Name Type
field string
type "literal" | "object" | "array"
rules ParsedRule[]
dotPath string[]
pointer string

ErrorCollectorFn

Ƭ ErrorCollectorFn: function

A custom error collector that works as a bridge between the validator and the formatter.

Type declaration:

▸ (formatter: ErrorFormatterContract, message: string | Error, field: string, rule: string, args: Array): void

Parameters:

Name Type
formatter ErrorFormatterContract
message string | Error
field string
rule string
args Array

SanitizationDataRoot

Ƭ SanitizationDataRoot: Omit‹ValidationDataRoot, "pointer" | "arrayPointer"›

Shape of sanitizer data root.


SanitizationDefination

Ƭ SanitizationDefination: SanitizationDefinition


SanitizationDefinition

Ƭ SanitizationDefinition: object

Shape of sanitization definition

Type declaration:


SanitizeFunction

Ƭ SanitizeFunction: function

Shape of sanitization function.

Type declaration:

▸ (data: SanitizationDataRoot, field: string, args: any[], config: unknown): void

Parameters:

Name Type
data SanitizationDataRoot
field string
args any[]
config unknown

ValidateFunction

Ƭ ValidateFunction: function

Shape of validation function

Type declaration:

▸ (data: ValidationDataRoot, field: string, args: any[], config: unknown): boolean | Promise‹boolean›

Parameters:

Name Type
data ValidationDataRoot
field string
args any[]
config unknown

ValidationDataRoot

Ƭ ValidationDataRoot: object

The data object passed to all validation functions.

Type declaration:


ValidationDefination

Ƭ ValidationDefination: ValidationDefinition


ValidationDefinition

Ƭ ValidationDefinition: object

Shape of validation defination

Type declaration: