@kaynooo/utils
Preparing search index...
builder/endpoint
declareGetEndpoint
Function declareGetEndpoint
declareGetEndpoint
<
EndpointsConst
extends
Record
<
Key
,
string
>
,
CustomTypes
extends
Partial
<
Record
<
keyof
EndpointsConst
,
Record
<
string
,
any
>
>
>
=
{}
,
>
(
ENDPOINTS
:
EndpointsConst
,
)
:
{
<
T
extends
string
|
number
|
symbol
>
(
args
:
EndpointArgs
<
EndpointsConst
,
T
,
CustomTypes
>
,
)
:
string
;
<
T
extends
string
|
number
|
symbol
>
(
endpoint
:
T
,
...
params
:
HasKeys
<
ResolveParams
<
EndpointsConst
[
T
]
,
CustomTypes
[
T
]
extends
Record
<
string
,
any
>
?
any
[
any
]
:
{}
,
>
,
>
extends
true
?
[
ResolveParams
<
EndpointsConst
[
T
]
,
CustomTypes
[
T
]
extends
Record
<
string
,
any
>
?
any
[
any
]
:
{}
,
>
,
]
:
[
]
|
[
undefined
]
,
)
:
string
;
}
Type Parameters
EndpointsConst
extends
Record
<
Key
,
string
>
CustomTypes
extends
Partial
<
Record
<
keyof
EndpointsConst
,
Record
<
string
,
any
>
>
>
=
{}
Parameters
ENDPOINTS
:
EndpointsConst
Returns
{
<
T
extends
string
|
number
|
symbol
>
(
args
:
EndpointArgs
<
EndpointsConst
,
T
,
CustomTypes
>
,
)
:
string
;
<
T
extends
string
|
number
|
symbol
>
(
endpoint
:
T
,
...
params
:
HasKeys
<
ResolveParams
<
EndpointsConst
[
T
]
,
CustomTypes
[
T
]
extends
Record
<
string
,
any
>
?
any
[
any
]
:
{}
,
>
,
>
extends
true
?
[
ResolveParams
<
EndpointsConst
[
T
]
,
CustomTypes
[
T
]
extends
Record
<
string
,
any
>
?
any
[
any
]
:
{}
,
>
,
]
:
[
]
|
[
undefined
]
,
)
:
string
;
}
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
@kaynooo/utils
Loading...