mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(devtools): run ng-dev format on angular devtools files
Formats the entire devtools directory with the ng-dev formatting tool. Previously we relied on prettier, so this commit also remove prettier from devtools' dependencies.
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import { MessageBus, Events, Parameters } from 'protocol';
|
||||
import {Events, MessageBus, Parameters} from 'protocol';
|
||||
|
||||
type AnyEventCallback<Ev> = <E extends keyof Ev>(topic: E, args: Parameters<Ev[E]>) => void;
|
||||
|
||||
export class IFrameMessageBus extends MessageBus<Events> {
|
||||
private _listeners: any[] = [];
|
||||
|
||||
constructor(private _source: string, private _destination: string, private _docWindow: () => Window) {
|
||||
constructor(
|
||||
private _source: string, private _destination: string, private _docWindow: () => Window) {
|
||||
super();
|
||||
}
|
||||
|
||||
@@ -56,13 +57,12 @@ export class IFrameMessageBus extends MessageBus<Events> {
|
||||
|
||||
emit<E extends keyof Events>(topic: E, args?: Parameters<Events[E]>): boolean {
|
||||
this._docWindow().postMessage(
|
||||
{
|
||||
source: this._source,
|
||||
topic,
|
||||
args,
|
||||
},
|
||||
'*'
|
||||
);
|
||||
{
|
||||
source: this._source,
|
||||
topic,
|
||||
args,
|
||||
},
|
||||
'*');
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user