Currently deferred functions can only use types that are built into puppet such as String, etc, but it can't use types from modules such as stdlib, because puppet does not pluginsync those types to the agent.
Yeah, without this deferred functions can't call functions that use datatypes from stdlib (or other modules) to validate inputs, e.g. https://github.com/puppetlabs/puppetlabs-stdlib/blob/main/types/httpsurl.pp#L1. So then as a module author you have to think about whether your function might be called in a deferred context or not.
corey.benefrayim says this issue is what prevents "puppet apply" from working with per-module type aliases. Is this true? Does "puppet apply" depend on pluginsync?