For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/packages/rspeedy/interfaces/ExposedAPI.md.
Lynx
  • English
  • Interface: ExposedAPI

    The exposed API of Rspeedy. Can be used in Rsbuild plugin with api.useExposed.

    Example

    import type { ExposedAPI } from '@lynx-js/rspeedy'
    const RsbuildPlugin = {
      name: 'my-rsbuild-plugin',
      pre: ['lynx:rsbuild:plugin-api'],
      setup(api) {
        const rspeedyAPI = api.useExposed<ExposedAPI>(Symbol.for('rspeedy.api'))
      },
    }

    Properties

    config

    config: Config

    The user config.


    debug

    debug: (message: string | (() => string)) => void

    Print debug logs.

    Parameters

    ParameterTypeDescription
    messagestring | (() => string)The printed message.

    Returns

    void


    exit

    exit: (code?: number) => void | Promise<void>

    Exit the process.

    Parameters

    ParameterTypeDescription
    code?numberThe exit code.

    Returns

    void | Promise<void>


    logger

    logger: Logger

    Get the Rspeedy logger.


    version

    version: string

    The version of Rspeedy.

    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.