Type
InferWrapperRegistry
@ng-forge/dynamic-forms
Derive the FieldRegistryWrappers augmentation shape from a wrapper bundle.
Maps each registration's wrapperName to its props type (the config carried
by wrapperProps<T>()). If a registration has no props, falls back to the
minimal discriminant shape { readonly type: wrapperName }.
Signature
type InferWrapperRegistry<T> =
T extends WrappersBundle<infer R>
? {
[Reg in R[number] as Reg['wrapperName']]: Reg extends { props: infer P }
? Exclude<P, undefined>
: { readonly type: Reg['wrapperName'] };
}
: never;Type Parameters
| Name | Constraint | Default | Description |
|---|---|---|---|
T | - | - | - |
Examples
declare module '@ng-forge/dynamic-forms' {
interface FieldRegistryWrappers extends InferWrapperRegistry<typeof appWrappers> {}
}packages/dynamic-forms/src/lib/wrappers/create-wrappers.ts:105