Skip to content

Commit

Permalink
Changed naming according to review
Browse files Browse the repository at this point in the history
  • Loading branch information
kyubisation committed Jun 16, 2019
1 parent 9508f29 commit 312492c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions src/comlink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@

import {
Endpoint,
EventSource,
Message,
MessageType,
PostMessageWithOrigin,
WireValue,
WireValueType,
WindowLike
WireValueType
} from "./protocol.js";
export { Endpoint };

Expand Down Expand Up @@ -247,8 +248,8 @@ export function proxy<T>(obj: T): T & { [proxyMarker]: true } {
}

export function windowEndpoint(
w: WindowLike,
context: WindowLike = self
w: PostMessageWithOrigin,
context: EventSource = self
): Endpoint {
return {
postMessage: (msg: any, transferables: Transferable[]) =>
Expand Down
2 changes: 1 addition & 1 deletion src/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export interface EventSource {
): void;
}

export interface WindowLike extends EventSource {
export interface PostMessageWithOrigin {
postMessage(
message: any,
targetOrigin: string,
Expand Down

0 comments on commit 312492c

Please sign in to comment.