@witchcraft/spellcraft
Github
Issues
npm
Preparing search index...
core/createCommands
createCommands
Function createCommands
createCommands
<
THooks
extends
Partial
<
Hooks
>
,
TEntries
extends
Record
<
string
,
Command
<
string
,
CommandExecute
<
string
>
,
Condition
>
>
,
TCheck
extends
boolean
|
"only"
=
true
,
>
(
commandsList
:
Command
<
string
,
CommandExecute
<
string
>
,
Condition
>
[]
,
manager
?:
PickManager
<
"options"
,
"stringifier"
>
&
{
hooks
?:
THooks
}
,
__namedParameters
?:
{
check
?:
TCheck
}
,
)
:
Result
<
TCheck
extends
"only"
?
true
:
Commands
<
TEntries
>
,
|
KnownError
<
"DUPLICATE_COMMAND"
>
|
CanHookErrors
<
THooks
extends
never
?
never
:
THooks
,
"canSetCommandsProp"
,
>
,
>
Commands
Creates a set of commands.
Type Parameters
THooks
extends
Partial
<
Hooks
>
TEntries
extends
Record
<
string
,
Command
<
string
,
CommandExecute
<
string
>
,
Condition
>
>
TCheck
extends
boolean
|
"only"
=
true
Parameters
commandsList
:
Command
<
string
,
CommandExecute
<
string
>
,
Condition
>
[]
manager
:
PickManager
<
"options"
,
"stringifier"
>
&
{
hooks
?:
THooks
}
= ...
__namedParameters
:
{
check
?:
TCheck
}
= {}
Returns
Result
<
TCheck
extends
"only"
?
true
:
Commands
<
TEntries
>
,
|
KnownError
<
"DUPLICATE_COMMAND"
>
|
CanHookErrors
<
THooks
extends
never
?
never
:
THooks
,
"canSetCommandsProp"
,
>
,
>
Settings
Member Visibility
Protected
Inherited
Theme
OS
Light
Dark
On This Page
Commands
Github
Issues
npm
@witchcraft/spellcraft
Loading...
Commands
Creates a set of commands.