From 7af51de7f7760e1b1211d42358760d1310a84591 Mon Sep 17 00:00:00 2001 From: Asko Nõmm Date: Mon, 14 Apr 2025 03:37:07 +0300 Subject: Rename ShapeX interface to ShapeXInstance --- src/shapex.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/shapex.ts') diff --git a/src/shapex.ts b/src/shapex.ts index 93f40e7..2a42c6b 100644 --- a/src/shapex.ts +++ b/src/shapex.ts @@ -24,7 +24,7 @@ export type Subscription = { export type StateChange = "deleted" | "changed-type" | "changed-value"; -export type ShapeX = { +export type ShapeXInstance = { subscribe: (listener: string, callback: EventCallback) => number; subscribeOnce: (listener: string, callback: EventCallback) => number; unsubscribe: (listener: string) => void; @@ -39,7 +39,7 @@ export type ShapeX = { * @param {T extends object} initialState The initial application state. * @returns {EventX} The EventX object. */ -const ShapeX = (initialState: T): ShapeX => { +const ShapeX = (initialState: T): ShapeXInstance => { let _state = initialState; const _subscriptions: Map[]> = new Map(); let subscriptionId = 0; -- cgit v1.2.3