Updated to angular 11
Now compiling with strict mode in typescript Need to error checking now
This commit is contained in:
@ -20,7 +20,7 @@ export class CookieService {
|
||||
return '';
|
||||
}
|
||||
|
||||
public deleteCookie(name) {
|
||||
public deleteCookie(name: string) {
|
||||
this.setCookie(name, '', -1);
|
||||
}
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ export class ToCsvService {
|
||||
// eslint-disable-next-line class-methods-use-this
|
||||
toCsv(headers: any, data: any[]): string {
|
||||
const header = Object.keys(headers);
|
||||
const replacer = (key, value) => (value === null ? '' : value);
|
||||
const replacer = (key: string, value: string | number | null) => (value === null ? '' : value);
|
||||
const csv = data.map((row) =>
|
||||
header.map((fieldName) => JSON.stringify(row[headers[fieldName]], replacer)).join(','),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user