Skip to content
ClassDebugger & Diagnostics@public

FlxConsole

Headless, allow-listed debugger command registry with bounded history. It never evaluates arbitrary JavaScript; consumers decide which operations are safe by explicitly registering commands.

ts
export declare class FlxConsole

Constructors

ts
constructor(options?: FlxConsoleOptions)

Constructs a new instance of the FlxConsole class

ParameterTypeDescription
optionsFlxConsoleOptions-

Properties

PropertyModifiersTypeDescription
commandsreadonlyreadonly FlxConsoleCommand[]-
historyreadonlyreadonly string[]-

Methods

clearHistory()

ts
clearHistory(): void

Returns: void

complete()

ts
complete(input: string): readonly string[]

Parameters:

ParameterTypeDescription
inputstring-

Returns: readonly string[]

execute()

ts
execute(input: string): Promise<FlxConsoleResult>

Parameters:

ParameterTypeDescription
inputstring-

Returns: Promise<FlxConsoleResult>

register()

ts
register(command: FlxConsoleCommand): () => void

Parameters:

ParameterTypeDescription
commandFlxConsoleCommand-

Returns: () => void

unregister()

ts
unregister(nameOrAlias: string): boolean

Parameters:

ParameterTypeDescription
nameOrAliasstring-

Returns: boolean

Released under the MIT License.