Skip to content

Latest commit

 

History

History
42 lines (25 loc) · 1.56 KB

ConfigureExecutionPrologue.md

File metadata and controls

42 lines (25 loc) · 1.56 KB

@black-flag/coreDocs


@black-flag/core / index / ConfigureExecutionPrologue

Type Alias: ConfigureExecutionPrologue()<CustomContext>

ConfigureExecutionPrologue<CustomContext>: (rootPrograms, context) => Promisable<void>

This function is called once towards the end of the execution of configureProgram, after all commands have been discovered but before any have been executed, and should apply any final configurations to the programs that constitute the command line interface.

All commands and sub-commands known to Black Flag are available in the ExecutionContext.commands map, which can be accessed from the context parameter or from the Arguments object returned by Program::parseAsync et al.

This function is the complement of ConfigureExecutionEpilogue.

Note that any errors thrown this early in the initialization process will be thrown as-is and will NOT trigger ConfigureErrorHandlingEpilogue.

Type Parameters

CustomContext extends ExecutionContext = ExecutionContext

Parameters

rootPrograms: Programs

context: CustomContext

Returns

Promisable<void>

Defined in

types/configure.ts:37