File

libs/common/src/lib/typed-forms/types.ts

Deprecated

This has been rendered obsolete by Angular 14 along with TALY typed forms.

Index

Properties

Properties

emitEvent (Optional)
Type boolean
emitModelToViewChange (Optional)
Type boolean
emitViewToModelChange (Optional)
Type boolean
onlySelf (Optional)
Type boolean
import {
  AbstractControlOptions as NgAbstractControlOptions,
  ValidationErrors as NgValidationErrors,
  AbstractControl as ngAbstractControl
} from '@angular/forms';
import { Observable } from 'rxjs';

/**
 * @deprecated This has been rendered obsolete by Angular 14 along with TALY typed forms.
 */
export type ExtractStrings<T> = Extract<keyof T, string>;

/**
 * @deprecated This has been rendered obsolete by Angular 14 along with TALY typed forms.
 */
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export type Obj = Record<string, any>;

/**
 * @deprecated This has been rendered obsolete by Angular 14 along with TALY typed forms.
 */
export type ControlState = 'VALID' | 'INVALID' | 'PENDING' | 'DISABLED';

/**
 * @deprecated This has been rendered obsolete by Angular 14 along with TALY typed forms.
 */
export interface BoxedValue<T> {
  value: T;
  disabled?: boolean;
}

/**
 * @deprecated This has been rendered obsolete by Angular 14 along with TALY typed forms.
 */
export type OrBoxedValue<T> = T | BoxedValue<T>;

/**
 * @deprecated This has been rendered obsolete by Angular 14.
 * Please use `AbstractControl` from `@angular/forms` instead.
 */
export interface AbstractControl<T = unknown> extends ngAbstractControl {
  value: T;
  readonly valueChanges: Observable<T>;
}

/**
 * @deprecated This has been rendered obsolete by Angular 14 along with TALY typed forms.
 */
export interface ControlOptions {
  onlySelf?: boolean;
  emitEvent?: boolean;
  emitModelToViewChange?: boolean;
  emitViewToModelChange?: boolean;
}

/**
 * @deprecated This has been rendered obsolete by Angular 14 along with TALY typed forms.
 */
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export type ValidatorFn<T = unknown, E = any> = (
  control: AbstractControl<T>
) => ValidationErrors<E> | null;
export type Validator = ValidatorFn | ValidatorFn[];

/**
 * @deprecated This has been rendered obsolete by Angular 14 along with TALY typed forms.
 */
export type EmitEvent = Pick<ControlOptions, 'emitEvent'>;

/**
 * @deprecated This has been rendered obsolete by Angular 14 along with TALY typed forms.
 */
export type ControlEventOptions = Pick<ControlOptions, 'emitEvent' | 'onlySelf'>;

/**
 * @deprecated This has been rendered obsolete by Angular 14 along with TALY typed forms.
 */
export type OnlySelf = Pick<ControlOptions, 'onlySelf'>;

/**
 * @deprecated This has been rendered obsolete by Angular 14 along with TALY typed forms.
 */
export type AsyncValidator = AsyncValidatorFn | AsyncValidatorFn[] | null;

/**
 * @deprecated This has been rendered obsolete by Angular 14 along with TALY typed forms.
 */
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export type AsyncValidatorFn<T = unknown, E = any> = (
  control: AbstractControl<T>
) => Promise<ValidationErrors<E> | null> | Observable<ValidationErrors<E> | null>;

/**
 * @deprecated This has been rendered obsolete by Angular 14 along with TALY typed forms.
 */
export type ValidationErrors<T = NgValidationErrors> = T;

/**
 * @deprecated This has been rendered obsolete by Angular 14 along with TALY typed forms.
 */
export type ControlPath = (string | number)[] | string;

/**
 * @deprecated This has been rendered obsolete by Angular 14 along with TALY typed forms.
 */
export type ValidatorOrOpts = ValidatorFn | ValidatorFn[] | NgAbstractControlOptions | null;

results matching ""

    No results matching ""