Skip to content

@advjs/monorepo / client / useAdvStore

Function: useAdvStore()

useAdvStore(pinia?, hot?): Store<"adv", Pick<{ ast: ShallowRef<Root, Root>; cur: Ref<{ background: string; dialog: { character: { name: string; status: string; type: "character"; }; children: ({ type: "text"; value: string; } | { type: "link"; value: string; })[]; type: "dialog"; }; order: number; tachies: Map<string, { status: string; }> & Omit<Map<string, { status: string; }>, keyof Map<any, any>>; }, CurStateType | { background: string; dialog: { character: { name: string; status: string; type: "character"; }; children: ({ type: "text"; value: string; } | { type: "link"; value: string; })[]; type: "dialog"; }; order: number; tachies: Map<string, { status: string; }> & Omit<Map<string, { status: string; }>, keyof Map<any, any>>; }>; curNode: ComputedRef<undefined | Item>; status: { isEnd: ComputedRef<boolean>; }; }, "status" | "ast" | "cur">, Pick<{ ast: ShallowRef<Root, Root>; cur: Ref<{ background: string; dialog: { character: { name: string; status: string; type: "character"; }; children: ({ type: "text"; value: string; } | { type: "link"; value: string; })[]; type: "dialog"; }; order: number; tachies: Map<string, { status: string; }> & Omit<Map<string, { status: string; }>, keyof Map<any, any>>; }, CurStateType | { background: string; dialog: { character: { name: string; status: string; type: "character"; }; children: ({ type: "text"; value: string; } | { type: "link"; value: string; })[]; type: "dialog"; }; order: number; tachies: Map<string, { status: string; }> & Omit<Map<string, { status: string; }>, keyof Map<any, any>>; }>; curNode: ComputedRef<undefined | Item>; status: { isEnd: ComputedRef<boolean>; }; }, "curNode">, Pick<{ ast: ShallowRef<Root, Root>; cur: Ref<{ background: string; dialog: { character: { name: string; status: string; type: "character"; }; children: ({ type: "text"; value: string; } | { type: "link"; value: string; })[]; type: "dialog"; }; order: number; tachies: Map<string, { status: string; }> & Omit<Map<string, { status: string; }>, keyof Map<any, any>>; }, CurStateType | { background: string; dialog: { character: { name: string; status: string; type: "character"; }; children: ({ type: "text"; value: string; } | { type: "link"; value: string; })[]; type: "dialog"; }; order: number; tachies: Map<string, { status: string; }> & Omit<Map<string, { status: string; }>, keyof Map<any, any>>; }>; curNode: ComputedRef<undefined | Item>; status: { isEnd: ComputedRef<boolean>; }; }, never>>

Defined in: packages/client/setup/adv/store.ts:38

Returns a store, creates it if necessary.

Parameters

pinia?

Pinia instance to retrieve the store

null | Pinia

hot?

StoreGeneric

dev only hot module replacement

Returns

Store<"adv", Pick<{ ast: ShallowRef<Root, Root>; cur: Ref<{ background: string; dialog: { character: { name: string; status: string; type: "character"; }; children: ({ type: "text"; value: string; } | { type: "link"; value: string; })[]; type: "dialog"; }; order: number; tachies: Map<string, { status: string; }> & Omit<Map<string, { status: string; }>, keyof Map<any, any>>; }, CurStateType | { background: string; dialog: { character: { name: string; status: string; type: "character"; }; children: ({ type: "text"; value: string; } | { type: "link"; value: string; })[]; type: "dialog"; }; order: number; tachies: Map<string, { status: string; }> & Omit<Map<string, { status: string; }>, keyof Map<any, any>>; }>; curNode: ComputedRef<undefined | Item>; status: { isEnd: ComputedRef<boolean>; }; }, "status" | "ast" | "cur">, Pick<{ ast: ShallowRef<Root, Root>; cur: Ref<{ background: string; dialog: { character: { name: string; status: string; type: "character"; }; children: ({ type: "text"; value: string; } | { type: "link"; value: string; })[]; type: "dialog"; }; order: number; tachies: Map<string, { status: string; }> & Omit<Map<string, { status: string; }>, keyof Map<any, any>>; }, CurStateType | { background: string; dialog: { character: { name: string; status: string; type: "character"; }; children: ({ type: "text"; value: string; } | { type: "link"; value: string; })[]; type: "dialog"; }; order: number; tachies: Map<string, { status: string; }> & Omit<Map<string, { status: string; }>, keyof Map<any, any>>; }>; curNode: ComputedRef<undefined | Item>; status: { isEnd: ComputedRef<boolean>; }; }, "curNode">, Pick<{ ast: ShallowRef<Root, Root>; cur: Ref<{ background: string; dialog: { character: { name: string; status: string; type: "character"; }; children: ({ type: "text"; value: string; } | { type: "link"; value: string; })[]; type: "dialog"; }; order: number; tachies: Map<string, { status: string; }> & Omit<Map<string, { status: string; }>, keyof Map<any, any>>; }, CurStateType | { background: string; dialog: { character: { name: string; status: string; type: "character"; }; children: ({ type: "text"; value: string; } | { type: "link"; value: string; })[]; type: "dialog"; }; order: number; tachies: Map<string, { status: string; }> & Omit<Map<string, { status: string; }>, keyof Map<any, any>>; }>; curNode: ComputedRef<undefined | Item>; status: { isEnd: ComputedRef<boolean>; }; }, never>>