@nmmty/lazycanvas
Version:
A simple way to interact with @napi-rs/canvas in an advanced way!
23 lines (22 loc) • 886 B
TypeScript
import { LazyCanvas } from "../../LazyCanvas";
export declare class YAMLReader {
/**
* Reads a YAML string and converts it to a LazyCanvas object.
* @param {string} [data] - The YAML string to read.
* @param {Object} [opts] - Optional parameters for debugging.
* @returns A Promise that resolves to a LazyCanvas object.
*/
static read(data: string, opts?: {
debug?: boolean;
}): LazyCanvas;
/**
* Reads a YAML file and converts it to a LazyCanvas object.
* @param {string} [filePath] - The path to the YAML file.
* @param {Object} [opts] - Optional parameters for debugging.
* @returns A Promise that resolves to a LazyCanvas object.
* @throws LazyError if the file does not exist or has an invalid extension.
*/
static readFile(filePath: string, opts?: {
debug?: boolean;
}): LazyCanvas;
}