Skip to content

Commit

Permalink
add type
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Dec 11, 2024
1 parent 7aa51fc commit c861442
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/transform.ts
Original file line number Diff line number Diff line change
@@ -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),
Expand Down

0 comments on commit c861442

Please sign in to comment.