Skip to content

Commit

Permalink
docs(MeteorObservable): Generated new docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dotansimha committed Dec 1, 2016
1 parent 6f3b06b commit 0b56dd6
Show file tree
Hide file tree
Showing 5 changed files with 126 additions and 64 deletions.
48 changes: 32 additions & 16 deletions dist/MeteorObservable.d.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
/// <reference types="meteor-typings" />
import { Observable } from 'rxjs';
/**
* A class with static methods, which wraps Meteor's API and returns
* RxJS Observable as return value for all Meteor's API.
* The method's signature is the same as Metoer's, except you don't
* need to provide callbacks, and you need to "subscribe" instead.
* The functionality that wrapped in this implementation is Meteor.call,
* Meteor.autorun and Meteor.subscribe.
*
* This is a class with static methods that wrap Meteor's API and return RxJS
* Observables. The methods' signatures are the same as Meteor's, with the ]
* exception that the callbacks are handled by Meteor-rxjs. Instead of
* providing callbacks, you need to subscribe to the observables that are
* returned. The methods that are wrapped in MeteorObservable are
* [Meteor.call](https://docs.meteor.com/api/methods.html#Meteor-call),
* [Meteor.autorun](https://docs.meteor.com/api/tracker.html#Tracker-autorun)
* and [Meteor.subscribe](https://docs.meteor.com/api/pubsub.html#Meteor-subscribe).
*/
export declare class MeteorObservable {
/**
* Method has the same notation as Meteor.call, only without the callbacks:
* Invokes a [Meteor Method](https://docs.meteor.com/api/methods.html)
* defined on the server, passing any number of arguments. This method has
* the same signature as
* [Meteor.call](https://docs.meteor.com/api/methods.html#Meteor-call), only
* without the callbacks:
* MeteorObservable.call(name, [...args])
*
* @param {String} name - Name of the method in the Meteor server
*
* @param {string} name - Name of the method in the Meteor server
* @param {any} args - Parameters that will be forwarded to the method.
* after the func call to initiate change detection.
* @returns {Observable<T>} - RxJS Observable, which completes when the server return a response.
* @returns {Observable<T>} - RxJS Observable, which completes when the
* server returns a response.
*
* @example <caption>Example using Angular2 Component</caption>
* class MyComponent {
* constructor() {
Expand All @@ -35,16 +43,21 @@ export declare class MeteorObservable {
*/
static call<T>(name: string, ...args: any[]): Observable<T>;
/**
* Method has the same notation as Meteor.subscribe, only without the callbacks:
* When you subscribe to a collection, it tells the server to send records to
* the client. This method has the same signature as
* [Meteor.subscribe](https://docs.meteor.com/api/pubsub.html#Meteor-subscribe),
* except without the callbacks again:
* subscribe(name, [...args])
*
* You can use this method from any Angular2 element - such as Component, Pipe or
* Service.
* You can use this method from any Angular2 element - such as Component,
* Pipe or Service.
*
* @param {String} name - Name of the publication in the Meteor server
* @param {string} name - Name of the publication in the Meteor server
* @param {any} args - Parameters that will be forwarded to the publication.
* after the func call to initiate change detection.
* @returns {Observable} - RxJS Observable, which completes when the subscription is ready.
* @returns {Observable} - RxJS Observable, which completes when the
* subscription is ready.
*
* @example <caption>Example using Angular2 Service</caption>
* class MyService {
* private meteorSubscription: Observable<any>;
Expand Down Expand Up @@ -87,7 +100,10 @@ export declare class MeteorObservable {
*/
static subscribe<T>(name: string, ...args: any[]): Observable<T>;
/**
* Method has the same notation as Meteor.autorun, only without the callback:
* Allows you to run a function every time there is a change is a reactive
* data sources. This method has the same signature as
* [Meteor.autorun](https://docs.meteor.com/api/tracker.html#Tracker-autorun),
* only without the callback:
* MeteorObservable.autorun()
*
* @returns {Observable<T>} - RxJS Observable, which trigger the subscription callback
Expand Down
48 changes: 32 additions & 16 deletions dist/MeteorObservable.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/MeteorObservable.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 32 additions & 16 deletions dist/bundles/index.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -474,25 +474,33 @@ function throwInvalidCallback(method) {
throw new Error("Invalid " + method + " arguments:\n your last param can't be a callback function, \n please remove it and use \".subscribe\" of the Observable!");
}
/**
* A class with static methods, which wraps Meteor's API and returns
* RxJS Observable as return value for all Meteor's API.
* The method's signature is the same as Metoer's, except you don't
* need to provide callbacks, and you need to "subscribe" instead.
* The functionality that wrapped in this implementation is Meteor.call,
* Meteor.autorun and Meteor.subscribe.
*
* This is a class with static methods that wrap Meteor's API and return RxJS
* Observables. The methods' signatures are the same as Meteor's, with the ]
* exception that the callbacks are handled by Meteor-rxjs. Instead of
* providing callbacks, you need to subscribe to the observables that are
* returned. The methods that are wrapped in MeteorObservable are
* [Meteor.call](https://docs.meteor.com/api/methods.html#Meteor-call),
* [Meteor.autorun](https://docs.meteor.com/api/tracker.html#Tracker-autorun)
* and [Meteor.subscribe](https://docs.meteor.com/api/pubsub.html#Meteor-subscribe).
*/
var MeteorObservable = (function () {
function MeteorObservable() {
}
/**
* Method has the same notation as Meteor.call, only without the callbacks:
* Invokes a [Meteor Method](https://docs.meteor.com/api/methods.html)
* defined on the server, passing any number of arguments. This method has
* the same signature as
* [Meteor.call](https://docs.meteor.com/api/methods.html#Meteor-call), only
* without the callbacks:
* MeteorObservable.call(name, [...args])
*
* @param {String} name - Name of the method in the Meteor server
*
* @param {string} name - Name of the method in the Meteor server
* @param {any} args - Parameters that will be forwarded to the method.
* after the func call to initiate change detection.
* @returns {Observable<T>} - RxJS Observable, which completes when the server return a response.
* @returns {Observable<T>} - RxJS Observable, which completes when the
* server returns a response.
*
* @example <caption>Example using Angular2 Component</caption>
* class MyComponent {
* constructor() {
Expand Down Expand Up @@ -531,16 +539,21 @@ var MeteorObservable = (function () {
});
};
/**
* Method has the same notation as Meteor.subscribe, only without the callbacks:
* When you subscribe to a collection, it tells the server to send records to
* the client. This method has the same signature as
* [Meteor.subscribe](https://docs.meteor.com/api/pubsub.html#Meteor-subscribe),
* except without the callbacks again:
* subscribe(name, [...args])
*
* You can use this method from any Angular2 element - such as Component, Pipe or
* Service.
* You can use this method from any Angular2 element - such as Component,
* Pipe or Service.
*
* @param {String} name - Name of the publication in the Meteor server
* @param {string} name - Name of the publication in the Meteor server
* @param {any} args - Parameters that will be forwarded to the publication.
* after the func call to initiate change detection.
* @returns {Observable} - RxJS Observable, which completes when the subscription is ready.
* @returns {Observable} - RxJS Observable, which completes when the
* subscription is ready.
*
* @example <caption>Example using Angular2 Service</caption>
* class MyService {
* private meteorSubscription: Observable<any>;
Expand Down Expand Up @@ -620,7 +633,10 @@ var MeteorObservable = (function () {
});
};
/**
* Method has the same notation as Meteor.autorun, only without the callback:
* Allows you to run a function every time there is a change is a reactive
* data sources. This method has the same signature as
* [Meteor.autorun](https://docs.meteor.com/api/tracker.html#Tracker-autorun),
* only without the callback:
* MeteorObservable.autorun()
*
* @returns {Observable<T>} - RxJS Observable, which trigger the subscription callback
Expand Down
Loading

0 comments on commit 0b56dd6

Please sign in to comment.