// Copyright 2017-2019 @polkadot/react-qr authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. import _qrcode from 'qrcode-generator'; // A small hurdle to jump through, just to get the default/default correct (as generated) const qrcode: typeof _qrcode = _qrcode; // HACK The default function take string -> number[], the Uint8array is compatible // with that signature and the use thereof // eslint-disable-next-line @typescript-eslint/no-explicit-any (qrcode as any).stringToBytes = (data: Uint8Array): Uint8Array => data; export default qrcode;