0.0.25 • Published 1 year ago

@types/jsen v0.0.25

Weekly downloads
456
License
MIT
Repository
github
Last release
1 year ago

Installation

npm install --save @types/jsen

Summary

This package contains type definitions for jsen (JSON Sentinel) (https://github.com/bugventure/jsen).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jsen.

index.d.ts

// Type definitions for jsen (JSON Sentinel)
// Project: https://github.com/bugventure/jsen
// Definitions by: Vladimir Đokić <https://github.com/vladeck>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

declare namespace Jsen {

    export interface JsenFormats {
        [key: string]: string | RegExp | Function;
    }

    export interface JsenSettings {
        missing$Ref?: boolean | undefined;
        greedy?: boolean | undefined;
        formats?: JsenFormats | undefined;
        schemas?: any;
    }

    export interface JsenBuildSettings {
        copy?: boolean | undefined;
        additionalProperties?: boolean | undefined;
    }

    export interface JsenValidator {
        (data?: any): boolean;
        build(initial?: any, options?: JsenBuildSettings): any;
        errors: JsenValidateError[];
    }

    export interface JsenValidateError {
        path: string;
        keyword: string;
        message?: string | undefined;
    }

    export interface JsenUnique {
        (array: any[]): boolean;
        findIndex(array: any[], value: any, comparator: (obj1: any, obj2: any) => boolean): number;
    }

    export interface JsenMain {
        (schema?: any, options?: JsenSettings): JsenValidator;
        clone(data: any): any;
        equal(a: any, b: any): boolean;
        unique: JsenUnique;
    }
}

declare var Jsen: Jsen.JsenMain;
export = Jsen;
export as namespace jsen;

Additional Details

  • Last updated: Fri, 09 Jul 2021 02:32:31 GMT
  • Dependencies: none
  • Global values: jsen

Credits

These definitions were written by Vladimir Đokić.

0.0.25

1 year ago

0.0.22

2 years ago

0.0.23

2 years ago

0.0.24

2 years ago

0.0.20

4 years ago

0.0.21

4 years ago

0.0.19

8 years ago

0.0.18

9 years ago

0.0.17

9 years ago

0.0.16-alpha

9 years ago

0.0.15-alpha

9 years ago

0.0.14-alpha

9 years ago

0.0.13-alpha

9 years ago

0.0.12-alpha

9 years ago

0.0.11-alpha

9 years ago

0.0.10-alpha

9 years ago

0.0.5-alpha

9 years ago

0.0.4-alpha

9 years ago