• Overview
@angular/forms/signals

MaybeFieldPath

Type Alias

Helper type for defining FieldPath. Given a type TValue that may include undefined, it extracts the undefined outside the FieldPath type.

API

    
      type MaybeFieldPath<TValue, TPathKind extends PathKind = PathKind.Root> = | (TValue & undefined)  | FieldPath<Exclude<TValue, undefined>, TPathKind>
    
    

Description

Helper type for defining FieldPath. Given a type TValue that may include undefined, it extracts the undefined outside the FieldPath type.

For example MaybeFieldPath<{a: number} | undefined, PathKind.Child> would be equivalent to undefined | Field<{a: number}, PathKind.child>.

Jump to details