Declare module so webpack can do its work

This commit is contained in:
Matthias Riegler
2018-12-14 11:01:07 +01:00
committed by GitHub
parent 42b5382510
commit 4c73d76692
+5 -3
View File
@@ -2,8 +2,10 @@
// Project: http://serratus.github.io/quaggaJS/
// Definitions by: Cam Birch, Peter Horwood aka Madman Pierre, Dan Manastireanu <https://github.com/danmana>
declare var Quagga: QuaggaJSStatic;
export default Quagga;
declare module "quagga" {
var Quagga: QuaggaJSStatic;
export default Quagga;
}
interface QuaggaJSStatic {
/**
@@ -235,7 +237,7 @@ interface QuaggaJSResultCollector {
/*
* a static function that returns you a ResultCollector
*/
create?(QuaggaJSResultCollector): QuaggaJSResultCollector;
create?(param: QuaggaJSResultCollector): QuaggaJSResultCollector;
getResults?(): QuaggaJSCodeResult[];
}