From 685fd29957acb7841f715aa92fc2ec60c51e9817 Mon Sep 17 00:00:00 2001 From: Avior Date: Tue, 25 Mar 2025 14:36:43 +0100 Subject: [PATCH] fix: infinite dep load --- src/Schema.ts | 5 ----- src/SchemaItem.ts | 4 +--- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/Schema.ts b/src/Schema.ts index f0d0fab..eaa946f 100644 --- a/src/Schema.ts +++ b/src/Schema.ts @@ -18,11 +18,6 @@ import { SchemaJSON } from './types' export function parceable() { return (target: object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor) => { - // make sure the target is of SchemaItem - if (!(target instanceof SchemaItem)) { - throw new Error('the decorator is only usable on Schema') - } - // make sur the property exists in the target if (!(propertyKey in target)) { throw new Error('property not set in object') diff --git a/src/SchemaItem.ts b/src/SchemaItem.ts index 18079f1..b4d343d 100644 --- a/src/SchemaItem.ts +++ b/src/SchemaItem.ts @@ -1,9 +1,7 @@ /* eslint-disable id-length */ import { objectClean } from '@dzeio/object-util' import { StandardSchemaV1 } from '@standard-schema/spec' -import SchemaNullable from 'items/nullable' -import { isNull } from './helpers' -import Schema, { parceable } from './Schema' +import Schema, { isNull, parceable, SchemaNullable } from './Schema' import { SchemaJSON, ValidationError, ValidationResult } from './types' export default abstract class SchemaItem implements StandardSchemaV1 {