UNPKG

@avolutions/canvas-painter

Version:

CanvasPainter.js is a simple yet powerful JavaScript library for drawing basic shapes (rectangles, circles, etc.) on HTML5 Canvas with ease. Perfect for creating 2D graphics in your web projects.

24 lines (23 loc) 960 B
import { ISerializable } from "./ISerializable.js"; /** * A base class that implements ISerializable, providing functionality to serialize * an object's properties to an array or a JSON string, including nested objects * that implement the ISerializable interface. */ export declare class Serializable implements ISerializable { /** * Converts the object's properties to an array. If any of the properties * are objects that implement ISerializable, their `toArray` method is called. * * @returns An array representation of the object's properties. */ toArray(): Array<any>; /** * Converts the object to a JSON string. If any of the properties * are objects that implement ISerializable, their `toJson` method is called. * Underscores e.g. of private members are trimmed when setting the serialized name. * * @returns A JSON string representation of the object. */ toJson(): string; }