import { isNullOrUndefined } from 'util'; import { DnLoadingBase } from '../components/loading/dn-loading.base'; export interface IDnHttpExtraConfig { useApi?: boolean; useToken?: boolean; useMap?: boolean; id?: number; loadingBase?: DnLoadingBase; [key: string]: string | boolean | number | DnLoadingBase | undefined; } export class DnHttpExtraConfig implements IDnHttpExtraConfig { useApi?: boolean; useToken?: boolean; useMap?: boolean; id?: number; loadingBase?: DnLoadingBase; [key: string]: string | boolean | number | DnLoadingBase | undefined; constructor(config: IDnHttpExtraConfig = {}) { this.useApi = isNullOrUndefined(config.useApi) ? true : config.useApi; this.useToken = isNullOrUndefined(config.useToken) ? true : config.useToken; this.useMap = isNullOrUndefined(config.useMap) ? true : config.useMap; this.id = config.id; this.loadingBase = config.loadingBase; } }