jshiki
    Preparing search index...

    Type Alias BinaryOperatorOptions

    BinaryOperatorOptions:
        | { allow: (keyof typeof operators.binary)[] }
        | { block: (keyof typeof operators.binary)[] }

    Defines which binary operators are allowed. Must provide an allow list or a block list, but not both. Valid options are +, -, *, **, /, %, <, >, <=, >=, ==, !=, ===, !==, |, &, <<, >>, >>>, in, instanceof.

    Type Declaration

    • { allow: (keyof typeof operators.binary)[] }
      • allow: (keyof typeof operators.binary)[]

        Which binary operators to allow. Valid options are +, -, *, **, /, %, <, >, <=, >=, ==, !=, ===, !==, |, &, <<, >>, >>>, in, instanceof.

    • { block: (keyof typeof operators.binary)[] }
      • block: (keyof typeof operators.binary)[]

        Which binary operators to block. Valid options are +, -, *, **, /, %, <, >, <=, >=, ==, !=, ===, !==, |, &, <<, >>, >>>, in, instanceof.

    // allows only binary operators '/', '%', '+', and '-'
    { allow: ['/', '%', '+', '-'] }
    // allows any binary operator except '*', '**', and '&'
    { block: ['*', '**', '&'] }