docs(*): Document a lot more symbols that are missing comments in our generated docs.

This commit is contained in:
Alex Rickabaugh
2015-12-03 15:49:09 -08:00
parent 5a04ffec3e
commit 80a5e47e61
65 changed files with 793 additions and 22 deletions

View File

@ -1,6 +1,10 @@
import {Injectable} from 'angular2/core';
// Make sure not to evaluate this in a non-browser environment!
/**
* A backend for http that uses the `XMLHttpRequest` browser API.
*
* Take care not to evaluate this in non-browser contexts.
*/
@Injectable()
export class BrowserXhr {
constructor() {}

View File

@ -12,10 +12,29 @@ import {Observable} from 'rxjs/Observable';
const JSONP_ERR_NO_CALLBACK = 'JSONP injected script did not invoke callback.';
const JSONP_ERR_WRONG_METHOD = 'JSONP requests must use GET request method.';
/**
* Abstract base class for an in-flight JSONP request.
*/
export abstract class JSONPConnection implements Connection {
/**
* The {@link ReadyState} of this request.
*/
readyState: ReadyState;
/**
* The outgoing HTTP request.
*/
request: Request;
/**
* An observable that completes with the response, when the request is finished.
*/
response: Observable<Response>;
/**
* Callback called when the JSONP request completes, to notify the application
* of the new data.
*/
abstract finished(data?: any): void;
}
@ -111,6 +130,9 @@ export class JSONPConnection_ extends JSONPConnection {
}
}
/**
* A {@link ConnectionBackend} that uses the JSONP strategy of making requests.
*/
export abstract class JSONPBackend extends ConnectionBackend {}
@Injectable()

View File

@ -35,7 +35,7 @@ function mergeOptions(defaultOpts, providedOpts, method, url): RequestOptions {
* Performs http requests using `XMLHttpRequest` as the default backend.
*
* `Http` is available as an injectable class, with methods to perform http requests. Calling
* `request` returns an {@link Observable} which will emit a single {@link Response} when a
* `request` returns an `Observable` which will emit a single {@link Response} when a
* response is received.
*
* ### Example