-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a951280
commit cbb5ed5
Showing
4 changed files
with
41 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { Duplex } from 'bare-stream' | ||
|
||
declare class IPC extends Duplex { | ||
constructor(port: IPCPort) | ||
} | ||
|
||
declare interface IPCPort { | ||
incoming: string | number | ||
outgoing: string | number | ||
detached: boolean | ||
|
||
connect(): IPC | ||
} | ||
|
||
declare class IPCPort { | ||
constructor(incoming: string | number, outgoing: string | number) | ||
} | ||
|
||
declare namespace IPC { | ||
export function open(): [IPCPort, IPCPort] | ||
} | ||
|
||
export = IPC |
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,5 @@ | ||
declare class IPCError extends Error { | ||
static ALREADY_CONNECTED(msg: string): IPCError | ||
} | ||
|
||
export = IPCError |
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