PokéRogue
GitHub
Switch to Main
Preparing search index...
src/@types/new-battle-props
SetArrayRequired
Type Alias SetArrayRequired<TArray, Keys, Counter, Accumulator>
SetArrayRequired
:
TArray
extends
unknown
?
(
keyof
TArray
&
`
${
number
}
`
)
extends
never
?
[
...
Accumulator
,
...
TArray
]
:
TArray
extends
readonly
[
(
infer
First
)
?
,
...
(
infer
Rest
)
]
?
"0"
extends
OptionalKeysOf
<
TArray
>
?
`
${
Counter
[
"length"
]
}
`
extends
`
${
Keys
&
(
string
|
number
)
}
`
?
SetArrayRequired
<
Rest
,
Keys
,
[
...
Counter
,
any
]
,
[
...
Accumulator
,
First
]
,
>
:
[
...
Accumulator
,
...
TArray
]
:
SetArrayRequired
<
Rest
,
Keys
,
[
...
Counter
,
any
]
,
[
...
Accumulator
,
TArray
[
0
]
]
,
>
:
never
:
never
Remove the optional modifier from the specified keys in an array.
Type Parameters
TArray
extends
UnknownArray
Keys
Counter
extends
any
[]
=
[
]
Accumulator
extends
UnknownArray
=
[
]
Settings
Member Visibility
Protected
Private
Inherited
External
Theme
OS
Light
Dark
GitHub
Switch to Main
PokéRogue
Loading...
Remove the optional modifier from the specified keys in an array.