Skip to main content

Lyra

The main entry point and public facade for the Lyra library.

This module re-exports the primary functions and constructors needed to interact with Lyra, simplifying the public API and hiding internal module structure. Users of the library should typically only need to require this top-level module.

Types

MigrationStep

interface MigrationStep {
fieldaddFields(
namestring,
fields{[string]any}
) → MigrationStep--

Creates a step to add new fields with default values.

fieldtransform(
namestring,
transformFunc(currentValue{[string]any}) → {[string]any}
) → MigrationStep--

Creates a step with a custom data transformation function.

}

Provides helper functions for creating common migration steps.

Functions

createPlayerStore<T>

Lyra.createPlayerStore<T>(
contextPlayerStoreConfig<T>--

The configuration for the PlayerStore.

) → PlayerStore<T>--

A new PlayerStore instance.

Factory function to create a new PlayerStore instance.

setLogLevel

Lyra.setLogLevel(
levelLogLevel--

The minimum log level ("fatal", "error", "warn", "info", "debug", "trace").

) → ()

Sets the global minimum log level for all Lyra loggers.

Show raw api
{
    "functions": [
        {
            "name": "createPlayerStore<T>",
            "desc": "Factory function to create a new PlayerStore instance.",
            "params": [
                {
                    "name": "context",
                    "desc": "The configuration for the PlayerStore.",
                    "lua_type": "PlayerStoreConfig<T>"
                }
            ],
            "returns": [
                {
                    "desc": "A new PlayerStore instance.",
                    "lua_type": "PlayerStore<T>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 37,
                "path": "src/init.luau"
            }
        },
        {
            "name": "setLogLevel",
            "desc": "Sets the global minimum log level for all Lyra loggers.",
            "params": [
                {
                    "name": "level",
                    "desc": "The minimum log level (\"fatal\", \"error\", \"warn\", \"info\", \"debug\", \"trace\").",
                    "lua_type": "LogLevel"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 46,
                "path": "src/init.luau"
            }
        }
    ],
    "properties": [],
    "types": [
        {
            "name": "MigrationStep",
            "desc": "Provides helper functions for creating common migration steps.",
            "fields": [
                {
                    "name": "field",
                    "lua_type": "addFields (name: string, fields: { [string]: any }) -> MigrationStep",
                    "desc": "Creates a step to add new fields with default values."
                },
                {
                    "name": "field",
                    "lua_type": "transform (name: string, transformFunc: (currentValue: { [string]: any }) -> { [string]: any }) -> MigrationStep",
                    "desc": "Creates a step with a custom data transformation function."
                }
            ],
            "source": {
                "line": 24,
                "path": "src/init.luau"
            }
        }
    ],
    "name": "Lyra",
    "desc": "The main entry point and public facade for the Lyra library.\n\nThis module re-exports the primary functions and constructors needed to interact\nwith Lyra, simplifying the public API and hiding internal module structure.\nUsers of the library should typically only need to require this top-level module.",
    "source": {
        "line": 10,
        "path": "src/init.luau"
    }
}