MCPcopy
hub / github.com/CopyTranslator/CopyTranslator / constructor

Method constructor

src/main/pp-ocr.ts:32–51  ·  view source on GitHub ↗
(
    path: null | string,
    args: string[],
    options: any,
    debug: boolean
  )

Source from the content-addressed store, hash-verified

30export class PPOCRWorker extends Worker {
31 private queue: any;
32 constructor(
33 path: null | string,
34 args: string[],
35 options: any,
36 debug: boolean
37 ) {
38 if (!path) {
39 path = "PaddleOCR_json.exe";
40 }
41 debug = !!debug;
42 super(ocr_thread_file, {
43 workerData: { path, args, options, debug },
44 });
45 this.queue = new Queue();
46 super.once("message", (code: any) => {
47 console.log(code);
48 this.queue.status = true;
49 this.queue.shift();
50 });
51 }
52 get length() {
53 return this.queue.length;
54 }

Callers

nothing calls this directly

Calls 1

shiftMethod · 0.80

Tested by

no test coverage detected