///
///
// TODO: rename once https://github.com/Microsoft/TypeScript/issues/52 is fixed
declare module freedom_Pipe {
interface Message {
data: ArrayBuffer
}
interface Endpoint {
address: string;
port: number;
}
}
// TODO: uncomment once https://github.com/Microsoft/TypeScript/issues/52 is fixed
// declare module freedom {
interface freedom_Pipe {
bind(
localAddress :string,
localPort :number,
remoteAddress :string,
remotePort :number,
transformerName :string,
key ?:ArrayBuffer,
config ?:string) : Promise;
send(buffer :ArrayBuffer) : Promise;
getLocalEndpoint() : Promise;
on(t:string, f:Function) : void;
on(t:'message', f:(message:freedom_Pipe.Message) => any) : void;
providePromises(provider:any) : void;
}
// }
interface Freedom {
pipe() : freedom_Pipe;
}