INNER CODE UNIT · TypeScript

iterInputFiles

x-cmd/x-cmd · mod/ajv/lib/ajv.ts:442

    for await (const f of iterInputFiles(2)) {
        seen++;
        let d: unknown;
        try {
            d = await readJson<unknown>(f);
        } catch (e) {
            const msg = e instanceof Error ? e.message : String(e);
            if (e instanceof IoError) {
                emitResult(f, R.IoError, msg, { code: e.code });
            } else if (e instanceof ParseError) {
                emitResult(f, R.SyntaxError, msg, {
                    format: e.format,
                    line: e.line,
                    column: e.column,
                });
            } else {
                emitResult(f, R.IoError, msg);
            }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…