(arg1?: any, arg2?: any, arg3?: any, arg4?: any)
| 1474 | ): Connection<PConsole, PTracer, PTelemetry, PClient, PWindow, PWorkspace>; |
| 1475 | |
| 1476 | export function createConnection(arg1?: any, arg2?: any, arg3?: any, arg4?: any): IConnection { |
| 1477 | let factories: Features | undefined; |
| 1478 | let input: NodeJS.ReadableStream | MessageReader | undefined; |
| 1479 | let output: NodeJS.WritableStream | MessageWriter | undefined; |
| 1480 | let strategy: ConnectionStrategy | undefined; |
| 1481 | if (arg1 !== void 0 && (arg1 as Features).__brand === 'features') { |
| 1482 | factories = arg1; |
| 1483 | arg1 = arg2; arg2 = arg3; arg3 = arg4; |
| 1484 | } |
| 1485 | if (ConnectionStrategy.is(arg1)) { |
| 1486 | strategy = arg1; |
| 1487 | } else { |
| 1488 | input = arg1; |
| 1489 | output = arg2; |
| 1490 | strategy = arg3; |
| 1491 | } |
| 1492 | return _createConnection(input, output, strategy, factories); |
| 1493 | } |
| 1494 | |
| 1495 | function _createConnection<PConsole = _, PTracer = _, PTelemetry = _, PClient = _, PWindow = _, PWorkspace = _>( |
| 1496 | input?: NodeJS.ReadableStream | MessageReader, output?: NodeJS.WritableStream | MessageWriter, strategy?: ConnectionStrategy, |
no test coverage detected