chore(examples): fix implied imports in examples for testing built typings

This commit is contained in:
Jason Kurian 2016-03-23 20:34:15 -04:00 committed by Jason Kurian
parent 09f4d6f52d
commit 440aca86a3
9 changed files with 15 additions and 10 deletions

View File

@ -38,7 +38,7 @@ export class AsyncPipeExample {
@Component({selector: "task-cmp", template: "Time: {{ time | async }}"}) @Component({selector: "task-cmp", template: "Time: {{ time | async }}"})
class Task { class Task {
time = new Observable<number>((observer: Subscriber<number>) => { time = new Observable<number>((observer: Subscriber<number>) => {
setInterval(_ => observer.next(new Date().getTime()), 500); setInterval(() => observer.next(new Date().getTime()), 500);
}); });
} }
// #enddocregion // #enddocregion

View File

@ -2,7 +2,7 @@
import {Observable, Subscriber} from 'rxjs/Rx'; import {Observable, Subscriber} from 'rxjs/Rx';
var obs = new Observable<number>((obs: Subscriber<number>) => { var obs = new Observable<number>((obs: Subscriber<number>) => {
var i = 0; var i = 0;
setInterval(_ => { obs.next(++i); }, 1000); setInterval(() => { obs.next(++i); }, 1000);
}); });
obs.subscribe(i => console.log(`${i} seconds elapsed`)); obs.subscribe((i) => console.log(`${i} seconds elapsed`));
// #enddocregion // #enddocregion

View File

@ -4,7 +4,7 @@ import 'rxjs/add/operator/map';
var obs = new Observable<number>((obs: Subscriber<any>) => { var obs = new Observable<number>((obs: Subscriber<any>) => {
var i = 0; var i = 0;
setInterval(_ => obs.next(++i), 1000); setInterval(() => obs.next(++i), 1000);
}); });
obs.map((i: number) => `${i} seconds elapsed`).subscribe(msg => console.log(msg)); obs.map((i: number) => `${i} seconds elapsed`).subscribe(msg => console.log(msg));
// #enddocregion // #enddocregion

View File

@ -4,7 +4,7 @@ import {map} from 'rxjs/operator/map';
var obs = new Observable<number>((sub: Subscriber<number>) => { var obs = new Observable<number>((sub: Subscriber<number>) => {
var i = 0; var i = 0;
setInterval(_ => sub.next(++i), 1000); setInterval(() => sub.next(++i), 1000);
}); });
map.call(obs, (i: number) => `${i} seconds elapsed`).subscribe((msg: string) => console.log(msg)); map.call(obs, (i: number) => `${i} seconds elapsed`).subscribe((msg: string) => console.log(msg));
// #enddocregion // #enddocregion

View File

@ -1,4 +1,5 @@
import {verifyNoBrowserErrors} from 'angular2/src/testing/e2e_util'; import {verifyNoBrowserErrors, browser} from 'angular2/src/testing/e2e_util';
import {expect} from 'angular2/testing';
function waitForElement(selector: string) { function waitForElement(selector: string) {
var EC = (<any>protractor).ExpectedConditions; var EC = (<any>protractor).ExpectedConditions;

View File

@ -1,4 +1,5 @@
import {verifyNoBrowserErrors} from 'angular2/src/testing/e2e_util'; import {verifyNoBrowserErrors, browser} from 'angular2/src/testing/e2e_util';
import {expect} from 'angular2/testing';
function waitForElement(selector: string) { function waitForElement(selector: string) {
var EC = (<any>protractor).ExpectedConditions; var EC = (<any>protractor).ExpectedConditions;

View File

@ -1,4 +1,5 @@
import {verifyNoBrowserErrors} from 'angular2/src/testing/e2e_util'; import {verifyNoBrowserErrors, browser} from 'angular2/src/testing/e2e_util';
import {expect} from 'angular2/testing';
function waitForElement(selector: string) { function waitForElement(selector: string) {
var EC = (<any>protractor).ExpectedConditions; var EC = (<any>protractor).ExpectedConditions;

View File

@ -1,4 +1,5 @@
import {verifyNoBrowserErrors} from 'angular2/src/testing/e2e_util'; import {verifyNoBrowserErrors, browser} from 'angular2/src/testing/e2e_util';
import {expect} from 'angular2/testing';
function waitForElement(selector: string) { function waitForElement(selector: string) {
var EC = (<any>protractor).ExpectedConditions; var EC = (<any>protractor).ExpectedConditions;

View File

@ -1,4 +1,5 @@
import {verifyNoBrowserErrors} from 'angular2/src/testing/e2e_util'; import {verifyNoBrowserErrors, browser} from 'angular2/src/testing/e2e_util';
import {expect} from 'angular2/testing';
function waitForElement(selector: string) { function waitForElement(selector: string) {
var EC = (<any>protractor).ExpectedConditions; var EC = (<any>protractor).ExpectedConditions;