Skip to main content

generate-index-metafile

Generate index metafile event class.

Events

GenerateIndexMetafileEvent

Defined in: events/generate-index-metafile.ts:14

Event emitted before/after generating index metafile.

Extends

Constructors

Constructor
new GenerateIndexMetafileEvent(data, options?): GenerateIndexMetafileEvent;

Defined in: events/generate-index-metafile.ts:22

Parameters
data
category

string

dirPath

string

options?

Record<string, unknown>

options?

CancellableEventOptions

Returns

GenerateIndexMetafileEvent

Overrides

CancellableEvent.constructor

Properties

data
readonly data: object;

Defined in: events/generate-index-metafile.ts:16

Event data containing directory path, category, and options

category
category: string;
dirPath
dirPath: string;
options?
optional options: Record<string, unknown>;

Accessors

defaultAction
Get Signature
get defaultAction(): DefaultAction | undefined;

Defined in: events/base.ts:109

Gets the default action function if one was provided.

Returns

DefaultAction | undefined

Inherited from

CancellableEvent.defaultAction

defaultPrevented
Get Signature
get defaultPrevented(): boolean;

Defined in: events/base.ts:95

Gets whether the default action has been prevented.

Returns

boolean

Inherited from

CancellableEvent.defaultPrevented

propagationStopped
Get Signature
get propagationStopped(): boolean;

Defined in: events/base.ts:102

Gets whether propagation has been stopped.

Returns

boolean

Inherited from

CancellableEvent.propagationStopped

Methods

preventDefault()
preventDefault(): void;

Defined in: events/base.ts:127

Prevents the default action from executing. Only works if the event is cancellable.

Returns

void

Example
events.on("beforeLoadSchema", (event) => {
if (shouldUseCustomLoader) {
event.preventDefault(); // Stops default schema loading
// Custom logic here
}
});
Inherited from

CancellableEvent.preventDefault

runDefaultAction()
runDefaultAction(): Promise<void>;

Defined in: events/base.ts:160

Executes the default action for an event if it hasn't been prevented.

Returns

Promise<void>

A promise that resolves when the default action completes, or void if the action was prevented or no default action is defined

Remarks

This method will only execute the _defaultAction if:

  • The event's default has not been prevented (_defaultPrevented is false)
  • A default action function has been defined (_defaultAction is a function)
Inherited from

CancellableEvent.runDefaultAction

stopPropagation()
stopPropagation(): void;

Defined in: events/base.ts:146

Stops propagation to remaining event handlers. Handlers registered after the current one will not execute.

Returns

void

Example
events.on("beforeLoadSchema", (event) => {
if (criticalError) {
event.stopPropagation(); // No more handlers run
}
});
Inherited from

CancellableEvent.stopPropagation