MCPcopy Create free account
hub / github.com/arethetypeswrong/arethetypeswrong.github.io / updateState

Function updateState

packages/web/src/state.ts:48–52  ·  view source on GitHub ↗
(updater: (draftState: State) => void)

Source from the content-addressed store, hash-verified

46}
47
48export function updateState(updater: (draftState: State) => void): void {
49 const prevState = state;
50 state = produce(state, updater);
51 subscribers.forEach((callback) => callback(prevState));
52}
53
54export function getState(): DeepReadonly<State> {
55 return state;

Callers 4

main.tsFile · 0.90
onPackageNameInputFunction · 0.90
getPackageInfoFunction · 0.90
onCheckFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected