An ignorable named parameter.

This is used for the evaluateParameters function to allow changing the order of named ignorable parameters that are defined next to each other.

Implements

Constructors

  • Creates a new instance of the EvaluateParameters_NamedIgnorableParamater class.

    Parameters

    • parameter: {
          delimeter?: LooseAutocomplete<"">;
          key?: LooseAutocomplete<"">;
          maxLength?: number;
          name: LooseAutocomplete<"">;
          nameIsCaseSensitive?: boolean;
          type: "ignorableNamedParameter";
          valueType?:
              | {
                  key?: LooseAutocomplete<"">;
                  maxLength?: number;
                  type:
                      | "string"
                      | "number"
                      | "boolean"
                      | "targetSelector"
                      | "dimension"
                      | "presetText"
                      | "json"
                      | "neboolean"
                      | "non-booleanString"
                      | "Vector"
                      | "Vector1"
                      | "Vector2"
                      | "Vector3"
                      | "Vector4"
                      | "Vector5"
                      | "Vector6"
                      | "Vector7"
                      | "Vector8"
                      | "blockStates"
                      | "blockPattern"
                      | "block"
                      | "blockMask"
                      | `-${string}`
                      | `f-${string}`;
              }
              | {
                  key?: LooseAutocomplete<"">;
                  maxLength?: number;
                  type: "Vectors";
                  vectorCount?: number;
              }
              | stringEvaluateParametersParameter;
      }

      The named ignorable parameter.

      • Optionaldelimeter?: LooseAutocomplete<"">

        The delimeter to use between the name and the value.

        This uses the LooseAutocomplete type to make sure that the type is inferred as a string literal rather than the generic string type.

        "="
        
      • Optionalkey?: LooseAutocomplete<"">

        The key to use for this parameter.

        If specified, it will be used as the property name used in the returned args object.

        This uses the LooseAutocomplete type to make sure that the type is inferred as a string literal rather than the generic string type.

        Index
        
      • OptionalmaxLength?: number

        The maximum length of the parameter.

        This property is unused.

        Infinity
        
      • name: LooseAutocomplete<"">

        The name of the parameter.

        This will be used for users to provide the parameter.

        The value users will enter will be formatted as: ${name}${delimeter ?? "="}value or ${name}${delimeter ?? "="}"value with spaces and escape codes"

        This uses the LooseAutocomplete type to make sure that the type is inferred as a string literal rather than the generic string type.

      • OptionalnameIsCaseSensitive?: boolean

        Whether the name is case sensitive.

        false
        
      • type: "ignorableNamedParameter"

        The type of the parameter.

      • OptionalvalueType?:
            | {
                key?: LooseAutocomplete<"">;
                maxLength?: number;
                type:
                    | "string"
                    | "number"
                    | "boolean"
                    | "targetSelector"
                    | "dimension"
                    | "presetText"
                    | "json"
                    | "neboolean"
                    | "non-booleanString"
                    | "Vector"
                    | "Vector1"
                    | "Vector2"
                    | "Vector3"
                    | "Vector4"
                    | "Vector5"
                    | "Vector6"
                    | "Vector7"
                    | "Vector8"
                    | "blockStates"
                    | "blockPattern"
                    | "block"
                    | "blockMask"
                    | `-${string}`
                    | `f-${string}`;
            }
            | {
                key?: LooseAutocomplete<"">;
                maxLength?: number;
                type: "Vectors";
                vectorCount?: number;
            }
            | stringEvaluateParametersParameter

        The value type of the parameter.

        This currently only supports the following types:

        • string
        • number
        • boolean
        "string"
        

    Returns Globals.modules.cmds.EvaluateParameters_NamedIgnorableParamater

Properties

delimeter: LooseAutocomplete<"">

The delimeter to use between the name and the value.

This uses the LooseAutocomplete type to make sure that the type is inferred as a string literal rather than the generic string type.

"="
key?: string

The key to use for this parameter.

If specified, it will be used as the property name used in the returned args object.

This uses the LooseAutocomplete type to make sure that the type is inferred as a string literal rather than the generic string type.

Index

The name of the parameter.

This will be used for users to provide the parameter.

The value users will enter will be formatted as: ${name}${delimeter ?? "="}value or ${name}${delimeter ?? "="}"value with spaces and escape codes"

This uses the LooseAutocomplete type to make sure that the type is inferred as a string literal rather than the generic string type.

nameIsCaseSensitive: boolean

Whether the name is case sensitive.

false
type: "ignorableNamedParameter"

The type of the parameter.

value: string | number | boolean = null

The detected value of the parameter fron the command string.

null
valueType:
    | {
        key?: LooseAutocomplete<"">;
        maxLength?: number;
        type:
            | "string"
            | "number"
            | "boolean"
            | "targetSelector"
            | "dimension"
            | "presetText"
            | "json"
            | "neboolean"
            | "non-booleanString"
            | "Vector"
            | "Vector1"
            | "Vector2"
            | "Vector3"
            | "Vector4"
            | "Vector5"
            | "Vector6"
            | "Vector7"
            | "Vector8"
            | "blockStates"
            | "blockPattern"
            | "block"
            | "blockMask"
            | `-${string}`
            | `f-${string}`;
    }
    | {
        key?: LooseAutocomplete<"">;
        maxLength?: number;
        type: "Vectors";
        vectorCount?: number;
    }
    | stringEvaluateParametersParameter

The value type of the parameter.

This currently only supports the following types:

  • string
  • number
  • boolean

Type declaration

  • {
        key?: LooseAutocomplete<"">;
        maxLength?: number;
        type:
            | "string"
            | "number"
            | "boolean"
            | "targetSelector"
            | "dimension"
            | "presetText"
            | "json"
            | "neboolean"
            | "non-booleanString"
            | "Vector"
            | "Vector1"
            | "Vector2"
            | "Vector3"
            | "Vector4"
            | "Vector5"
            | "Vector6"
            | "Vector7"
            | "Vector8"
            | "blockStates"
            | "blockPattern"
            | "block"
            | "blockMask"
            | `-${string}`
            | `f-${string}`;
    }
    • Optionalkey?: LooseAutocomplete<"">

      The key to use for this parameter.

      If specified, it will be used as the property name used in the returned args object.

      This uses the LooseAutocomplete type to make sure that the type is inferred as a string literal rather than the generic string type.

      Index
      
    • OptionalmaxLength?: number

      The maximum length of the parameter.

      This property is unused.

      Infinity
      
    • type:
          | "string"
          | "number"
          | "boolean"
          | "targetSelector"
          | "dimension"
          | "presetText"
          | "json"
          | "neboolean"
          | "non-booleanString"
          | "Vector"
          | "Vector1"
          | "Vector2"
          | "Vector3"
          | "Vector4"
          | "Vector5"
          | "Vector6"
          | "Vector7"
          | "Vector8"
          | "blockStates"
          | "blockPattern"
          | "block"
          | "blockMask"
          | `-${string}`
          | `f-${string}`

      The type of the parameter.

  • {
        key?: LooseAutocomplete<"">;
        maxLength?: number;
        type: "Vectors";
        vectorCount?: number;
    }
    • Optionalkey?: LooseAutocomplete<"">

      The key to use for this parameter.

      If specified, it will be used as the property name used in the returned args object.

      This uses the LooseAutocomplete type to make sure that the type is inferred as a string literal rather than the generic string type.

      Index
      
    • OptionalmaxLength?: number

      The maximum length of the parameter.

      This property is unused.

      Infinity
      
    • type: "Vectors"

      The type of the parameter.

    • OptionalvectorCount?: number

      The number of vectors to expect.

      3
      
  • stringEvaluateParametersParameter
"string"