Skip to content

Commit ab90372

Browse files
types fix dist
1 parent 6ea087a commit ab90372

File tree

7 files changed

+34
-57
lines changed

7 files changed

+34
-57
lines changed

dist/ValidationChain.d.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

dist/ValidationChain.js

Lines changed: 0 additions & 41 deletions
This file was deleted.

dist/types.d.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
export interface ValidationRule {
2+
type: string;
3+
message?: string;
4+
options?: Record<string, any>;
5+
async?: boolean;
6+
}
7+
export interface ValidationError {
8+
field: string;
9+
message: string;
10+
}
11+
export interface ValidationResult {
12+
isValid: boolean;
13+
errors: ValidationError[];
14+
}
15+
export interface ValidationSchema {
16+
[field: string]: ValidationRule[];
17+
}
18+
export type ValidatorFunction = (value: any, options?: any) => boolean;
19+
export type AsyncValidatorFunction = (value: any, options?: any) => Promise<boolean>;

dist/types.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
{
22
"name": "form-validation-lib-js",
3-
"version": "2.0.4",
3+
"version": "2.0.5",
44
"description": "A comprehensive JavaScript form validation library",
5-
"main": "dist/index.js",
6-
"types": "dist/index.d.ts",
5+
"exports": {
6+
".": {
7+
"import": "./dist/esm/index.js",
8+
"require": "./dist/cjs/index.js",
9+
"types": "./dist/index.d.ts"
10+
}
11+
},
12+
"main": "./dist/cjs/index.js",
13+
"module": "./dist/esm/index.js",
14+
"types": "./dist/index.d.ts",
715
"scripts": {
816
"build": "tsc",
917
"test": "jest",
File renamed without changes.

0 commit comments

Comments
 (0)