From c861442fe77e4f2d026833677345718d12c11fb1 Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Wed, 11 Dec 2024 01:09:11 -0300 Subject: [PATCH] add type --- src/transform.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/transform.ts b/src/transform.ts index 5833d24..495d0ef 100644 --- a/src/transform.ts +++ b/src/transform.ts @@ -1,10 +1,11 @@ import { Transform } from 'stream'; import commitFileAsync from './actions/commit-file-async.js'; +import type { MemFsEditorFile } from './index.js'; export const createCommitTransform = () => new Transform({ objectMode: true, - transform(file, _encoding, callback) { + transform(file: MemFsEditorFile, _encoding, callback) { commitFileAsync(file).then( () => callback(null, file), (error) => callback(error),