
Parsifly Docs
FieldsDescriptor
Provides a descriptor for a dynamic collection of fields. This class handles: - Loading field descriptors on demand - Registering and maintaining runtime handlers (value retrieval, change events) - Exposing sanitized descriptors for external consumers Consumers are expected to instantiate this class with a `key` and an `onGetFields` loader, then call `onGetFields` whenever fresh field data is needed. Returned fields have runtime handler functions removed from the final object shape, as those are exposed through event mechanisms defined by the system.
parsifly-extension-base / index / FieldsDescriptor
Class: FieldsDescriptor
Defined in: lib/shared/descriptors/FieldsDescriptor.ts:40
Provides a descriptor for a dynamic collection of fields.
This class handles:
- Loading field descriptors on demand
- Registering and maintaining runtime handlers (value retrieval, change events)
- Exposing sanitized descriptors for external consumers
Consumers are expected to instantiate this class with a key and an
onGetFields loader, then call onGetFields whenever fresh field data
is needed.
Returned fields have runtime handler functions removed from the final object shape, as those are exposed through event mechanisms defined by the system.
Constructors
Constructor
new FieldsDescriptor(
props):FieldsDescriptor
Defined in: lib/shared/descriptors/FieldsDescriptor.ts:73
Parameters
props
Returns
FieldsDescriptor
Properties
key
readonlykey:string
Defined in: lib/shared/descriptors/FieldsDescriptor.ts:50
Unique identifier for this descriptor instance. Mirrors the key provided in the constructor props.
onGetFields()
readonlyonGetFields: (key) =>Promise<FieldDescriptor[]>
Defined in: lib/shared/descriptors/FieldsDescriptor.ts:63
Loads all fields for a given key and prepares them for external use.
Each call refreshes the descriptor's internal registry and ensures that only the current fields for the given key remain active.
Returned field objects will not include runtime callback handlers.
Parameters
key
string
Identifier representing the field group to load.
Returns
A Promise resolving to the sanitized list of field descriptors.
type
readonlytype:"fields"='fields'
Defined in: lib/shared/descriptors/FieldsDescriptor.ts:44
Static descriptor type used for system-level identification.