@types/jsen
TypeScript icon, indicating that this package has built-in type declarations

0.0.25 • Public • Published

Installation

npm install --save @types/jsen

Summary

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

Details

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

index.d.ts

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: Thu, 25 Jan 2024 22:35:26 GMT
  • Dependencies: none

Credits

These definitions were written by .

Readme

Keywords

none

Package Sidebar

Install

npm i @types/jsen

Weekly Downloads

180

Version

0.0.25

License

MIT

Unpacked Size

4.7 kB

Total Files

5

Last publish

Collaborators

  • types