Skip to main content

Class: Config

moralis-monorepo / @moralisweb3/common-core / Config

Class: Config

@moralisweb3/common-core.Config

Table of contents

Constructors

Methods

Constructors

constructor

new Config()

Methods

get

get<Value>(keyOrName): Value

Type parameters

Name
Value

Parameters

NameType
keyOrNamestring | ConfigKey<Value>

Returns

Value


getKeys

getKeys(): string[]

Returns

string[]


hasKey

hasKey<Value>(key): boolean

Type parameters

Name
Value

Parameters

NameType
keyConfigKey<Value>

Returns

boolean


merge

merge(values): void

Parameters

NameType
valuesConfigValues

Returns

void


registerKey

registerKey<Value>(key, validator?): void

Type parameters

Name
Value

Parameters

NameType
keyConfigKey<Value>
validator?ConfigKeyValidator<Value>

Returns

void


reset

reset(): void

Returns

void


set

set<Value>(keyOrName, value): void

Type parameters

Name
Value

Parameters

NameType
keyOrNamestring | ConfigKey<Value>
valueValue

Returns

void