diff --git a/src/worker.js b/src/worker.ts similarity index 88% rename from src/worker.js rename to src/worker.ts index 3efa141..71fc023 100644 --- a/src/worker.js +++ b/src/worker.ts @@ -4,5 +4,5 @@ import { JSONPathEnvironment } from "json-p3"; const useExtendedSyntax = workerData?.useExtendedSyntax ?? false; const env = new JSONPathEnvironment({ strict: !useExtendedSyntax }); const result = env.query(workerData.expression, workerData.input); -parentPort.postMessage(result.values()); +parentPort?.postMessage(result.values()); process.exit();