mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-15 01:59:57 +00:00
Remove obsolete @ts-ignore
This commit is contained in:
committed by
Ingvar Stepanyan
parent
a9d3bd71b5
commit
8c5c97e106
@@ -1,4 +1,3 @@
|
|||||||
// @ts-ignore
|
|
||||||
import optimiser from '../../../codecs/oxipng';
|
import optimiser from '../../../codecs/oxipng';
|
||||||
import { EncodeOptions } from './encoder-meta';
|
import { EncodeOptions } from './encoder-meta';
|
||||||
|
|
||||||
|
|||||||
@@ -62,12 +62,10 @@ export default class Processor {
|
|||||||
|
|
||||||
if (!this._worker && needsWorker) {
|
if (!this._worker && needsWorker) {
|
||||||
// worker-loader does magic here.
|
// worker-loader does magic here.
|
||||||
// @ts-ignore - Typescript doesn't know about the 2nd param to new Worker, and the
|
|
||||||
// definition can't be overwritten.
|
|
||||||
this._worker = new Worker(
|
this._worker = new Worker(
|
||||||
'./processor-worker',
|
'./processor-worker',
|
||||||
{ name: 'processor-worker', type: 'module' },
|
{ name: 'processor-worker', type: 'module' },
|
||||||
) as Worker;
|
);
|
||||||
// Need to do some TypeScript trickery to make the type match.
|
// Need to do some TypeScript trickery to make the type match.
|
||||||
this._workerApi = proxy(this._worker) as any as ProcessorWorkerApi;
|
this._workerApi = proxy(this._worker) as any as ProcessorWorkerApi;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user