ic-reactor
Example
GitHub
Preparing search index...
react
types
ActorManager
Interface ActorManager<A>
interface
ActorManager
<
A
=
types
.
BaseActor
>
{
canisterId
:
string
;
actorStore
:
types
.
ActorStore
<
A
>
;
visitFunction
:
types
.
VisitService
<
A
>
;
methodAttributes
:
types
.
MethodAttributes
<
A
>
;
updateMethodState
:
(
method
:
Extract
<
keyof
A
>
,
hash
:
string
,
newState
:
Partial
<
types
.
ActorMethodState
<
A
,
typeof
method
>
[
string
]
>
,
)
=>
void
;
initialize
:
(
options
?:
types
.
UpdateAgentParameters
)
=>
Promise
<
void
>
;
extractInterface
:
()
=>
types
.
IDL
.
ServiceClass
;
extractMethodAttributes
:
()
=>
types
.
MethodAttributes
<
A
>
;
extractVisitor
:
()
=>
types
.
VisitService
<
A
>
;
callMethod
:
<
M
extends
string
>
(
functionName
:
M
,
...
args
:
types
.
ActorMethodParameters
<
A
[
M
]
>
,
)
=>
Promise
<
types
.
ActorMethodReturnType
<
A
[
M
]
>
>
;
callMethodWithOptions
:
(
options
:
utils
.
agent
.
CallConfig
,
)
=>
<
M
extends
string
>
(
functionName
:
M
,
...
args
:
types
.
ActorMethodParameters
<
A
[
M
]
>
,
)
=>
Promise
<
types
.
ActorMethodReturnType
<
A
[
M
]
>
>
;
call
:
<
M
extends
string
>
(
functionName
:
M
,
...
args
:
types
.
ActorMethodParameters
<
A
[
M
]
>
,
)
=>
Promise
<
types
.
ActorMethodReturnType
<
A
[
M
]
>
>
;
getActor
:
()
=>
null
|
A
;
getState
:
()
=>
types
.
ActorState
;
subscribeActorState
:
{
(
listener
:
(
selectedState
:
types
.
ActorState
,
previousSelectedState
:
types
.
ActorState
,
)
=>
void
,
)
:
()
=>
void
;
<
U
>
(
selector
:
(
state
:
types
.
ActorState
)
=>
U
,
listener
:
(
selectedState
:
U
,
previousSelectedState
:
U
)
=>
void
,
options
?:
{
equalityFn
?:
(
a
:
U
,
b
:
U
)
=>
boolean
;
fireImmediately
?:
boolean
;
}
,
)
:
()
=>
void
;
}
;
setState
:
{
(
...
args
:
[
partial
:
|
types
.
ActorState
<
A
>
|
Partial
<
types
.
ActorState
<
A
>
>
|
(
(
state
:
types
.
ActorState
,
)
=>
types
.
ActorState
<
A
>
|
Partial
<
types
.
ActorState
<
A
>
>
)
,
replace
?:
false
,
action
?:
Action
,
]
,
)
:
void
;
(
...
args
:
[
state
:
|
types
.
ActorState
<
A
>
|
(
(
state
:
types
.
ActorState
)
=>
types
.
ActorState
)
,
replace
:
true
,
action
?:
Action
,
]
,
)
:
void
;
}
;
cleanup
:
()
=>
void
;
get
agentManager
()
:
types
.
AgentManager
;
}
Type Parameters
A
=
types
.
BaseActor
Index
Properties
canister
Id
actor
Store
visit
Function
method
Attributes
update
Method
State
initialize
extract
Interface
extract
Method
Attributes
extract
Visitor
call
Method
call
Method
With
Options
call
get
Actor
get
State
subscribe
Actor
State
set
State
cleanup
Accessors
agent
Manager
Properties
canister
Id
canisterId
:
string
actor
Store
actorStore
:
types
.
ActorStore
<
A
>
visit
Function
visitFunction
:
types
.
VisitService
<
A
>
method
Attributes
methodAttributes
:
types
.
MethodAttributes
<
A
>
update
Method
State
updateMethodState
:
(
method
:
Extract
<
keyof
A
>
,
hash
:
string
,
newState
:
Partial
<
types
.
ActorMethodState
<
A
,
typeof
method
>
[
string
]
>
,
)
=>
void
initialize
initialize
:
(
options
?:
types
.
UpdateAgentParameters
)
=>
Promise
<
void
>
extract
Interface
extractInterface
:
()
=>
types
.
IDL
.
ServiceClass
extract
Method
Attributes
extractMethodAttributes
:
()
=>
types
.
MethodAttributes
<
A
>
extract
Visitor
extractVisitor
:
()
=>
types
.
VisitService
<
A
>
call
Method
callMethod
:
<
M
extends
string
>
(
functionName
:
M
,
...
args
:
types
.
ActorMethodParameters
<
A
[
M
]
>
,
)
=>
Promise
<
types
.
ActorMethodReturnType
<
A
[
M
]
>
>
call
Method
With
Options
callMethodWithOptions
:
(
options
:
utils
.
agent
.
CallConfig
,
)
=>
<
M
extends
string
>
(
functionName
:
M
,
...
args
:
types
.
ActorMethodParameters
<
A
[
M
]
>
,
)
=>
Promise
<
types
.
ActorMethodReturnType
<
A
[
M
]
>
>
call
call
:
<
M
extends
string
>
(
functionName
:
M
,
...
args
:
types
.
ActorMethodParameters
<
A
[
M
]
>
,
)
=>
Promise
<
types
.
ActorMethodReturnType
<
A
[
M
]
>
>
get
Actor
getActor
:
()
=>
null
|
A
get
State
getState
:
()
=>
types
.
ActorState
subscribe
Actor
State
subscribeActorState
:
{
(
listener
:
(
selectedState
:
types
.
ActorState
,
previousSelectedState
:
types
.
ActorState
,
)
=>
void
,
)
:
()
=>
void
;
<
U
>
(
selector
:
(
state
:
types
.
ActorState
)
=>
U
,
listener
:
(
selectedState
:
U
,
previousSelectedState
:
U
)
=>
void
,
options
?:
{
equalityFn
?:
(
a
:
U
,
b
:
U
)
=>
boolean
;
fireImmediately
?:
boolean
;
}
,
)
:
()
=>
void
;
}
set
State
setState
:
{
(
...
args
:
[
partial
:
|
types
.
ActorState
<
A
>
|
Partial
<
types
.
ActorState
<
A
>
>
|
(
(
state
:
types
.
ActorState
,
)
=>
types
.
ActorState
<
A
>
|
Partial
<
types
.
ActorState
<
A
>
>
)
,
replace
?:
false
,
action
?:
Action
,
]
,
)
:
void
;
(
...
args
:
[
state
:
|
types
.
ActorState
<
A
>
|
(
(
state
:
types
.
ActorState
)
=>
types
.
ActorState
)
,
replace
:
true
,
action
?:
Action
,
]
,
)
:
void
;
}
cleanup
cleanup
:
()
=>
void
Accessors
agent
Manager
get
agentManager
()
:
types
.
AgentManager
Returns
types
.
AgentManager
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Properties
canister
Id
actor
Store
visit
Function
method
Attributes
update
Method
State
initialize
extract
Interface
extract
Method
Attributes
extract
Visitor
call
Method
call
Method
With
Options
call
get
Actor
get
State
subscribe
Actor
State
set
State
cleanup
Accessors
agent
Manager
Example
GitHub
ic-reactor
Loading...