From 473aaa004abce7febc6465da06207f09ff61fe22 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Mon, 3 Jun 2019 16:39:21 +0200 Subject: [PATCH] fix(core): update --- ts/smartpdf.classes.smartpdf.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ts/smartpdf.classes.smartpdf.ts b/ts/smartpdf.classes.smartpdf.ts index b4501fb..bbfa5ae 100644 --- a/ts/smartpdf.classes.smartpdf.ts +++ b/ts/smartpdf.classes.smartpdf.ts @@ -5,7 +5,7 @@ import { PdfCandidate } from './smartpdf.classes.pdfcandidate'; declare const document; -import { IPdfResult } from './interfaces'; +import * as interfaces from './interfaces'; export class SmartPdf { htmlServerInstance: Server; @@ -50,6 +50,7 @@ export class SmartPdf { }); } + // stop async stop() { const done = plugins.smartpromise.defer(); this.htmlServerInstance.close(() => { @@ -66,7 +67,7 @@ export class SmartPdf { /** * returns a pdf for a given html string; */ - async getPdfForHtmlString(htmlStringArg: string): Promise { + async getPdfForHtmlString(htmlStringArg: string): Promise { await this._readyDeferred.promise; const pdfCandidate = new PdfCandidate(htmlStringArg); this._candidates[pdfCandidate.pdfId] = pdfCandidate; @@ -96,7 +97,7 @@ export class SmartPdf { }; } - async getPdfForWebsite(websiteUrl: string): Promise { + async getPdfForWebsite(websiteUrl: string): Promise { const page = await this.headlessBrowser.newPage(); page.emulateMedia('screen'); const response = await page.goto(websiteUrl, { waitUntil: 'networkidle2' });