/** * Official Type definitions for JSS SPSS * https://jspreadsheet.com * Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped */ type SpssComment = { cell?: string; comment: string; }; type SpssOptions = { /** Output filename used by download(). Defaults to 'data.sav'. */ filename?: string; /** File label embedded in the .sav file header (max 64 chars). */ fileLabel?: string; /** Column headers to use when a raw data array is passed instead of a worksheet. */ headers?: string[]; /** Column definitions (type/format/source/width) when a raw data array is passed. */ columns?: Array>; /** Cell comments written into the document record, as an array or { "A1": "text" } map. */ comments?: SpssComment[] | Record; }; declare function spss(): true; declare namespace spss { /** Extension init hook — registers the per-worksheet plugin. */ function oninit(spreadsheet: any): void; /** * Generate an SPSS .sav binary from a worksheet instance or raw data array. * @returns The .sav file content as a Uint8Array. */ function generate(worksheet: any, options?: SpssOptions): Uint8Array; /** * Generate the .sav file and trigger a browser download. * @returns The .sav file content as a Uint8Array. */ function download(worksheet: any, options?: SpssOptions): Uint8Array; } export default spss;