Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/node/src/streams/fileChunkSink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface FileChunkSinkOptions {
/**
* File system implementation to use.
*/
readonly fs?: NodeFileSystem;
readonly fs: NodeFileSystem;
}

/**
Expand Down Expand Up @@ -70,7 +70,7 @@ export class FileChunkSink extends EventEmitter {
private emitDeleteOrDelete(file: fs.WriteStream) {
// If 'delete' event is not handled, delete the file
if (!this.emit('delete', file)) {
(this._options.fs ?? fs).unlink(file.path.toString('utf-8'), () => {
this._options.fs.unlink(file.path.toString('utf-8')).catch(() => {
// Do nothing on error
});
}
Expand Down
Loading