mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Rename directory: "fileSaver" to "FileSaver".
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
/// <reference path="fileSaver.d.ts" />
|
||||
|
||||
/**
|
||||
* @summary Test for "saveAs" function.
|
||||
*/
|
||||
function testSaveAs() {
|
||||
var data: Blob = new Blob(["Hello, world!"], {type: "text/plain;charset=utf-8"});
|
||||
var filename: string = 'hello world.txt';
|
||||
|
||||
saveAs(data, filename);
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
--noImplicitAny
|
||||
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
// Type definitions for FileSaver.js
|
||||
// Project: https://github.com/eligrey/FileSaver.js/
|
||||
// Definitions by: Cyril Schumacher <https://github.com/cyrilschumacher>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* @summary Interface for "saveAs" function.
|
||||
* @author Cyril Schumacher
|
||||
* @version 1.0
|
||||
*/
|
||||
interface FileSaver {
|
||||
(
|
||||
/**
|
||||
* @summary Data.
|
||||
* @type {Blob}
|
||||
*/
|
||||
data: Blob,
|
||||
|
||||
/**
|
||||
* @summary File name.
|
||||
* @type {DOMString}
|
||||
*/
|
||||
filename: string
|
||||
): void
|
||||
}
|
||||
|
||||
declare var saveAs: FileSaver;
|
||||
Reference in New Issue
Block a user