sync
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { Context } from "../util/context"
|
||||
|
||||
const context = Context.create<{ directory: string; worktree: string }>("path")
|
||||
|
||||
export const Paths = {
|
||||
provider: context.provide,
|
||||
get directory() {
|
||||
return context.use().directory
|
||||
},
|
||||
get worktree() {
|
||||
return context.use().worktree
|
||||
},
|
||||
}
|
||||
@@ -21,7 +21,7 @@ export namespace State {
|
||||
}
|
||||
|
||||
export async function dispose() {
|
||||
for (const [key, entry] of entries.entries()) {
|
||||
for (const [_, entry] of entries.entries()) {
|
||||
if (!entry.dispose) continue
|
||||
await entry.dispose(await entry.state)
|
||||
}
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
import { Context } from "../util/context"
|
||||
|
||||
export namespace Worktree {
|
||||
const context = Context.create<string>("worktree")
|
||||
export const use = context.use
|
||||
export const provide = context.provide
|
||||
}
|
||||
Reference in New Issue
Block a user