Fix lint errors

This commit is contained in:
jeromewu 2023-10-11 22:04:25 +08:00
parent 70661340b4
commit 147596bdb0
3 changed files with 5 additions and 6 deletions

View File

@ -13,7 +13,6 @@ import {
LogEventCallback,
ProgressEventCallback,
FileData,
WorkerFSMountData,
FFFSType,
FFFSMountOptions,
FFFSPath,

View File

@ -153,7 +153,7 @@ export type CallbackData =
| LogEvent
| ProgressEvent
| IsFirst
| OK
| OK // eslint-disable-line
| Error
| FSNode[]
| undefined;

View File

@ -140,8 +140,8 @@ const deleteDir = ({ path }: FFMessageDeleteDirData): OK => {
};
const mount = ({ fsType, options, mountPoint }: FFMessageMountData): OK => {
let str = fsType as keyof typeof ffmpeg.FS.filesystems;
let fs = ffmpeg.FS.filesystems[str];
const str = fsType as keyof typeof ffmpeg.FS.filesystems;
const fs = ffmpeg.FS.filesystems[str];
if (!fs) return false;
ffmpeg.FS.mount(fs, options, mountPoint);
return true;
@ -158,7 +158,7 @@ self.onmessage = async ({
const trans = [];
let data: CallbackData;
try {
if (type !== FFMessageType.LOAD && !ffmpeg) throw ERROR_NOT_LOADED;
if (type !== FFMessageType.LOAD && !ffmpeg) throw ERROR_NOT_LOADED; // eslint-disable-line
switch (type) {
case FFMessageType.LOAD: