From cc47a2e4e12885f09d9998cc99e994d41f037142 Mon Sep 17 00:00:00 2001 From: Josh Hall Date: Thu, 12 Oct 2017 03:46:23 -0500 Subject: [PATCH] @types/dwt: Add methods and properties to WebTwainEnv (#20506) * Add Unload method to WebTwainEnv * Add Containers property to WebTwainEnv * Define arguments for RegisterEvent callback function * Add Container interface * Use correct syntax for Containers array definition --- types/dwt/index.d.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/types/dwt/index.d.ts b/types/dwt/index.d.ts index cad6825c27..d72fab058f 100644 --- a/types/dwt/index.d.ts +++ b/types/dwt/index.d.ts @@ -21,9 +21,11 @@ declare namespace Dynamsoft { namespace WebTwainEnv { function GetWebTwain (cid: string): WebTwain; - function RegisterEvent(event: string, fn: () => void): void; + function RegisterEvent(event: string, fn: (...args: any[]) => void): void; function Load(): void; + function Unload(): void; let AutoLoad: boolean; + let Containers: Container[]; } } @@ -1253,6 +1255,12 @@ declare enum EnumDWT_MouseShape { Zoom = 3 } +interface Container { + ContainerId: string; + Width: string | number; + Height: string | number; +} + /** * @class */