- Updated NPM Readme
- Default version is now 4.x.x
- Fixed type error
- Fixed the issue that created multiple pubsub services (#7).
- Only version changed for anyone using Angular 4.0.0
- Fixed type error.
- Fixed the issue that created multiple pubsub services (#7).
- $pub command return undefined when no event subscribe.
- $sub method bug solved. RxJS Subscriber no longer call subscribe method on start.
- PubSubService moved into PubSubModule.
- Added unit tests for the service and project restructure updated to use the benefits of webpack and bundling.
Recovery fix and added interfaces.
declare class PubSubService{
private events: Object;
$pub(event: string, eventObject?: any): void;
$sub: {
(): undefined;
(event: string): Observable<any>;
(event: string, callback: (value: any) => void): Subscription;
(event: string, callback: (value: any) => void, error: (error: any) => void): Subscription;
(event: string, callback: (value: any) => void, error: (error: any) => void, complete: () => void): Subscription;
}
}
Added overload to $sub method for to be useful.
declare class PubSubService{
private events: Object;
$pub(event: string, eventObject?: any): void;
$sub(event: string): <Observable<any>>;
$sub(event: string, callback: (value: any) => void, error?: (error: any) => void, complete?: () => void): Subscription;
}
A simple publisher/subscriber service.
declare class PubSubService{
private events: Object;
$pub(event: string, eventObject?: any): void;
$sub(event: string): <Observable<any>>;
$sub(event: string, callback: (value: any) => void, error?: (error: any) => void, complete?: () => void): Subscription;
}