refactor: standardize InstanceState variable name to state (#20267)

This commit is contained in:
Kit Langton
2026-04-01 10:39:43 -04:00
committed by GitHub
parent 44f83015cd
commit 5fd833aa18
8 changed files with 74 additions and 74 deletions
+5 -5
View File
@@ -161,16 +161,16 @@ export namespace Command {
}
})
const cache = yield* InstanceState.make<State>((ctx) => init(ctx))
const state = yield* InstanceState.make<State>((ctx) => init(ctx))
const get = Effect.fn("Command.get")(function* (name: string) {
const state = yield* InstanceState.get(cache)
return state.commands[name]
const s = yield* InstanceState.get(state)
return s.commands[name]
})
const list = Effect.fn("Command.list")(function* () {
const state = yield* InstanceState.get(cache)
return Object.values(state.commands)
const s = yield* InstanceState.get(state)
return Object.values(s.commands)
})
return Service.of({ get, list })