Endo
Preparing search index...
@endo/exo
defineExoClass
Function defineExoClass
defineExoClass
<
G
extends
InterfaceGuard
,
I
extends
(
...
args
:
readonly
any
[]
)
=>
any
,
M
extends
{
[
key
:
string
]:
|
(
(
...
args
:
[
]
)
=>
Promise
<
any
>
)
|
(
(
...
args
:
[
]
)
=>
any
)
;
[
key
:
number
]:
(
(
...
args
:
[
]
)
=>
Promise
<
any
>
)
|
(
(
...
args
:
[
]
)
=>
any
)
;
[
key
:
symbol
]:
(
(
...
args
:
[
]
)
=>
Promise
<
any
>
)
|
(
(
...
args
:
[
]
)
=>
any
)
;
}
&
Methods
,
>
(
tag
:
string
,
interfaceGuard
:
G
,
init
:
I
,
methods
:
M
&
ThisType
<
{
self
:
Guarded
<
M
,
G
>
;
state
:
ReturnType
<
I
>
}
>
,
options
?:
FarClassOptions
<
ClassContext
<
ReturnType
<
I
>
,
M
>
>
,
)
:
(
...
args
:
Parameters
<
I
>
)
=>
Guarded
<
M
,
G
>
Define an exo class whose methods are type-checked against the InterfaceGuard.
Type Parameters
G
extends
InterfaceGuard
I
extends
(
...
args
:
readonly
any
[]
)
=>
any
M
extends
{
[
key
:
string
]:
(
(
...
args
:
[
]
)
=>
Promise
<
any
>
)
|
(
(
...
args
:
[
]
)
=>
any
)
;
[
key
:
number
]:
(
(
...
args
:
[
]
)
=>
Promise
<
any
>
)
|
(
(
...
args
:
[
]
)
=>
any
)
;
[
key
:
symbol
]:
(
(
...
args
:
[
]
)
=>
Promise
<
any
>
)
|
(
(
...
args
:
[
]
)
=>
any
)
;
}
&
Methods
Parameters
tag
:
string
interfaceGuard
:
G
init
:
I
methods
:
M
&
ThisType
<
{
self
:
Guarded
<
M
,
G
>
;
state
:
ReturnType
<
I
>
}
>
Optional
options
:
FarClassOptions
<
ClassContext
<
ReturnType
<
I
>
,
M
>
>
Returns
(
...
args
:
Parameters
<
I
>
)
=>
Guarded
<
M
,
G
>
defineExoClass
<
I
extends
(
...
args
:
readonly
any
[]
)
=>
any
,
M
extends
Methods
>
(
tag
:
string
,
interfaceGuard
:
undefined
,
init
:
I
,
methods
:
M
&
ThisType
<
{
self
:
Guarded
<
M
>
;
state
:
ReturnType
<
I
>
}
>
,
options
?:
FarClassOptions
<
ClassContext
<
ReturnType
<
I
>
,
M
>
>
,
)
:
(
...
args
:
Parameters
<
I
>
)
=>
Guarded
<
M
>
Define an exo class whose methods are type-checked against the InterfaceGuard.
Type Parameters
I
extends
(
...
args
:
readonly
any
[]
)
=>
any
M
extends
Methods
Parameters
tag
:
string
interfaceGuard
:
undefined
init
:
I
methods
:
M
&
ThisType
<
{
self
:
Guarded
<
M
>
;
state
:
ReturnType
<
I
>
}
>
Optional
options
:
FarClassOptions
<
ClassContext
<
ReturnType
<
I
>
,
M
>
>
Returns
(
...
args
:
Parameters
<
I
>
)
=>
Guarded
<
M
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
Endo
Loading...
Define an exo class whose methods are type-checked against the InterfaceGuard.