Skip to content

@statesync/pinia


@statesync/pinia / PiniaStoreLike

Interface: PiniaStoreLike<State>

Defined in: pinia.ts:14

Minimal structural interface a Pinia store satisfies.

We intentionally avoid importing pinia types here so this adapter stays dependency-free (from Pinia) and can be used in environments where the adapter code is not imported.

The real Pinia store implements:

  • $state
  • $patch(partial | mutator)

Type Parameters

Type Parameter
State extends Record<string, unknown>

Properties

$id?

ts
optional $id: string;

Defined in: pinia.ts:18

Optional store id (Pinia exposes $id). Useful only for debugging.


$state

ts
$state: State;

Defined in: pinia.ts:19

Methods

$patch()

ts
$patch(patch): void;

Defined in: pinia.ts:20

Parameters

ParameterType
patchPartial<State> | (state) => void

Returns

void

Released under the MIT License.