Merge pull request #344 from xvzf/add-typescript-module

Declare module so webpack can do its work
This commit is contained in:
Eric Blade
2018-12-18 10:26:02 -05:00
committed by GitHub
+4 -2
View File
@@ -2,8 +2,10 @@
// Project: http://serratus.github.io/quaggaJS/ // Project: http://serratus.github.io/quaggaJS/
// Definitions by: Cam Birch, Peter Horwood aka Madman Pierre, Dan Manastireanu <https://github.com/danmana> // Definitions by: Cam Birch, Peter Horwood aka Madman Pierre, Dan Manastireanu <https://github.com/danmana>
declare var Quagga: QuaggaJSStatic; declare module "quagga" {
var Quagga: QuaggaJSStatic;
export default Quagga; export default Quagga;
}
interface QuaggaJSStatic { interface QuaggaJSStatic {
/** /**
@@ -235,7 +237,7 @@ interface QuaggaJSResultCollector {
/* /*
* a static function that returns you a ResultCollector * a static function that returns you a ResultCollector
*/ */
create?(QuaggaJSResultCollector): QuaggaJSResultCollector; create?(param: QuaggaJSResultCollector): QuaggaJSResultCollector;
getResults?(): QuaggaJSCodeResult[]; getResults?(): QuaggaJSCodeResult[];
} }