diff --git a/types/rsocket-websocket-client/RSocketWebSocketClient.d.ts b/types/rsocket-websocket-client/RSocketWebSocketClient.d.ts index 65fd4db112..d1894fe8ff 100644 --- a/types/rsocket-websocket-client/RSocketWebSocketClient.d.ts +++ b/types/rsocket-websocket-client/RSocketWebSocketClient.d.ts @@ -12,15 +12,22 @@ import { } from 'rsocket-core'; import * as ws from 'ws'; +export interface ClientOptions { + url: string; + wsCreator?: (url: string) => WebSocket; + debug?: boolean; + lengthPrefixedFrames?: boolean; +} + /** * A WebSocket transport client for use in browser environments. */ export default class RSocketWebSocketClient implements DuplexConnection { - constructor(options: ws.ClientOptions, encoders?: Encoders) - close(): void; - connect(): void; - connectionStatus(): Flowable; - receive(): Flowable; - sendOne(frame: Frame): void; - send(frames: Flowable): void; -} + constructor(options: ClientOptions, encoders?: Encoders); + close(): void; + connect(): void; + connectionStatus(): Flowable; + receive(): Flowable; + sendOne(frame: Frame): void; + send(frames: Flowable): void; + } diff --git a/types/rsocket-websocket-client/index.d.ts b/types/rsocket-websocket-client/index.d.ts index 0a78a0ad6b..31638e54b5 100644 --- a/types/rsocket-websocket-client/index.d.ts +++ b/types/rsocket-websocket-client/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for rsocket-websocket-client 0.0 // Project: https://github.com/rsocket/rsocket-js/ // Definitions by: Adrian Hope-Bailie +// Bryce Matheson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2