mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
[AAE-30878] - Using types to avoid compilation isues with the new ruels
This commit is contained in:
@@ -155,7 +155,7 @@ export class AdfHttpClient implements JsApiHttpClient {
|
|||||||
return this.request<T>(url, { ...options, httpMethod: 'DELETE' }, sc, emitters);
|
return this.request<T>(url, { ...options, httpMethod: 'DELETE' }, sc, emitters);
|
||||||
}
|
}
|
||||||
|
|
||||||
private addPromiseListeners<T = any>(promise: Promise<T>, eventEmitter: EventEmitter) {
|
private addPromiseListeners<T = any>(promise: Promise<T>, eventEmitter: any) {
|
||||||
const eventPromise = Object.assign(promise, {
|
const eventPromise = Object.assign(promise, {
|
||||||
on<K extends string | symbol>(event: K, fn: (...args: any[]) => void, context?: any) {
|
on<K extends string | symbol>(event: K, fn: (...args: any[]) => void, context?: any) {
|
||||||
eventEmitter.on(event, fn, context);
|
eventEmitter.on(event, fn, context);
|
||||||
|
@@ -23,7 +23,6 @@ import { HttpHeaders } from '@angular/common/http';
|
|||||||
import { AuthenticationServiceInterface } from '../interfaces/authentication-service.interface';
|
import { AuthenticationServiceInterface } from '../interfaces/authentication-service.interface';
|
||||||
import { RedirectAuthService } from '../oidc/redirect-auth.service';
|
import { RedirectAuthService } from '../oidc/redirect-auth.service';
|
||||||
import { EventEmitter } from 'eventemitter3';
|
import { EventEmitter } from 'eventemitter3';
|
||||||
|
|
||||||
type EventEmitterInstance = InstanceType<typeof EventEmitter>;
|
type EventEmitterInstance = InstanceType<typeof EventEmitter>;
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
|
Reference in New Issue
Block a user