From 06f39135fe0eace3eda5dd01d3af9b8f79938197 Mon Sep 17 00:00:00 2001 From: Andrew Kuklewicz Date: Sun, 27 Mar 2016 18:46:49 -0400 Subject: [PATCH 1/2] 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; +} From cbf802150d720a8259a350d4f0a8b198813c0202 Mon Sep 17 00:00:00 2001 From: Andrew Kuklewicz Date: Sun, 27 Mar 2016 19:28:44 -0400 Subject: [PATCH 2/2] Add (much deserved credit) for Rhoden --- evaporate/evaporate.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evaporate/evaporate.d.ts b/evaporate/evaporate.d.ts index 07c82325f..2a6745546 100644 --- a/evaporate/evaporate.d.ts +++ b/evaporate/evaporate.d.ts @@ -1,6 +1,6 @@ // Type definitions for EvaporateJS // Project: https://github.com/TTLabs/EvaporateJS -// Definitions by: Andrew Kuklewicz +// Definitions by: Andrew Kuklewicz , Chris Rhoden // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare class Evaporate { cancel(id:string): boolean;