STscript allow named arguments to be an array

- Use named args definition and "acceptsMultiple" to build arrays of values, if provided
- Add a debug warning if non-multiple named args are provided multiple times
This commit is contained in:
Wolfsblvt
2024-09-28 21:59:29 +02:00
parent c47e198664
commit 2444e9be43
2 changed files with 54 additions and 13 deletions

View File

@ -15,13 +15,13 @@ import { SlashCommandScope } from './SlashCommandScope.js';
* _abortController:SlashCommandAbortController,
* _debugController:SlashCommandDebugController,
* _hasUnnamedArgument:boolean,
* [id:string]:string|SlashCommandClosure,
* [id:string]:string|SlashCommandClosure|(string|SlashCommandClosure)[],
* }} NamedArguments
*/
/**
* Alternative object for local JSDocs, where you don't need existing pipe, scope, etc. arguments
* @typedef {{[id:string]:string|SlashCommandClosure}} NamedArgumentsCapture
* @typedef {{[id:string]:string|SlashCommandClosure|(string|SlashCommandClosure)[]}} NamedArgumentsCapture
*/
/**