# @types/rx.wamp

> TypeScript definitions for rx.wamp

Latest version **0.5.9** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/rx.wamp
pnpm add @types/rx.wamp
yarn add @types/rx.wamp
bun add @types/rx.wamp
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.5.9 |
| Published | 2023-11-07 |
| First published | 2016-08-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 7.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51466 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/rx.wamp
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rx.wamp
- npm.io page: https://npm.io/package/@types/rx.wamp

## Dependencies (2)

- [@types/rx](https://npm.io/package/@types/rx.md) *
- [@types/autobahn](https://npm.io/package/@types/autobahn.md) *

## Recent versions

- 0.5.9 (latest) — 2023-11-07
- 0.5.6 (ts3.6) — 2021-07-08
- 0.5.5 (ts2.0) — 2017-08-21
- 0.5.8 — 2023-10-18
- 0.5.7 — 2023-09-27
- 0.5.4 — 2016-09-19
- 0.5.3 — 2016-08-25
- 0.5.2 — 2016-08-19
- 0.5.1 — 2016-08-02

## README

# Installation
> `npm install --save @types/rx.wamp`

# Summary
This package contains type definitions for rx.wamp (https://github.com/paulpdaniels/rx.wamp/).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rx.wamp.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rx.wamp/index.d.ts)
````ts
import autobahn = require("autobahn");
import * as Rx from "rx";

interface IWampEvent {
    args?: any[] | undefined;
    kwargs?: any;
    details?: autobahn.IEvent | undefined;
}

interface IObservableWampStatic {
    fromConnection(
        options: autobahn.IConnectionOptions,
        keepReconnecting?: boolean,
        factory?: (options?: autobahn.IConnectionOptions) => autobahn.Connection,
    ): Rx.Observable<autobahn.Session>;
    fromPubSubPattern(
        session: autobahn.Session,
        topic: string,
        options: autobahn.ISubscribeOptions,
        openObserver?: Rx.IObserver<autobahn.ISubscription>,
    ): IPubSubSubject;

    subscriber(sessionOrObservable: autobahn.Session | Rx.Observable<any>): Subscriber;
    subscribeAsObservable(
        sessionOrObservable: autobahn.Session | Rx.Observable<autobahn.Session>,
        topic: string,
        options?: autobahn.ISubscribeOptions,
        openObserver?: Rx.IObserver<autobahn.ISubscription>,
    ): Rx.Observable<IWampEvent>;
    publishAsObservable(
        session: autobahn.Session,
        topic: string,
        args?: any[],
        kwargs?: any,
        options?: autobahn.IPublishOptions,
    ): Rx.Observable<autobahn.IPublication>;
    registerAsObservable(
        sessionOrObservable: autobahn.Session | Rx.Observable<autobahn.Session>,
        procedure: string,
        endpoint: autobahn.RegisterEndpoint,
        options: autobahn.IRegisterOptions,
    ): Rx.Observable<autobahn.IRegistration>;
    callAsObservable<TResult>(
        session: autobahn.Session,
        procedure: string,
        options?: autobahn.ICallOptions,
    ): (args?: any[], kwargs?: any) => Rx.Observable<TResult>;
}

declare class Subscriber {
    to(
        topic: string,
        options: autobahn.ISubscribeOptions,
        observerOrOnNext?: Rx.IObserver<IWampEvent> | ((value: IWampEvent) => void),
        onError?: (exception: any) => void,
        onCompleted?: () => void,
    ): Subscriber;

    dispose(): void;
}

interface IPubSubSubject extends Rx.Observable<IWampEvent>, Rx.Observer<IWampEvent> {
    observable: Rx.Observable<IWampEvent>;
    observer: Rx.Observer<IWampEvent>;
    errors: Rx.IObservable<autobahn.IError>;
    opened: Rx.IObservable<autobahn.ISubscription>;
}

export as namespace RxWamp;

declare module "rx" {
    // Patch ObservableStatic to contain observableWamp methods.
    interface ObservableStatic extends IObservableWampStatic {}
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: [@types/autobahn](https://npmjs.com/package/@types/autobahn), [@types/rx](https://npmjs.com/package/@types/rx)

# Credits
These definitions were written by [Elad Zelingher](https://github.com/darkl).

---
_Source: https://npm.io/package/@types/rx.wamp · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
