Skip to content

Commit

Permalink
fix: remove module augmentations for requiredTrue and `requiredFals…
Browse files Browse the repository at this point in the history
…e` validation errors since they conflict with the `required` module augmentation and are already covered by it
  • Loading branch information
MrWolfZ committed Jul 23, 2018
1 parent ea43bed commit 1ab557f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 24 deletions.
4 changes: 2 additions & 2 deletions validation/public_api.ts
Expand Up @@ -16,5 +16,5 @@ export { minLength, MinLengthValidationError } from './src/min-length';
export { notEqualTo, NotEqualToValidationError } from './src/not-equal-to';
export { pattern, PatternValidationError } from './src/pattern';
export { required, RequiredValidationError } from './src/required';
export { requiredFalse, RequiredFalseValidationError } from './src/required-false';
export { requiredTrue, RequiredTrueValidationError } from './src/required-true';
export { requiredFalse } from './src/required-false';
export { requiredTrue } from './src/required-true';
11 changes: 0 additions & 11 deletions validation/src/required-false.ts
@@ -1,16 +1,5 @@
import { ValidationErrors } from 'ngrx-forms';

export interface RequiredFalseValidationError {
actual: boolean;
}

// @ts-ignore
declare module 'ngrx-forms/src/state' {
export interface ValidationErrors {
required?: RequiredFalseValidationError;
}
}

/**
* A validation function that requires the value to be `false`. Considers `null` and
* `undefined` as valid. Combine this function with the `required` validation
Expand Down
11 changes: 0 additions & 11 deletions validation/src/required-true.ts
@@ -1,16 +1,5 @@
import { ValidationErrors } from 'ngrx-forms';

export interface RequiredTrueValidationError {
actual: boolean;
}

// @ts-ignore
declare module 'ngrx-forms/src/state' {
export interface ValidationErrors {
required?: RequiredTrueValidationError;
}
}

/**
* A validation function that requires the value to be `true`. Considers `null` and
* `undefined` as valid. Combine this function with the `required` validation
Expand Down

0 comments on commit 1ab557f

Please sign in to comment.