Documentation
Preparing search index...
@rivetkit/framework-base
createRivetKit
Function createRivetKit
createRivetKit
<
Registry
extends
AnyActorRegistry
,
Actors
extends
any
,
ActorNames
extends
string
|
number
|
symbol
,
>
(
client
:
Client
<
Registry
>
,
opts
?:
CreateRivetKitOptions
<
Registry
>
,
)
:
{
getOrCreateActor
:
<
ActorName
extends
string
|
number
|
symbol
>
(
opts
:
ActorOptions
<
Registry
,
ActorName
>
,
)
=>
{
create
:
()
=>
void
;
key
:
string
;
mount
:
()
=>
void
;
setState
:
(
set
:
Updater
<
ActorStateReference
<
Actors
>
>
)
=>
void
;
state
:
ActorsStateDerived
<
Registry
,
ActorName
>
;
}
;
store
:
Store
<
InternalRivetKitStore
<
Registry
,
Actors
>
,
(
cb
:
InternalRivetKitStore
<
Registry
,
Actors
>
,
)
=>
InternalRivetKitStore
<
Registry
,
Actors
>
,
>
;
}
Type Parameters
Registry
extends
AnyActorRegistry
Actors
extends
any
ActorNames
extends
string
|
number
|
symbol
Parameters
client
:
Client
<
Registry
>
Optional
opts
:
CreateRivetKitOptions
<
Registry
>
Returns
{
getOrCreateActor
:
<
ActorName
extends
string
|
number
|
symbol
>
(
opts
:
ActorOptions
<
Registry
,
ActorName
>
,
)
=>
{
create
:
()
=>
void
;
key
:
string
;
mount
:
()
=>
void
;
setState
:
(
set
:
Updater
<
ActorStateReference
<
Actors
>
>
)
=>
void
;
state
:
ActorsStateDerived
<
Registry
,
ActorName
>
;
}
;
store
:
Store
<
InternalRivetKitStore
<
Registry
,
Actors
>
,
(
cb
:
InternalRivetKitStore
<
Registry
,
Actors
>
,
)
=>
InternalRivetKitStore
<
Registry
,
Actors
>
,
>
;
}
Settings
Member Visibility
Protected
Inherited
Theme
OS
Light
Dark
Documentation
Loading...