Function consoleCommand

  • Registers the decorated static function as a ConsoleCommand with the ConsoleManager.

    The decorated function must have the following signature

      - (argument0?:string, argument1?:string... );
    

    Parameters

    • name: string

      Unique name used to access the console command.

    • description: string

      A short description of the console command.

    Returns AttributeDecorator<Attribute>

    All arguments are passed as optional strings. It's up to the implementation to convert the arguments to the desired type. The number of arguments passed to the function depends on the number of arguments passed to the console command during invocation.

    If the name already exists, the registration will be declined and an error is reported. Note that the name comparison is done case-insensitive.