• 개요
@angular/forms/signals/compat

extractValue

함수
안정화v22.0부터

Utility to unwrap a FieldTree into its underlying raw value.

API

function extractValue<T>(field: FieldTree<T>): RawValue<T>;
function extractValue<T>(
  field: FieldTree<T>,
  filter: ExtractFilter,
): DeepPartial<RawValue<T>>;
function extractValue<T>(field: FieldTree<T>): RawValue<T>;

Utility to unwrap a FieldTree into its underlying raw value.

This function is recursive, so if the field tree represents an object or an array, the result will be an object or an array of the raw values of its children.

@paramfieldFieldTree<T>

The field tree to extract the value from.

@returnsRawValue<T>

The raw value of the field tree.

function extractValue<T>(field: FieldTree<T>, filter: ExtractFilter): DeepPartial<RawValue<T>>;

Utility to unwrap a FieldTree into its underlying raw value.

This function is recursive, so if the field tree represents an object or an array, the result will be an object or an array of the raw values of its children.

@paramfieldFieldTree<T>

The field tree to extract the value from.

@paramfilterExtractFilter

Criteria to include only fields matching certain state (dirty, touched, enabled).

@returnsDeepPartial<RawValue<T>>

A partial value containing only the fields matching the filter, or undefined if none match.

설명

Utility to unwrap a FieldTree into its underlying raw value.

This function is recursive, so if the field tree represents an object or an array, the result will be an object or an array of the raw values of its children.

상세 내용으로 이동