From 06f39135fe0eace3eda5dd01d3af9b8f79938197 Mon Sep 17 00:00:00 2001 From: Andrew Kuklewicz Date: Sun, 27 Mar 2016 18:46:49 -0400 Subject: [PATCH] Add type definition and tests for EvaporateJS --- evaporate/evaporate-tests.ts | 7 +++++++ evaporate/evaporate.d.ts | 13 +++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 evaporate/evaporate-tests.ts create mode 100644 evaporate/evaporate.d.ts diff --git a/evaporate/evaporate-tests.ts b/evaporate/evaporate-tests.ts new file mode 100644 index 000000000..559d61fe7 --- /dev/null +++ b/evaporate/evaporate-tests.ts @@ -0,0 +1,7 @@ +/// + +function test_upload() { + var evaporate = new Evaporate({}); + var uploadId = evaporate.add({}); + evaporate.cancel(uploadId); +} diff --git a/evaporate/evaporate.d.ts b/evaporate/evaporate.d.ts new file mode 100644 index 000000000..07c82325f --- /dev/null +++ b/evaporate/evaporate.d.ts @@ -0,0 +1,13 @@ +// Type definitions for EvaporateJS +// Project: https://github.com/TTLabs/EvaporateJS +// Definitions by: Andrew Kuklewicz +// 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; +}