Skip to content
AutoMapper TypeScript
Esc
navigateopen⌘Jpreview

undefinedSubstitution

Replace a strictly undefined source member with a fixed destination value.

forMember(
  (destination) => destination.fullName,
  undefinedSubstitution('Unknown user'),
);

Only undefined is substituted. A null value is unchanged; use nullSubstitution() for that case. Object substitutions are assigned as provided without nested mapping.

Last updated on July 16, 2026

Was this page helpful?