From 45c8eec41b1072aa9213219031dc5b9e9d1711bd Mon Sep 17 00:00:00 2001 From: Yann Renaudin Date: Sun, 1 Sep 2019 12:26:42 -0400 Subject: [PATCH] fix: expose Validation object instead of Validation interface --- src/morphism.spec.ts | 12 ++++++++++-- src/morphism.ts | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/morphism.spec.ts b/src/morphism.spec.ts index 7635d47..9d3fd87 100644 --- a/src/morphism.spec.ts +++ b/src/morphism.spec.ts @@ -1,7 +1,15 @@ -import Morphism, { StrictSchema, morphism, Schema, createSchema, SchemaOptions, SCHEMA_OPTIONS_SYMBOL, reporter } from './morphism'; +import Morphism, { + StrictSchema, + morphism, + Schema, + createSchema, + SchemaOptions, + SCHEMA_OPTIONS_SYMBOL, + reporter, + Validation +} from './morphism'; import { User, MockData } from './utils-test'; import { ActionSelector, ActionAggregator } from './types'; -import { Validation } from './validation/Validation'; import { defaultFormatter, ValidationError } from './validation/reporter'; describe('Morphism', () => { diff --git a/src/morphism.ts b/src/morphism.ts index 1dc6dbf..5b5aa7c 100644 --- a/src/morphism.ts +++ b/src/morphism.ts @@ -6,8 +6,8 @@ import { Schema, StrictSchema, Constructable, SourceFromSchema, Mapper, Destinat import { MorphismSchemaTree, createSchema, SchemaOptions } from './MorphismTree'; import { MorphismRegistry, IMorphismRegistry } from './MorphismRegistry'; import { decorator } from './MorphismDecorator'; -import { Reporter, reporter as defaultReporter, Formatter, targetHasErrors, ValidationErrors, Validation } from './validation/reporter'; -import { BaseValidator, Rule } from './validation/Validation'; +import { Reporter, reporter as defaultReporter, Formatter, targetHasErrors, ValidationErrors } from './validation/reporter'; +import { BaseValidator, Rule, Validation } from './validation/Validation'; /** * Low Level transformer function.