Skip to content

Commit

Permalink
refactor(operators): expand usage of const over let for variables
Browse files Browse the repository at this point in the history
  • Loading branch information
kwonoj committed Dec 15, 2015
1 parent 4a66725 commit c5d8d88
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/testing/ColdObservable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class ColdObservable<T> extends Observable<T> implements SubscriptionLogg
scheduleMessages(subscriber) {
const messagesLength = this.messages.length;
for (let i = 0; i < messagesLength; i++) {
let message = this.messages[i];
const message = this.messages[i];
subscriber.add(
this.scheduler.schedule(({message, subscriber}) => { message.notification.observe(subscriber); },
message.frame,
Expand Down
14 changes: 7 additions & 7 deletions src/util/MapPolyfill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ export class MapPolyfill {
private _values = [];
private _keys = [];

get(key) {
let i = this._keys.indexOf(key);
get(key): any {
const i = this._keys.indexOf(key);
return i === -1 ? undefined : this._values[i];
}

set(key, value) {
let i = this._keys.indexOf(key);
set(key, value): any {
const i = this._keys.indexOf(key);
if (i === -1) {
this._keys.push(key);
this._values.push(value);
Expand All @@ -20,16 +20,16 @@ export class MapPolyfill {
return this;
}

delete(key) {
let i = this._keys.indexOf(key);
delete(key): boolean {
const i = this._keys.indexOf(key);
if (i === -1) { return false; }
this._values.splice(i, 1);
this._keys.splice(i, 1);
this.size--;
return true;
}

forEach(cb, thisArg) {
forEach(cb, thisArg): void {
for (let i = 0; i < this.size; i++) {
cb.call(thisArg, this._values[i], this._keys[i]);
}
Expand Down
2 changes: 1 addition & 1 deletion src/util/tryCatch.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {errorObject} from './errorObject';

let tryCatchTarget;
let tryCatchTarget: Function;

function tryCatcher(): any {
try {
Expand Down

0 comments on commit c5d8d88

Please sign in to comment.