MCPcopy Create free account
hub / github.com/MALSync/MALSync / setTypeContext

Function setTypeContext

src/_minimal/utils/state.ts:10–18  ·  view source on GitHub ↗
(value: 'anime' | 'manga')

Source from the content-addressed store, hash-verified

8const stateContext = ref(1);
9
10export function setTypeContext(value: 'anime' | 'manga') {
11 if (value === 'anime') {
12 typeContext.value = 'anime';
13 } else if (value === 'manga') {
14 typeContext.value = 'manga';
15 } else {
16 throw `${value} not a valid State Context`;
17 }
18}
19
20export function getTypeContext() {
21 return typeContext;

Callers 1

initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected