Add automatic syntax checker, fix editor bugs
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { DocumentRange, StepExecutionResult } from "./types";
|
||||
import { StepExecutionResult } from "./types";
|
||||
import * as E from "./worker-errors";
|
||||
|
||||
/** Types of requests the worker handles */
|
||||
@@ -19,6 +19,10 @@ export type WorkerRequestData =
|
||||
type: "UpdateBreakpoints";
|
||||
params: { points: number[] };
|
||||
}
|
||||
| {
|
||||
type: "ValidateCode";
|
||||
params: { code: string };
|
||||
}
|
||||
| {
|
||||
type: "Execute";
|
||||
params: { interval: number };
|
||||
@@ -57,6 +61,11 @@ export type WorkerResponseData<RS, A extends WorkerAckType> =
|
||||
data: A;
|
||||
error?: WorkerAckError[A];
|
||||
}
|
||||
/** Result of code validation, containing parsing error (if any) */
|
||||
| {
|
||||
type: "validate";
|
||||
error?: E.WorkerParseError;
|
||||
}
|
||||
/** Response containing step execution result, and runtime error (if any) */
|
||||
| {
|
||||
type: "result";
|
||||
|
||||
Reference in New Issue
Block a user