UNPKG

alinea

Version:
21 lines (20 loc) 1 kB
import type { ChangesBatch } from './Change.js'; import type { Source } from './Source.js'; import { ReadonlyTree, WriteableTree } from './Tree.js'; export declare class FSSource implements Source { #private; constructor(cwd: string); getTree(): Promise<ReadonlyTree>; getFile(current: ReadonlyTree, builder: WriteableTree, file: string): Promise<readonly [string, Buffer] | undefined>; getTreeIfDifferent(sha: string): Promise<ReadonlyTree | undefined>; getBlobs(shas: Array<string>): AsyncGenerator<[sha: string, blob: Uint8Array]>; applyChanges(batch: ChangesBatch): Promise<void>; } export declare class CachedFSSource extends FSSource { #private; constructor(cwd: string); refresh: () => Promise<ReadonlyTree>; getTree(): Promise<ReadonlyTree>; getFile(current: ReadonlyTree, builder: WriteableTree, file: string): Promise<readonly [string, Buffer] | undefined>; getBlobs(shas: Array<string>): AsyncGenerator<[sha: string, blob: Uint8Array]>; }