@types/file-saver
TypeScript definitions for FileSaver.js
Last updated 9 years ago by types .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @types/file-saver 
SYNC missed versions from official npm registry.

Installation

npm install --save @types/file-saver

Summary

This package contains type definitions for file-saver (https://github.com/eligrey/FileSaver.js/).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/file-saver.

index.d.ts

export = FileSaver;

export as namespace saveAs;

/**
 * FileSaver.js implements the saveAs() FileSaver interface in browsers that do not natively support it.
 * @param data - The actual file data blob or URL.
 * @param filename - The optional name of the file to be downloaded. If omitted, the name used in the file data will be used. If none is provided "download" will be used.
 * @param options - Optional FileSaver.js config
 */
declare function FileSaver(data: Blob | string, filename?: string, options?: FileSaver.FileSaverOptions): void;

/**
 * FileSaver.js implements the saveAs() FileSaver interface in browsers that do not natively support it.
 * @param data - The actual file data blob or URL.
 * @param filename - The optional name of the file to be downloaded. If omitted, the name used in the file data will be used. If none is provided "download" will be used.
 * @param disableAutoBOM - Optional & defaults to `true`. Set to `false` if you want FileSaver.js to automatically provide Unicode text encoding hints
 * @deprecated use `{ autoBom: false }` as the third argument
 */
// tslint:disable-next-line:unified-signatures
declare function FileSaver(data: Blob | string, filename?: string, disableAutoBOM?: boolean): void;

declare namespace FileSaver {
    interface FileSaverOptions {
        /**
         * Automatically provide Unicode text encoding hints
         * @default false
         */
        autoBom: boolean;
    }

    const saveAs: typeof FileSaver;
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: none

Credits

These definitions were written by Cyril Schumacher, Daniel Roth, HitkoDev, JounQin, and BendingBender.

Current Tags

  • 2.0.7                                ...           latest (2 years ago)
  • 2.0.1                                ...           ts2.0 (7 years ago)
  • 2.0.1                                ...           ts2.1 (7 years ago)
  • 2.0.1                                ...           ts2.2 (7 years ago)
  • 2.0.1                                ...           ts2.3 (7 years ago)
  • 2.0.1                                ...           ts2.4 (7 years ago)
  • 2.0.1                                ...           ts2.5 (7 years ago)
  • 2.0.1                                ...           ts2.6 (7 years ago)
  • 2.0.1                                ...           ts2.7 (7 years ago)
  • 2.0.1                                ...           ts2.8 (7 years ago)
  • 2.0.1                                ...           ts2.9 (7 years ago)
  • 2.0.1                                ...           ts3.0 (7 years ago)
  • 2.0.1                                ...           ts3.1 (7 years ago)
  • 2.0.1                                ...           ts3.2 (7 years ago)
  • 2.0.1                                ...           ts3.3 (7 years ago)
  • 2.0.1                                ...           ts3.4 (7 years ago)
  • 2.0.2                                ...           ts3.5 (5 years ago)
  • 2.0.3                                ...           ts3.6 (5 years ago)
  • 2.0.4                                ...           ts3.7 (4 years ago)
  • 2.0.5                                ...           ts3.8 (4 years ago)
  • 2.0.5                                ...           ts3.9 (4 years ago)
  • 2.0.5                                ...           ts4.0 (4 years ago)
  • 2.0.5                                ...           ts4.1 (4 years ago)
  • 2.0.5                                ...           ts4.2 (4 years ago)
  • 2.0.5                                ...           ts4.3 (4 years ago)
  • 2.0.5                                ...           ts4.4 (4 years ago)
  • 2.0.7                                ...           ts4.5 (2 years ago)
  • 2.0.7                                ...           ts4.6 (2 years ago)
  • 2.0.7                                ...           ts4.7 (2 years ago)
  • 2.0.7                                ...           ts4.8 (2 years ago)
  • 2.0.7                                ...           ts4.9 (2 years ago)
  • 2.0.7                                ...           ts5.0 (2 years ago)
  • 2.0.7                                ...           ts5.1 (2 years ago)
  • 2.0.7                                ...           ts5.2 (2 years ago)
  • 2.0.7                                ...           ts5.3 (2 years ago)
  • 2.0.7                                ...           ts5.4 (2 years ago)
  • 2.0.7                                ...           ts5.5 (2 years ago)
  • 2.0.7                                ...           ts5.6 (2 years ago)
  • 2.0.7                                ...           ts5.7 (2 years ago)
  • 2.0.7                                ...           ts5.8 (2 years ago)
  • 2.0.7                                ...           ts5.9 (2 years ago)
  • 2.0.7                                ...           ts6.0 (2 years ago)

12 Versions

  • 2.0.7                                ...           2 years ago
  • 2.0.6                                ...           2 years ago
  • 2.0.5                                ...           4 years ago
  • 2.0.4                                ...           4 years ago
  • 2.0.3                                ...           5 years ago
  • 2.0.2                                ...           5 years ago
  • 2.0.1                                ...           7 years ago
  • 2.0.0                                ...           7 years ago
  • 1.3.1                                ...           8 years ago
  • 1.3.0                                ...           8 years ago
  • 0.0.1                                ...           9 years ago
  • 0.0.0                                ...           9 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 2
Last Day 0
Last Week 1
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |