webpack-contrib / worker-loader

A webpack loader that registers a script as a Web Worker
MIT License
1.46k stars 273 forks source link

why 'ctx.terminate' is not wokring #328

Open cielyic opened 3 years ago

cielyic commented 3 years ago
// my.worker.js
const ctx: Worker = self as any;

ctx.terminate(); // not a function

but

// my.worker.js
const ctx: Worker = self as any;

ctx.close(); // works , but type is wrong