From c294cee896286e2016d4e75230b12025581f0796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabio=20Jos=C3=A9?= Date: Tue, 29 Oct 2019 09:46:20 -0300 Subject: [PATCH] fix An implementation cannot be declared in ambient contexts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabio José --- package.json | 3 ++- v1/index.d.ts | 6 +----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index d2c9064..71c5584 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,8 @@ "mocha": "5.2.0", "mocha-lcov-reporter": "1.3.0", "nock": "10.0.2", - "request": "^2.88.0" + "request": "^2.88.0", + "typescript": "^3.6.4" }, "publishConfig": { "access": "public" diff --git a/v1/index.d.ts b/v1/index.d.ts index 8585765..e1059d2 100644 --- a/v1/index.d.ts +++ b/v1/index.d.ts @@ -1,5 +1,3 @@ -import * as v1js from './index.js' - /** * CloudEvent class definition */ @@ -24,8 +22,6 @@ export interface Spec { /** * Function to create CloudEvents instances */ -export function event(): Cloudevent { - return new Cloudevent(); -} +export type event = () => Cloudevent; export default Cloudevent;