/** * Indicator calculations in a Web Worker. * @module workers/indicator.worker */ interface IndicatorTask { id: string; type: "indicator"; indicator: "rsi" | "macd" | "bollingerBands" | "sma" | "ema"; data: Float32Array | Float64Array; period?: number; fastPeriod?: number; slowPeriod?: number; signalPeriod?: number; stdDev?: number; } interface IndicatorResultMessage { id: string; type: "indicator-result"; indicator: string; values: Float32Array; signal?: Float32Array; upper?: Float32Array; lower?: Float32Array; histogram?: Float32Array; duration: number; } interface ErrorMessage { id: string; type: "error"; error: string; } export type { IndicatorTask, IndicatorResultMessage, ErrorMessage };