Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/file-saver

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/file-saver - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

51

file-saver/index.d.ts

@@ -8,4 +8,27 @@ // Type definitions for FileSaver.js 2.0

// JounQin <https://github.com/JounQin>
// BendingBender <https://github.com/bendingbender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
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 {

@@ -20,29 +43,3 @@ interface FileSaverOptions {

/**
* 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
*/
function saveAs(data: Blob | string, filename?: string, options?: 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
function saveAs(data: Blob | string, filename?: string, disableAutoBOM?: boolean): void;
const saveAs: typeof FileSaver;
}
declare global {
const saveAs: typeof FileSaver.saveAs;
interface Window {
saveAs: typeof FileSaver.saveAs;
}
}
export = FileSaver;
{
"name": "@types/file-saver",
"version": "2.0.3",
"version": "2.0.4",
"description": "TypeScript definitions for FileSaver.js",

@@ -32,2 +32,7 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/file-saver",

"githubUsername": "JounQin"
},
{
"name": "BendingBender",
"url": "https://github.com/bendingbender",
"githubUsername": "bendingbender"
}

@@ -44,4 +49,4 @@ ],

"dependencies": {},
"typesPublisherContentHash": "274a9f76b1b95de6f8a26af0e83fb37faf5278db00870c5ddbef28c2591fbef6",
"typeScriptVersion": "3.6"
"typesPublisherContentHash": "7cba4ea84714c61a906a3722506c49956e789889eb7ddae8d7c46c27d800d015",
"typeScriptVersion": "3.7"
}

@@ -18,4 +18,27 @@ # Installation

// JounQin <https://github.com/JounQin>
// BendingBender <https://github.com/bendingbender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
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 {

@@ -30,39 +53,13 @@ interface FileSaverOptions {

/**
* 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
*/
function saveAs(data: Blob | string, filename?: string, options?: 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
function saveAs(data: Blob | string, filename?: string, disableAutoBOM?: boolean): void;
const saveAs: typeof FileSaver;
}
declare global {
const saveAs: typeof FileSaver.saveAs;
interface Window {
saveAs: typeof FileSaver.saveAs;
}
}
export = FileSaver;
````
### Additional Details
* Last updated: Fri, 09 Jul 2021 02:32:27 GMT
* Last updated: Tue, 16 Nov 2021 20:01:24 GMT
* Dependencies: none
* Global values: none
* Global values: `saveAs`
# Credits
These definitions were written by [Cyril Schumacher](https://github.com/cyrilschumacher), [Daniel Roth](https://github.com/DaIgeb), [Chris Barr](https://github.com/chrismbarr), [HitkoDev](https://github.com/HitkoDev), and [JounQin](https://github.com/JounQin).
These definitions were written by [Cyril Schumacher](https://github.com/cyrilschumacher), [Daniel Roth](https://github.com/DaIgeb), [Chris Barr](https://github.com/chrismbarr), [HitkoDev](https://github.com/HitkoDev), [JounQin](https://github.com/JounQin), and [BendingBender](https://github.com/bendingbender).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc