Refactor /if to fromProps

a1af768b02e467403432bb69da86470071515a5a

Wolfsblvt <wolfsblvt@gmail.com>

1 files changed, +13 -6Showing whitespace changes
public/scripts/variables.js+13 -6
@@ -1274,8 +1274,12 @@ export function registerVariableCommands() {
1274 enumProvider: commonEnumProviders.variables('all'),1274 enumProvider: commonEnumProviders.variables('all'),
1275 forceEnum: false,1275 forceEnum: false,
1276 }),1276 }),
1277 new SlashCommandNamedArgument(1277 SlashCommandNamedArgument.fromProps({
1278 'rule', 'comparison rule', [ARGUMENT_TYPE.STRING], true, false, null, [1278 name: 'rule',
1279 description: 'comparison rule',
1280 typeList: [ARGUMENT_TYPE.STRING],
1281 isRequired: true,
1282 enumList: [
1279 new SlashCommandEnumValue('gt', 'a > b'),1283 new SlashCommandEnumValue('gt', 'a > b'),
1280 new SlashCommandEnumValue('gte', 'a >= b'),1284 new SlashCommandEnumValue('gte', 'a >= b'),
1281 new SlashCommandEnumValue('lt', 'a < b'),1285 new SlashCommandEnumValue('lt', 'a < b'),
@@ -1286,10 +1290,13 @@ export function registerVariableCommands() {
1286 new SlashCommandEnumValue('in', 'a includes b'),1290 new SlashCommandEnumValue('in', 'a includes b'),
1287 new SlashCommandEnumValue('nin', 'a not includes b'),1291 new SlashCommandEnumValue('nin', 'a not includes b'),
1288 ],1292 ],
1289 ),1293 }),
1290 new SlashCommandNamedArgument(1294 SlashCommandNamedArgument.fromProps({
1291 'else', 'command to execute if not true', [ARGUMENT_TYPE.CLOSURE, ARGUMENT_TYPE.SUBCOMMAND], false,1295 name: 'else',
1292 ),1296 description: 'command to execute if not true',
1297 typeList: [ARGUMENT_TYPE.CLOSURE, ARGUMENT_TYPE.SUBCOMMAND],
1298 isRequired: false,
1299 }),
1293 ],1300 ],
1294 unnamedArgumentList: [1301 unnamedArgumentList: [
1295 new SlashCommandArgument(1302 new SlashCommandArgument(