Add ESM helper methods to CJS build (fixes #2909)

This commit is contained in:
SheetJS 2023-04-10 01:15:44 -04:00
parent ffbea71bc2
commit c06a32043f
2 changed files with 4 additions and 2 deletions

@ -10,6 +10,8 @@ XLSX.writeFileAsync = writeFileAsync;
XLSX.utils = utils;
XLSX.writeXLSX = writeSyncXLSX;
XLSX.writeFileXLSX = writeFileSyncXLSX;
XLSX.set_fs = set_fs;
XLSX.set_cptable = set_cptable;
XLSX.SSF = SSF;
if(typeof __stream !== "undefined") XLSX.stream = __stream;
if(typeof CFB !== "undefined") XLSX.CFB = CFB;

4
types/index.d.ts vendored

@ -14,9 +14,9 @@ export const SSF: any;
// export { CFB };
export const CFB: any;
/** ESM ONLY! Set internal `fs` instance */
/** Set internal `fs` instance */
export function set_fs(fs: any): void;
/** ESM ONLY! Set internal codepage tables */
/** Set internal codepage tables */
export function set_cptable(cptable: any): void;
/** NODE ONLY! Attempts to read filename and parse */