From 2c270dee7720720459599e136f86c522b00024d3 Mon Sep 17 00:00:00 2001 From: Flavien Charlon Date: Sun, 12 Mar 2017 15:20:37 +0000 Subject: [PATCH 1/4] Ensure the HelloSign object can be imported --- hellosign-embedded/index.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hellosign-embedded/index.d.ts b/hellosign-embedded/index.d.ts index ec77a92b92..a290a6c508 100644 --- a/hellosign-embedded/index.d.ts +++ b/hellosign-embedded/index.d.ts @@ -268,3 +268,5 @@ declare module HelloSign { } declare var HelloSign: HelloSign.HelloSignStatic; + +export = HelloSign; From e349d2591137d677ea424d37fd7ac9a76a2d7ed7 Mon Sep 17 00:00:00 2001 From: Flavien Charlon Date: Sun, 12 Mar 2017 17:50:02 +0000 Subject: [PATCH 2/4] Update the tests for the hellosign-embedded types --- hellosign-embedded/hellosign-embedded-tests.ts | 2 ++ hellosign-embedded/index.d.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hellosign-embedded/hellosign-embedded-tests.ts b/hellosign-embedded/hellosign-embedded-tests.ts index 281bbef2ab..0ae16b73fa 100644 --- a/hellosign-embedded/hellosign-embedded-tests.ts +++ b/hellosign-embedded/hellosign-embedded-tests.ts @@ -1,3 +1,5 @@ +import HelloSign from 'hellosign-embedded'; + HelloSign.init('abc123'); // some options diff --git a/hellosign-embedded/index.d.ts b/hellosign-embedded/index.d.ts index a290a6c508..db96673cd7 100644 --- a/hellosign-embedded/index.d.ts +++ b/hellosign-embedded/index.d.ts @@ -269,4 +269,4 @@ declare module HelloSign { declare var HelloSign: HelloSign.HelloSignStatic; -export = HelloSign; +export default HelloSign; From f53a8097259619551288716f1a29649f32cd78ac Mon Sep 17 00:00:00 2001 From: Flavien Charlon Date: Sun, 12 Mar 2017 18:07:59 +0000 Subject: [PATCH 3/4] Fix an export issue --- hellosign-embedded/hellosign-embedded-tests.ts | 2 +- hellosign-embedded/index.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hellosign-embedded/hellosign-embedded-tests.ts b/hellosign-embedded/hellosign-embedded-tests.ts index 0ae16b73fa..1ca8f3aafd 100644 --- a/hellosign-embedded/hellosign-embedded-tests.ts +++ b/hellosign-embedded/hellosign-embedded-tests.ts @@ -1,4 +1,4 @@ -import HelloSign from 'hellosign-embedded'; +import HelloSign = require('hellosign-embedded'); HelloSign.init('abc123'); diff --git a/hellosign-embedded/index.d.ts b/hellosign-embedded/index.d.ts index db96673cd7..a290a6c508 100644 --- a/hellosign-embedded/index.d.ts +++ b/hellosign-embedded/index.d.ts @@ -269,4 +269,4 @@ declare module HelloSign { declare var HelloSign: HelloSign.HelloSignStatic; -export default HelloSign; +export = HelloSign; From 08043daf8ffc0825d7b41ca236d0149ac1121fbf Mon Sep 17 00:00:00 2001 From: Flavien Charlon Date: Tue, 14 Mar 2017 11:23:12 +0000 Subject: [PATCH 4/4] Use "export as namespace" for hellosign-embedded --- hellosign-embedded/hellosign-embedded-tests.ts | 2 +- hellosign-embedded/index.d.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hellosign-embedded/hellosign-embedded-tests.ts b/hellosign-embedded/hellosign-embedded-tests.ts index 1ca8f3aafd..4ff618e812 100644 --- a/hellosign-embedded/hellosign-embedded-tests.ts +++ b/hellosign-embedded/hellosign-embedded-tests.ts @@ -1,4 +1,4 @@ -import HelloSign = require('hellosign-embedded'); +import { HelloSign } from 'hellosign-embedded'; HelloSign.init('abc123'); diff --git a/hellosign-embedded/index.d.ts b/hellosign-embedded/index.d.ts index a290a6c508..e7a94beaf0 100644 --- a/hellosign-embedded/index.d.ts +++ b/hellosign-embedded/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/HelloFax/hellosign-embedded // Definitions by: Brian Surowiec // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare module HelloSign { +export declare module HelloSign { interface SignedMessageEvent { event: 'signature_request_signed'; signature_id: string; @@ -269,4 +269,4 @@ declare module HelloSign { declare var HelloSign: HelloSign.HelloSignStatic; -export = HelloSign; +export as namespace HelloSign;