dynamic-forms / Interface

FormEvent

Base interface for all form events in the dynamic form system.

All form events must implement this interface to be compatible with the event bus system. The type property is used for event filtering and type-safe subscriptions.

Properties

NameTypeDescription
type
r
string

Unique identifier for the event type used for filtering and subscriptions

Example usage

export class SubmitEvent implements FormEvent {
  readonly type = 'submit';
}

export class ValidationErrorEvent implements FormEvent {
  readonly type = 'validation-error';
  constructor(public errors: ValidationErrors) {}
}