teyit 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/main.d.mts +3 -3
- package/dist/main.d.ts +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -156,10 +156,10 @@ Teyit schema builder.
|
|
|
156
156
|
|
|
157
157
|
Validate the properties with your Teyit schema.
|
|
158
158
|
|
|
159
|
-
> | Parameter | Type
|
|
160
|
-
> | ------------ |
|
|
161
|
-
> | `schema` | [Schema]
|
|
162
|
-
> | `properties` | [
|
|
159
|
+
> | Parameter | Type | Default | Description |
|
|
160
|
+
> | ------------ | ----------- | ------- | -------------------------- |
|
|
161
|
+
> | `schema` | [Schema] | | Teyit schema. |
|
|
162
|
+
> | `properties` | [AnyObject] | | Properties to be validate. |
|
|
163
163
|
>
|
|
164
164
|
> returns [Promise]<[AnyObject]>
|
|
165
165
|
>
|
package/dist/main.d.mts
CHANGED
|
@@ -113,13 +113,11 @@ type TeyitOptions = {
|
|
|
113
113
|
};
|
|
114
114
|
};
|
|
115
115
|
|
|
116
|
-
type UnknownObject = Record<string, unknown>;
|
|
117
|
-
|
|
118
116
|
declare class Teyit {
|
|
119
117
|
private readonly options;
|
|
120
118
|
constructor(options?: TeyitOptions);
|
|
121
119
|
private cleanupTypesDir;
|
|
122
|
-
validate(schema: Schema, properties:
|
|
120
|
+
validate(schema: Schema, properties: AnyObject): Promise<AnyObject>;
|
|
123
121
|
declare(schema: Schema, name: string): Promise<void>;
|
|
124
122
|
convertToJSONSchema(schema: Schema): JSONSchema;
|
|
125
123
|
}
|
|
@@ -146,6 +144,8 @@ declare namespace Patterns_export {
|
|
|
146
144
|
export { Patterns_export_Domain as Domain, Patterns_export_Email as Email, Patterns_export_HTTP as HTTP, Patterns_export_PhoneNumber as PhoneNumber, Patterns_export_URI as URI, Patterns_export_Username as Username };
|
|
147
145
|
}
|
|
148
146
|
|
|
147
|
+
type UnknownObject = Record<string, unknown>;
|
|
148
|
+
|
|
149
149
|
declare class ValidationError extends Error {
|
|
150
150
|
errors: {
|
|
151
151
|
message: string;
|
package/dist/main.d.ts
CHANGED
|
@@ -113,13 +113,11 @@ type TeyitOptions = {
|
|
|
113
113
|
};
|
|
114
114
|
};
|
|
115
115
|
|
|
116
|
-
type UnknownObject = Record<string, unknown>;
|
|
117
|
-
|
|
118
116
|
declare class Teyit {
|
|
119
117
|
private readonly options;
|
|
120
118
|
constructor(options?: TeyitOptions);
|
|
121
119
|
private cleanupTypesDir;
|
|
122
|
-
validate(schema: Schema, properties:
|
|
120
|
+
validate(schema: Schema, properties: AnyObject): Promise<AnyObject>;
|
|
123
121
|
declare(schema: Schema, name: string): Promise<void>;
|
|
124
122
|
convertToJSONSchema(schema: Schema): JSONSchema;
|
|
125
123
|
}
|
|
@@ -146,6 +144,8 @@ declare namespace Patterns_export {
|
|
|
146
144
|
export { Patterns_export_Domain as Domain, Patterns_export_Email as Email, Patterns_export_HTTP as HTTP, Patterns_export_PhoneNumber as PhoneNumber, Patterns_export_URI as URI, Patterns_export_Username as Username };
|
|
147
145
|
}
|
|
148
146
|
|
|
147
|
+
type UnknownObject = Record<string, unknown>;
|
|
148
|
+
|
|
149
149
|
declare class ValidationError extends Error {
|
|
150
150
|
errors: {
|
|
151
151
|
message: string;
|