ServerConfig interface

Represents the configuration produced by evaluating a server template.

Signature:

export interface ServerConfig 

Methods

Method Description
getBoolean(key) Gets the value for the given key as a boolean.Convenience method for calling serverConfig.getValue(key).asBoolean().
getNumber(key) Gets the value for the given key as a number.Convenience method for calling serverConfig.getValue(key).asNumber().
getString(key) Gets the value for the given key as a string. Convenience method for calling serverConfig.getValue(key).asString().
getValue(key) Gets the Value for the given key.Ensures application logic will always have a type-safe reference, even if the parameter is removed remotely.

ServerConfig.getBoolean()

Gets the value for the given key as a boolean.

Convenience method for calling serverConfig.getValue(key).asBoolean().

Signature:

getBoolean(key: string): boolean;

Parameters

Parameter Type Description
key string The name of the parameter.

Returns:

boolean

The value for the given key as a boolean.

ServerConfig.getNumber()

Gets the value for the given key as a number.

Convenience method for calling serverConfig.getValue(key).asNumber().

Signature:

getNumber(key: string): number;

Parameters

Parameter Type Description
key string The name of the parameter.

Returns:

number

The value for the given key as a number.

ServerConfig.getString()

Gets the value for the given key as a string. Convenience method for calling serverConfig.getValue(key).asString().

Signature:

getString(key: string): string;

Parameters

Parameter Type Description
key string The name of the parameter.

Returns:

string

The value for the given key as a string.

ServerConfig.getValue()

Gets the Value for the given key.

Ensures application logic will always have a type-safe reference, even if the parameter is removed remotely.

Signature:

getValue(key: string): Value;

Parameters

Parameter Type Description
key string The name of the parameter.

Returns:

Value

The value for the given key.