From bdb71cddca961572334edce45b32f65c59553360 Mon Sep 17 00:00:00 2001 From: Adrian Hope-Bailie Date: Mon, 8 Jul 2019 23:09:33 +0200 Subject: [PATCH] RSocket - Fix incorrect return types (#36723) --- types/rsocket-core/RSocketClient.d.ts | 8 ++++---- types/rsocket-flowable/Single.d.ts | 16 ++++++++-------- types/rsocket-tcp-server/RSocketTCPServer.d.ts | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/types/rsocket-core/RSocketClient.d.ts b/types/rsocket-core/RSocketClient.d.ts index 0fd2517b9f..d794bd182d 100644 --- a/types/rsocket-core/RSocketClient.d.ts +++ b/types/rsocket-core/RSocketClient.d.ts @@ -27,17 +27,17 @@ export interface ClientConfig { */ export default class RSocketClient { constructor(config: ClientConfig); - close(): undefined; + close(): void; connect(): Single>; } export class RSocketClientSocket implements ReactiveSocket { constructor(config: ClientConfig, connection: DuplexConnection); - fireAndForget(payload: Payload): undefined; + fireAndForget(payload: Payload): void; requestResponse(payload: Payload): Single>; requestStream(payload: Payload): Flowable>; requestChannel(payloads: Flowable>): Flowable>; - metadataPush(payload: Payload): Single; - close(): undefined; + metadataPush(payload: Payload): Single; + close(): void; connectionStatus(): Flowable; } diff --git a/types/rsocket-flowable/Single.d.ts b/types/rsocket-flowable/Single.d.ts index f5679c5acc..f4c566c0df 100644 --- a/types/rsocket-flowable/Single.d.ts +++ b/types/rsocket-flowable/Single.d.ts @@ -1,15 +1,15 @@ -export type Source = (subject: IFutureSubject) => undefined; -export type CancelCallback = () => undefined; +export type Source = (subject: IFutureSubject) => void; +export type CancelCallback = () => void; export interface IFutureSubscriber { - onComplete: (value: T) => undefined; - onError: (error: Error) => undefined; - onSubscribe: (cancel: CancelCallback) => undefined; + onComplete: (value: T) => void; + onError: (error: Error) => void; + onSubscribe: (cancel: CancelCallback) => void; } export interface IFutureSubject { - onComplete: (value: T) => undefined; - onError: (error: Error) => undefined; - onSubscribe: (cancel: CancelCallback | null | undefined) => undefined; + onComplete: (value: T) => void; + onError: (error: Error) => void; + onSubscribe: (cancel: CancelCallback | null | undefined) => void; } /** * Represents a lazy computation that will either produce a value of type T diff --git a/types/rsocket-tcp-server/RSocketTCPServer.d.ts b/types/rsocket-tcp-server/RSocketTCPServer.d.ts index ba09573376..410a938fdd 100644 --- a/types/rsocket-tcp-server/RSocketTCPServer.d.ts +++ b/types/rsocket-tcp-server/RSocketTCPServer.d.ts @@ -8,7 +8,7 @@ import { Flowable } from 'rsocket-flowable'; export interface ServerOptions { host?: string; port: number; - serverFactory?: (onConnect: (socket: net.Socket) => undefined) => net.Server; + serverFactory?: (onConnect: (socket: net.Socket) => void) => net.Server; } /** @@ -19,5 +19,5 @@ export interface ServerOptions { export default class RSocketTCPServer implements TransportServer { constructor(options: ServerOptions, encoders?: Encoders); start(): Flowable; - stop(): undefined; + stop(): void; }