Plugins

Covers Engine Plugin SDK 2.0.0 · Interface Plugin SDK 0.2.0

BundledAssetClient

Read-only bundled UTF-8/JSON files. Updates replace them. Missing files and invalid JSON reject; no caching or real-time bound.

Import

import type { BundledAssetClient } from "@dartwic/interface-sdk/assets";

Declaration

export interface BundledAssetClient {
    /** Read a validated path relative to the plugin assets folder. */
    readText(relative: string): Promise<string>;
    /** Read JSON without runtime schema validation. */
    readJson<T = unknown>(relative: string): Promise<T>;
}

Members

NameTypeRequirementDescription
readTextPromise<string>RequiredRead a validated path relative to the plugin assets folder.
readJsonPromise<T>RequiredRead JSON without runtime schema validation.