Skip to main content

@elizaos/core v1.0.6 / v2 / ServiceBuilder

Class: ServiceBuilder<TService>

Service builder class that provides type-safe service creation with automatic type inference

Extends​

Type Parameters​

• TService extends Service = Service

Methods​

withDescription()​

withDescription(description): this

Set the service description

Parameters​

• description: string

Returns​

this

Inherited from​

ServiceBuilder.withDescription

Defined in​

packages/core/src/services.ts:22


withStart()​

withStart(startFn): this

Set the start function for the service

Parameters​

• startFn

Returns​

this

Inherited from​

ServiceBuilder.withStart

Defined in​

packages/core/src/services.ts:30


withStop()​

withStop(stopFn): this

Set the stop function for the service

Parameters​

• stopFn

Returns​

this

Inherited from​

ServiceBuilder.withStop

Defined in​

packages/core/src/services.ts:38


build()​

build(): Object

Build the service class with all configured properties

Returns​

Object

Inherited from​

ServiceBuilder.build

Defined in​

packages/core/src/services.ts:46