GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Docs
  • Tutorials
  • Playground
  • Reference
  • code
  • createManagedMetadataKey
  • FieldState
  • Signal
  • MetadataKey
  • MetadataReducer

This view

  • Original page
  • New address

GeezerVison is showing next.angular.dev — createManagedMetadataKey • Angular

API

function createManagedMetadataKey<TRead, TWrite>(
  create: (
    state: FieldState<unknown, string | number>,
    data: Signal<TWrite | undefined>,
  ) => TRead,
): MetadataKey<TRead, TWrite, TWrite | undefined>;
function createManagedMetadataKey<TRead, TWrite, TAcc>(
  create: (
    state: FieldState<unknown, string | number>,
    data: 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. The accumulated value takes the last value set on a given field tree node, overriding any previously set values.

@paramcreate(state: FieldState<unknown, string | number>, data: Signal<TWrite | undefined>) => TRead

A 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.

@returnsMetadataKey<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.

@paramcreate(state: FieldState<unknown, string | number>, data: Signal<TAcc>) => TRead

A 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.

@paramreducerMetadataReducer<TAcc, TWrite>

The reducer used to combine individual value written to the key, this will determine the accumulated value that the create function receives.

@returnsMetadataKey<TRead, TWrite, TAcc>
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.