Skip to content

Commit

Permalink
fix: cyclical import
Browse files Browse the repository at this point in the history
fixes #1138
  • Loading branch information
jquense committed Dec 4, 2020
1 parent 79bb58f commit d5c5391
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
AnyObject,
} from './types';

import { ValidationError } from '.';
import ValidationError from './ValidationError';
import type { Asserts } from './util/types';
import ReferenceSet from './util/ReferenceSet';
import Reference from './Reference';
Expand Down Expand Up @@ -106,7 +106,7 @@ export default abstract class BaseSchema<
readonly deps: readonly string[] = [];

tests: Test[];
transforms: TransformFunction<this>[];
transforms: TransformFunction<AnySchema>[];

private conditions: Condition[] = [];

Expand Down Expand Up @@ -332,7 +332,7 @@ export default abstract class BaseSchema<
return result;
}

protected _cast(rawValue: any, _options: CastOptions<TContext>) {
protected _cast(rawValue: any, _options: CastOptions<TContext>): any {
let value =
rawValue === undefined
? rawValue
Expand Down Expand Up @@ -553,7 +553,7 @@ export default abstract class BaseSchema<

transform(fn: TransformFunction<this>) {
var next = this.clone();
next.transforms.push(fn);
next.transforms.push(fn as TransformFunction<any>);
return next;
}

Expand Down Expand Up @@ -645,7 +645,7 @@ export default abstract class BaseSchema<
if (dep.isSibling) next.deps.push(dep.key);
});

next.conditions.push(new Condition<this>(deps, options!));
next.conditions.push(new Condition(deps, options!) as Condition);

return next;
}
Expand Down

0 comments on commit d5c5391

Please sign in to comment.