Add type definition and tests for EvaporateJS

This commit is contained in:
Andrew Kuklewicz
2016-03-27 18:46:49 -04:00
parent 299b5caa22
commit 06f39135fe
2 changed files with 20 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
/// <reference path="./evaporate.d.ts" />
function test_upload() {
var evaporate = new Evaporate({});
var uploadId = evaporate.add({});
evaporate.cancel(uploadId);
}
+13
View File
@@ -0,0 +1,13 @@
// Type definitions for EvaporateJS
// Project: https://github.com/TTLabs/EvaporateJS
// Definitions by: Andrew Kuklewicz <https://github.com/kookster/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare class Evaporate {
cancel(id:string): boolean;
constructor(config:any);
add(config:any): string;
}
declare module 'evaporate' {
export = Evaporate;
}