Skip to content

Commit

Permalink
Pass-through environment
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcw committed Dec 17, 2024
1 parent d52d17a commit fdc4fcf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/worker/createWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ import { createOrUpdateFile } from "../sync/update.js";
export type WorkerShape = Remote<ReturnType<typeof createWorker>>;

const defaultWorkerOptions = {
onFileUpdated(path: string, code: string) {},
onFileUpdated(
env: VirtualTypeScriptEnvironment,
path: string,
code: string,
) {},
};

/**
Expand Down Expand Up @@ -49,7 +53,7 @@ export function createWorker(
updateFile({ path, code }: { path: string; code: string }) {
if (!env) return;
if (createOrUpdateFile(env, path, code)) {
options.onFileUpdated(path, code);
options.onFileUpdated(env, path, code);
}
},
getLints({
Expand Down

0 comments on commit fdc4fcf

Please sign in to comment.