ic-reactor
Example
GitHub
Preparing search index...
core
classes
ActorManager
Class ActorManager<A>
Type Parameters
A
=
types
.
BaseActor
Index
Constructors
constructor
Properties
canister
Id
actor
Store
visit
Function
method
Attributes
get
State
subscribe
Actor
State
set
State
Accessors
agent
Manager
Methods
update
Method
State
initialize
extract
Interface
extract
Method
Attributes
extract
Visitor
call
Method
call
Method
With
Options
call
get
Actor
cleanup
Constructors
constructor
new
ActorManager
<
A
=
types
.
BaseActor
>
(
actorConfig
:
types
.
ActorManagerParameters
,
)
:
classes
.
ActorManager
<
A
>
Type Parameters
A
=
types
.
BaseActor
Parameters
actorConfig
:
types
.
ActorManagerParameters
Returns
classes
.
ActorManager
<
A
>
Properties
canister
Id
canisterId
:
string
actor
Store
actorStore
:
types
.
ActorStore
<
A
>
visit
Function
visitFunction
:
types
.
VisitService
<
A
>
method
Attributes
methodAttributes
:
types
.
MethodAttributes
<
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
;
}
= ...
Accessors
agent
Manager
get
agentManager
()
:
classes
.
AgentManager
Returns
classes
.
AgentManager
Methods
update
Method
State
updateMethodState
(
method
:
Extract
<
keyof
A
>
,
hash
:
string
,
newState
:
Partial
<
types
.
ActorMethodState
<
A
,
typeof
method
>
[
string
]
>
,
)
:
void
Parameters
method
:
Extract
<
keyof
A
>
hash
:
string
newState
:
Partial
<
types
.
ActorMethodState
<
A
,
typeof
method
>
[
string
]
>
Returns
void
initialize
initialize
(
options
?:
types
.
UpdateAgentParameters
)
:
Promise
<
void
>
Parameters
Optional
options
:
types
.
UpdateAgentParameters
Returns
Promise
<
void
>
extract
Interface
extractInterface
()
:
types
.
IDL
.
ServiceClass
Returns
types
.
IDL
.
ServiceClass
extract
Method
Attributes
extractMethodAttributes
()
:
types
.
MethodAttributes
<
A
>
Returns
types
.
MethodAttributes
<
A
>
extract
Visitor
extractVisitor
()
:
types
.
VisitService
<
A
>
Returns
types
.
VisitService
<
A
>
call
Method
callMethod
<
M
extends
string
>
(
functionName
:
M
,
...
args
:
types
.
ActorMethodParameters
<
A
[
M
]
>
,
)
:
Promise
<
types
.
ActorMethodReturnType
<
A
[
M
]
>
>
Type Parameters
M
extends
string
Parameters
functionName
:
M
...
args
:
types
.
ActorMethodParameters
<
A
[
M
]
>
Returns
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
]
>
>
Parameters
options
:
utils
.
agent
.
CallConfig
Returns
<
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
]
>
>
Type Parameters
M
extends
string
Parameters
functionName
:
M
...
args
:
types
.
ActorMethodParameters
<
A
[
M
]
>
Returns
Promise
<
types
.
ActorMethodReturnType
<
A
[
M
]
>
>
get
Actor
getActor
()
:
null
|
A
Returns
null
|
A
cleanup
cleanup
()
:
void
Returns
void
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
canister
Id
actor
Store
visit
Function
method
Attributes
get
State
subscribe
Actor
State
set
State
Accessors
agent
Manager
Methods
update
Method
State
initialize
extract
Interface
extract
Method
Attributes
extract
Visitor
call
Method
call
Method
With
Options
call
get
Actor
cleanup
Example
GitHub
ic-reactor
Loading...