From e38211328b206adba9bb4ee39c22a026ab77eff3 Mon Sep 17 00:00:00 2001 From: Isac Date: Sat, 8 Jun 2019 16:02:54 -0300 Subject: [PATCH] Add types to generate (#182) * add type * fix callback type * callnback is optional --- index.d.ts | 19 +++++++++++++++++++ package.json | 1 + 2 files changed, 20 insertions(+) create mode 100644 index.d.ts diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..7e84c37 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,19 @@ +interface Options { + theme: string, + jsonFile: string, + jsonDir?: string, + output: string, + screenshotsDirectory?: string, + reportSuiteAsScenarios: boolean, + ignoreBadJsonFile?: boolean, + launchReport: boolean, + columnLayout?: number, + storeScreenshots?: boolean, + noInlineScreenshots?: boolean, + name?: string, + metadata?: { + [key: string]: string + }, +} + +export function generate(options: Options, callback?: () => void): void \ No newline at end of file diff --git a/package.json b/package.json index 5f5e17f..a09c3eb 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "5.0.0", "description": "Generates Cucumber HTML reports in three different themes", "main": "index.js", + "typings": "./index.d.ts", "author": { "name": "Kushang Gajjar", "email": "g.kushang@gmail.com"