API
function createManagedMetadataKey<TRead, TWrite>( create: (s: Signal<TWrite | undefined>) => TRead,): MetadataKey<TRead, TWrite, TWrite | undefined>;function createManagedMetadataKey<TRead, TWrite, TAcc>( create: (s: Signal<TAcc>) => TRead, reducer: MetadataReducer<TAcc, TWrite>,): MetadataKey<TRead, TWrite, TAcc>;function createManagedMetadataKey<TRead, TWrite>(create: (s: Signal<TWrite | undefined>) => TRead): MetadataKey<TRead, TWrite, TWrite | undefined>;Creates a metadata key that exposes a managed value based on the accumulated result of the values written to the key. The accumulated value takes the last value set on a given field tree node, overriding any previously set values.
(s: Signal<TWrite | undefined>) => TReadA function that receives a signal of the accumulated value and returns the managed
value based on it. This function runs during the construction of the FieldTree node,
and runs in the injection context of that node.
MetadataKey<TRead, TWrite, TWrite | undefined>function createManagedMetadataKey<TRead, TWrite, TAcc>(create: (s: Signal<TAcc>) => TRead, reducer: MetadataReducer<TAcc, TWrite>): MetadataKey<TRead, TWrite, TAcc>;Creates a metadata key that exposes a managed value based on the accumulated result of the values written to the key.
(s: Signal<TAcc>) => TReadA function that receives a signal of the accumulated value and returns the managed
value based on it. This function runs during the construction of the FieldTree node,
and runs in the injection context of that node.
MetadataReducer<TAcc, TWrite>The reducer used to combine individual value written to the key, this will determine the accumulated value that the create function receives.
MetadataKey<TRead, TWrite, TAcc>