AlexJPotter / fluentvalidation-ts

A TypeScript-first library for building strongly-typed validation rules
Apache License 2.0
87 stars 6 forks source link

Module '"fluentvalidation-ts"' declares 'ValidationErrors' locally, but it is not exported #40

Closed avenmore closed 1 year ago

avenmore commented 1 year ago

Up to version 2.3.0 I was able to use the type ValidationErrors as the mechanism I've created to validate my Vue components needs to track them. I was able to use:

import type { ValidationErrors } from 'fluentvalidation-ts/dist/ValidationErrors';

From version 3.0.2 I can no longer access that type:

import type { ValidationErrors } from 'fluentvalidation-ts';

Module '"fluentvalidation-ts"' declares 'ValidationErrors' locally, but it is not exported. ts(2459)

Would it be possible to expose that type?

TY

AlexJPotter commented 1 year ago

Hi @avenmore - thanks for reporting this. I've pushed a change in v3.1.0 which should allow you to import the ValidationErrors type from the root of the package. Please let me know if you have any more issues 😃

avenmore commented 1 year ago

Confirmed working and no other problems experienced with v3.1.0. Thanks very much :)