mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
RSocket - Fix incorrect return types (#36723)
This commit is contained in:
parent
f1fe339b6e
commit
bdb71cddca
8
types/rsocket-core/RSocketClient.d.ts
vendored
8
types/rsocket-core/RSocketClient.d.ts
vendored
@ -27,17 +27,17 @@ export interface ClientConfig<D, M> {
|
||||
*/
|
||||
export default class RSocketClient<D, M> {
|
||||
constructor(config: ClientConfig<D, M>);
|
||||
close(): undefined;
|
||||
close(): void;
|
||||
connect(): Single<ReactiveSocket<D, M>>;
|
||||
}
|
||||
|
||||
export class RSocketClientSocket<D, M> implements ReactiveSocket<D, M> {
|
||||
constructor(config: ClientConfig<D, M>, connection: DuplexConnection);
|
||||
fireAndForget(payload: Payload<D, M>): undefined;
|
||||
fireAndForget(payload: Payload<D, M>): void;
|
||||
requestResponse(payload: Payload<D, M>): Single<Payload<D, M>>;
|
||||
requestStream(payload: Payload<D, M>): Flowable<Payload<D, M>>;
|
||||
requestChannel(payloads: Flowable<Payload<D, M>>): Flowable<Payload<D, M>>;
|
||||
metadataPush(payload: Payload<D, M>): Single<undefined>;
|
||||
close(): undefined;
|
||||
metadataPush(payload: Payload<D, M>): Single<void>;
|
||||
close(): void;
|
||||
connectionStatus(): Flowable<ConnectionStatus>;
|
||||
}
|
||||
|
||||
16
types/rsocket-flowable/Single.d.ts
vendored
16
types/rsocket-flowable/Single.d.ts
vendored
@ -1,15 +1,15 @@
|
||||
export type Source<T> = (subject: IFutureSubject<T>) => undefined;
|
||||
export type CancelCallback = () => undefined;
|
||||
export type Source<T> = (subject: IFutureSubject<T>) => void;
|
||||
export type CancelCallback = () => void;
|
||||
|
||||
export interface IFutureSubscriber<T> {
|
||||
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<T> {
|
||||
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
|
||||
|
||||
@ -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<any>);
|
||||
start(): Flowable<DuplexConnection>;
|
||||
stop(): undefined;
|
||||
stop(): void;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user