sm-utility 2.1.2 → 2.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import { ISpreadSheet } from "../interfaces";
3
3
  export declare class ExcelCreator {
4
- createSync<T extends Record<string, string>>(sheets: ISpreadSheet<T>[]): Buffer;
5
- createAsync<T extends Record<string, string>>(sheets: ISpreadSheet<T>[]): Promise<Buffer>;
4
+ createSync<T extends Record<string, any>>(sheets: ISpreadSheet<T>[]): Buffer;
5
+ createAsync<T extends Record<string, any>>(sheets: ISpreadSheet<T>[]): Promise<Buffer>;
6
6
  }
@@ -7,8 +7,5 @@ function main() {
7
7
  const workerResult = createExcelTable_1.createExcelTable(worker_threads_1.workerData.data);
8
8
  worker_threads_1.parentPort.postMessage(workerResult);
9
9
  }
10
- else {
11
- throw Error("The 'parentPort' is not available. This code should run within a worker context.");
12
- }
13
10
  }
14
11
  main();
@@ -1,7 +1,7 @@
1
1
  import { WorkSheet } from "node-xlsx";
2
2
  import { ISpreadSheet } from "../interfaces";
3
3
  export declare class SheetExcelCreator {
4
- create<T extends Record<string, string>>({ name, items, structures, }: ISpreadSheet<T>): WorkSheet<string>;
4
+ create<T extends Record<string, any>>({ name, items, structures, }: ISpreadSheet<T>): WorkSheet<string>;
5
5
  private buildSheetBuilder;
6
6
  private buildSheetData;
7
7
  private customItem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sm-utility",
3
- "version": "2.1.2",
3
+ "version": "2.1.3",
4
4
  "description": "reusable utility codes for sm projects",
5
5
  "main": "index.js",
6
6
  "types": "./index.d.ts",