import { Subject } from 'rxjs'; export interface ICacheBusterConfig { /** * pass a Subject which will emit whenever the inner source stream has emitted * this can later be subscribed to from Cacheables so they can get rid of their caches */ cacheBusterNotifier?: Subject; } /** * flag that indicates whether cache should be cleared before decorated method has been called. * False by default, i.e. cache is cleared after observable from decorated method emits */ export type ICacheBusterConfigInstant = ICacheBusterConfig & { isInstant: true }; export type DecoratorFactoryType = (_target: Object, _propertyKey: string, propertyDescriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor export type ICacheBusterConfigOrConfigWithInstant = ICacheBusterConfig | ICacheBusterConfigInstant; export type DecoratorFactoryTypeOfAnyOrKReturnType = TConfig extends ICacheBusterConfigInstant ? DecoratorFactoryType : DecoratorFactoryType