1.7.4 • Published 6 months ago

@types/convert-excel-to-json v1.7.4

Weekly downloads
1,016
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/convert-excel-to-json

Summary

This package contains type definitions for convert-excel-to-json (https://github.com/DiegoZoracKy/convert-excel-to-json).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/convert-excel-to-json.

index.d.ts

// Type definitions for convert-excel-to-json 1.7
// Project: https://github.com/DiegoZoracKy/convert-excel-to-json
// Definitions by: UNIDY2002 <https://github.com/UNIDY2002>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <reference types="node" />

interface SheetConfig {
    header?: { rows: number } | undefined;
    range?: string | undefined;
    columnToKey?: { [key: string]: string } | undefined;
    includeEmptyLines?: boolean | undefined;
    sheetStubs?: boolean | undefined;
}

declare function excelToJson(
    config: ({ sourceFile: string } | { source: string | Buffer })                 // Either sourceFile or source should have a value
        & { sheets?: ReadonlyArray<(string | (SheetConfig & { name: string }))> | undefined }  // Nested SheetConfig should be allowed
        & SheetConfig                                                              // ... or just a simple config for all
        | string,                                                                  // Input can also be a json-string (for cli)
    sourceFile?: string,                                                           // For cli
): { [key: string]: any[] };        // Using any to provide more flexibility for downstream usages

export = excelToJson;

Additional Details

  • Last updated: Thu, 08 Jul 2021 09:08:12 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

These definitions were written by UNIDY2002.