declare module 'qrcode' {
    interface QRCodeOptions {
        version?: number;
        errorCorrectionLevel?: 'L' | 'M' | 'Q' | 'H';
        width?: number;
        margin?: number;
        color?: {
            dark?: string;
            light?: string;
        };
    }

    function toDataURL(
        text: string,
        options?: QRCodeOptions
    ): Promise<string>;

    export { toDataURL };
    export default { toDataURL };
}