feat(build): require parameter types

Fixes #2833
This commit is contained in:
Alex Eagle
2015-07-07 20:03:00 -07:00
parent 6d760666a9
commit de18da2a0d
81 changed files with 379 additions and 290 deletions

View File

@ -90,7 +90,7 @@ export class MockConnection {
* returned
* from {@link Http}.
*/
mockError(err?) {
mockError(err?: Error) {
// Matches XHR semantics
this.readyState = ReadyStates.DONE;
ObservableWrapper.callThrow(this.response, err);
@ -185,8 +185,8 @@ export class MockBackend {
constructor() {
this.connectionsArray = [];
this.connections = new EventEmitter();
ObservableWrapper.subscribe(this.connections,
connection => this.connectionsArray.push(connection));
ObservableWrapper.subscribe<MockConnection>(
this.connections, connection => this.connectionsArray.push(connection));
this.pendingConnections = new EventEmitter();
}
@ -207,7 +207,9 @@ export class MockBackend {
*
* This method only exists in the mock implementation, not in real Backends.
*/
resolveAllConnections() { ObservableWrapper.subscribe(this.connections, c => c.readyState = 4); }
resolveAllConnections() {
ObservableWrapper.subscribe<MockConnection>(this.connections, c => c.readyState = 4);
}
/**
* Creates a new {@link MockConnection}. This is equivalent to calling `new