feat: handle errors (#47)

This commit is contained in:
Jonathan Jogenfors
2026-02-20 10:32:05 +01:00
committed by GitHub
parent 1467871e66
commit 495333ed4a
4 changed files with 145 additions and 8 deletions
+14 -1
View File
@@ -1,3 +1,16 @@
export { WalkOptions } from '../dist/index.js';
export function walk(options: WalkOptions): AsyncGenerator<string[], void, unknown>;
export type WalkEntry = {
type: 'entry';
path: string;
};
export type WalkError = {
type: 'error';
path?: string;
message: string;
};
export type WalkItem = WalkEntry | WalkError;
export function walk(options: WalkOptions): AsyncGenerator<WalkItem[], void, unknown>;