Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public async useNamedPipe(logic: (context: TurnContext) => Promise, pipeName: string = defaultPipeName): Promise {
if (!logic) {
throw new Error('Bot logic needs to be provided to `useNamedPipe`');
}
this.logic = logic;
this.streamingServer = new NamedPipeServer(pipeName, this);
await this.streamingServer.start();
}