[react-qr-reader] update type declaration to use CommonJs exports

This commit is contained in:
Tim Trinidad 2018-12-03 22:50:08 -05:00
parent 24077f2cd0
commit e3fd26e653
2 changed files with 7 additions and 8 deletions

View File

@ -6,11 +6,7 @@
import * as React from "react";
export as namespace QrReader;
export default QrReader;
export namespace QrReader {
declare namespace QrReader {
interface props {
onScan: (data: string | null) => void;
onError: (err: any) => void;
@ -26,5 +22,8 @@ export namespace QrReader {
}
}
declare class QrReader extends React.Component<QrReader.props> {
}
export as namespace QrReader;
declare class QrReader extends React.Component<QrReader.props> {}
export = QrReader;

View File

@ -1,5 +1,5 @@
import * as React from "react";
import QrReader from "react-qr-reader";
import * as QrReader from "react-qr-reader";
export class Test extends React.Component {
render() {