@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.
20 lines (19 loc) • 589 B
TypeScript
/**
* Interface that defines the structure for serializable objects.
* Classes implementing this interface should provide functionality
* to serialize their properties into an array and a JSON string.
*/
export interface ISerializable {
/**
* Serializes the object’s properties into an array.
*
* @returns An array representation of the object's properties.
*/
toArray(): Array<any>;
/**
* Serializes the object’s properties into a JSON string.
*
* @returns A JSON string representation of the object.
*/
toJson(): string;
}