Strict done!!
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user