-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
returns from listener to align to type from chrome, asserts message t…
…ype in listener (#1434)
- Loading branch information
1 parent
ca99ede
commit 30236e3
Showing
4 changed files
with
28 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { ExternalRequest, Response } from "@shared/api/types"; | ||
|
||
export const isResponse = ( | ||
message: ExternalRequest | Response, | ||
): message is Response => { | ||
return "messagedId" in message; | ||
}; | ||
|
||
export const isExternalMessage = ( | ||
message: ExternalRequest | Response, | ||
): message is ExternalRequest => { | ||
return !("messagedId" in message); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters