refactor(EventEmitter): rename .next() to .emit()
BREAKING CHANGE: EventEmitter#next(value) is deprecated, use EventEmitter#emit(value) instead. Closes #4287 Closes #5302
This commit is contained in:
@ -19,7 +19,7 @@ export class SpyLocation implements Location {
|
||||
|
||||
path(): string { return this._path; }
|
||||
|
||||
simulateUrlPop(pathname: string) { ObservableWrapper.callNext(this._subject, {'url': pathname}); }
|
||||
simulateUrlPop(pathname: string) { ObservableWrapper.callEmit(this._subject, {'url': pathname}); }
|
||||
|
||||
prepareExternalUrl(url: string): string {
|
||||
if (url.length > 0 && !url.startsWith('/')) {
|
||||
|
@ -13,7 +13,7 @@ export class MockLocationStrategy extends LocationStrategy {
|
||||
|
||||
simulatePopState(url: string): void {
|
||||
this.internalPath = url;
|
||||
ObservableWrapper.callNext(this._subject, null);
|
||||
ObservableWrapper.callEmit(this._subject, null);
|
||||
}
|
||||
|
||||
path(): string { return this.internalPath; }
|
||||
@ -26,7 +26,7 @@ export class MockLocationStrategy extends LocationStrategy {
|
||||
}
|
||||
|
||||
simulateUrlPop(pathname: string): void {
|
||||
ObservableWrapper.callNext(this._subject, {'url': pathname});
|
||||
ObservableWrapper.callEmit(this._subject, {'url': pathname});
|
||||
}
|
||||
|
||||
pushState(ctx: any, title: string, path: string, query: string): void {
|
||||
|
Reference in New Issue
Block a user