// The contract between the app and the MATLAB layer. // // Every lab writes its controls into params.json and reads back out.json, so // the TypeScript side never needs to know more than "some JSON goes in, some // JSON comes out". Individual panels narrow the output to their own shape. /** NaN and +-Inf all cross the JSON boundary as null. */ export type Num = number | null export type ParamValue = number | string | boolean | number[] | number[][] export type Params = Record export type RunResult = | { ok: true; data: T; output: string; ms: number } | { ok: false; error: string; output: string; ms: number }