@types/file-saver
Advanced tools
Comparing version 0.0.1 to 1.3.0
@@ -1,46 +0,26 @@ | ||
// Type definitions for FileSaver.js | ||
// Type definitions for FileSaver.js 1.3 | ||
// Project: https://github.com/eligrey/FileSaver.js/ | ||
// Definitions by: Cyril Schumacher <https://github.com/cyrilschumacher>, Daniel Roth <https://github.com/DaIgeb> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// Definitions by: Cyril Schumacher <https://github.com/cyrilschumacher> | ||
// Daniel Roth <https://github.com/DaIgeb> | ||
// Chris Barr <https://github.com/chrismbarr> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/file-saver | ||
/** | ||
* @summary Interface for "saveAs" function. | ||
* @author Cyril Schumacher | ||
* @version 1.0 | ||
*/ | ||
interface FileSaver { | ||
( | ||
/** | ||
* @summary Data. | ||
* @type {Blob} | ||
*/ | ||
data: Blob, | ||
declare namespace FileSaver { | ||
/** | ||
* FileSaver.js implements the saveAs() FileSaver interface in browsers that do not natively support it. | ||
* @param data - The actual file data blob. | ||
* @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 `false`. Set to `true` if you don't want FileSaver.js to automatically provide Unicode text encoding hints | ||
*/ | ||
function saveAs(data: Blob, filename?: string, disableAutoBOM?: boolean): void; | ||
} | ||
/** | ||
* @summary File name. | ||
* @type {DOMString} | ||
*/ | ||
filename: string, | ||
declare global { | ||
const saveAs: typeof FileSaver.saveAs; | ||
/** | ||
* @summary Disable Unicode text encoding hints or not. | ||
* @type {boolean} | ||
*/ | ||
disableAutoBOM?: boolean | ||
): void | ||
( | ||
/** | ||
* @summary File. | ||
* @type {File} | ||
*/ | ||
data: File | ||
): void | ||
interface Window { | ||
saveAs: typeof FileSaver.saveAs; | ||
} | ||
} | ||
declare var saveAs: FileSaver; | ||
declare module "file-saver" { | ||
var fileSaver: { saveAs: typeof saveAs }; | ||
export = fileSaver | ||
} | ||
export = FileSaver; |
{ | ||
"name": "@types/file-saver", | ||
"version": "0.0.1", | ||
"version": "1.3.0", | ||
"description": "TypeScript definitions for FileSaver.js", | ||
@@ -9,7 +9,14 @@ "license": "MIT", | ||
"name": "Cyril Schumacher", | ||
"url": "https://github.com/cyrilschumacher" | ||
"url": "https://github.com/cyrilschumacher", | ||
"githubUsername": "cyrilschumacher" | ||
}, | ||
{ | ||
"name": "Daniel Roth", | ||
"url": "https://github.com/DaIgeb" | ||
"url": "https://github.com/DaIgeb", | ||
"githubUsername": "DaIgeb" | ||
}, | ||
{ | ||
"name": "Chris Barr", | ||
"url": "https://github.com/chrismbarr", | ||
"githubUsername": "chrismbarr" | ||
} | ||
@@ -24,5 +31,4 @@ ], | ||
"dependencies": {}, | ||
"peerDependencies": {}, | ||
"typesPublisherContentHash": "7ad8dff51d9a37036c68fbd0b581e3aa56fa6c399903277e08ebdc59e7c91a12", | ||
"typesPublisherContentHash": "a66bca4f8a13eabda0c70802020119cb9fe6df56c8738ffc07d275eae82f438d", | ||
"typeScriptVersion": "2.0" | ||
} |
@@ -11,7 +11,7 @@ # Installation | ||
Additional Details | ||
* Last updated: Wed, 26 Apr 2017 18:47:06 GMT | ||
* Last updated: Wed, 08 Nov 2017 00:10:04 GMT | ||
* Dependencies: none | ||
* Global values: saveAs | ||
* Global values: none | ||
# Credits | ||
These definitions were written by Cyril Schumacher <https://github.com/cyrilschumacher>, Daniel Roth <https://github.com/DaIgeb>. | ||
These definitions were written by Cyril Schumacher <https://github.com/cyrilschumacher>, Daniel Roth <https://github.com/DaIgeb>, Chris Barr <https://github.com/chrismbarr>. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
3923
1
22