@milson/schema
Advanced tools
| import { MilsonGlobalSchema } from "./Global"; | ||
| export declare class MilsonArraySchema extends MilsonGlobalSchema { | ||
| schema: MilsonGlobalSchema; | ||
| schemaValue?: MilsonGlobalSchema; | ||
| constructor(milsonSchema: MilsonGlobalSchema); | ||
| schema(milsonSchema: MilsonGlobalSchema): this; | ||
| } |
@@ -8,5 +8,9 @@ "use strict"; | ||
| super("array"); | ||
| this.schema = milsonSchema; | ||
| this.schemaValue = milsonSchema; | ||
| } | ||
| schema(milsonSchema) { | ||
| this.schemaValue = milsonSchema; | ||
| return this; | ||
| } | ||
| } | ||
| exports.MilsonArraySchema = MilsonArraySchema; |
@@ -11,5 +11,6 @@ import { MilsonGlobalSchema } from "./Global"; | ||
| }; | ||
| export declare class MilsonObjectSchema<T> extends MilsonGlobalSchema { | ||
| schema: ObjectSchema<T>; | ||
| export declare class MilsonObjectSchema<T = unknown> extends MilsonGlobalSchema { | ||
| schemaValue?: ObjectSchema<T>; | ||
| constructor(createMilsonObject: CreateMilsonObject<T>); | ||
| schema(createMilsonObject: CreateMilsonObject<T>): this; | ||
| } |
@@ -8,5 +8,9 @@ "use strict"; | ||
| super("object"); | ||
| this.schema = createMilsonObject; | ||
| this.schemaValue = createMilsonObject; | ||
| } | ||
| schema(createMilsonObject) { | ||
| this.schemaValue = createMilsonObject; | ||
| return this; | ||
| } | ||
| } | ||
| exports.MilsonObjectSchema = MilsonObjectSchema; |
+1
-1
| { | ||
| "name": "@milson/schema", | ||
| "version": "1.0.11", | ||
| "version": "1.0.12", | ||
| "description": "A schema to type your data and use with @milson libs", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Unpublished package
Supply chain riskPackage version was not found on the registry. It may exist on a different registry and need to be configured to pull from that registry.
Found 1 instance in 1 package
Unpublished package
Supply chain riskPackage version was not found on the registry. It may exist on a different registry and need to be configured to pull from that registry.
Found 1 instance in 1 package
9833
3.77%230
4.55%