Skip to main content

sdk

Interfaces

ConfigProps

Properties

PropertyType

initialConfig

LoadedBaetaConfig

watchConfig?

boolean


ErrorsProps

Properties

PropertyType

errors?

TextOutput[]

warnings?

TextOutput[]


LayoutProps

Properties

PropertyType

color?

LiteralUnion<keyof ForegroundColor, string>

loading?

boolean

time?

number

timePrefix?

string

title?

string


LoadedBaetaConfig

Properties

PropertyType

config

BaetaOptions

location

string

relativeLocation

string


TimeProps

Properties

PropertyType

prefix?

string

value?

number

Type Aliases

ConfigEventMap

ConfigEventMap: object

Type declaration

NameType

update

[LoadedBaetaConfig]


TextOutput

TextOutput: object

Type declaration

NameType

id

string

text

string

Variables

errorNamespace

const errorNamespace: string

Functions

ConfigProvider()

ConfigProvider(props): Element

Parameters

ParameterType

props

PropsWithChildren<ConfigProps>

Returns

Element


ConfigProviderBase()

ConfigProviderBase(props): Element

Parameters

ParameterType

props

PropsWithChildren<ConfigProps>

Returns

Element


ConfigStatus()

ConfigStatus(): null | Element

Returns

null | Element


createCommand()

createCommand<Args>(options): CommandModule<Args, Args>

Type Parameters

Type Parameter

Args

Parameters

ParameterType

options

CommandModule<Args, Args>

Returns

CommandModule<Args, Args>


Errors()

Errors(props): Element

Parameters

ParameterType

props

ErrorsProps

Returns

Element


Layout()

Layout(props): Element

Parameters

ParameterType

props

PropsWithChildren<LayoutProps>

Returns

Element


makeErrorMessage()

makeErrorMessage(message, bold): string

Parameters

ParameterTypeDefault value

message

string

undefined

bold

boolean

false

Returns

string


makeErrorOutput()

makeErrorOutput(id, message, bold): object

Parameters

ParameterTypeDefault value

id

string

undefined

message

string

undefined

bold

boolean

false

Returns

object

NameType
idstring
textstring

renderComponent()

renderComponent<P>(Component, props, configProps?): void

Type Parameters

Type Parameter

P extends object

Parameters

ParameterType

Component

FunctionComponent<P>

props

P

configProps?

ConfigProps

Returns

void


renderComponentWithoutConfig()

renderComponentWithoutConfig<P>(component, props?): void

Type Parameters

Type Parameter

P extends object

Parameters

ParameterType

component

FunctionComponent<P>

props?

null | P

Returns

void


Spinner()

Spinner(): Element

Returns

Element


Time()

Time(props): null | Element

Parameters

ParameterType

props

TimeProps

Returns

null | Element


useConfig()

useConfig(): object

Returns

object

NameType
configBaetaOptions
eventsEventEmitter<ConfigEventMap>
locationstring
relativeLocationstring

useConfigStore()

useConfigStore(props): object

Parameters

ParameterType

props

ConfigProps

Returns

object

NameType
configBaetaOptions
eventsEventEmitter<ConfigEventMap>
locationstring
relativeLocationstring