Strict done!!

This commit is contained in:
2020-11-23 16:42:54 +05:30
parent af343cb7f9
commit afe746ecdc
142 changed files with 1258 additions and 907 deletions

View File

@ -19,11 +19,11 @@ const serviceName = 'VoucherService';
export class VoucherService {
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
static dataURLtoBlob(dataURL) {
static dataURLtoBlob(dataURL: string) {
const re = /^data:([\w/\-.]+);\w+,(.*)$/;
const m = dataURL.match(re);
const mimeString = m[1];
const byteString = atob(m[2]);
const mimeString = (m as RegExpMatchArray)[1];
const byteString = atob((m as RegExpMatchArray)[2]);
const ab = new ArrayBuffer(byteString.length);
const dw = new DataView(ab);
let i;
@ -45,10 +45,10 @@ export class VoucherService {
getOfType(type: string, account?: string): Observable<Voucher> {
const endpoint = type.replace(/ /g, '-').toLowerCase();
const options = {};
let options = {};
if (account !== undefined && account !== null) {
// eslint-disable-next-line @typescript-eslint/dot-notation
options['params'] = new HttpParams().set('a', account);
options = { params: new HttpParams().set('a', account) };
}
return <Observable<Voucher>>(
this.http