@@ -19,7 +19,8 @@ import {
1919import * as fs from 'fs' ;
2020import { Observable } from 'rxjs/Observable' ;
2121import { ArrayObservable } from 'rxjs/observable/ArrayObservable' ;
22- import { FromObservable } from 'rxjs/observable/FromObservable' ;
22+ import { empty } from 'rxjs/observable/empty' ;
23+ import { from as observableFrom } from 'rxjs/observable/from' ;
2324import { concat } from 'rxjs/operators/concat' ;
2425import { concatMap } from 'rxjs/operators/concatMap' ;
2526import { ignoreElements } from 'rxjs/operators/ignoreElements' ;
@@ -131,11 +132,11 @@ export class NodeJsAsyncHost implements virtualFs.Host<fs.Stats> {
131132 } ;
132133 _recurseList ( path ) ;
133134
134- return FromObservable . create ( allFiles )
135+ return observableFrom ( allFiles )
135136 . pipe (
136137 mergeMap ( p => _callFs ( fs . unlink , this . _getSystemPath ( p ) ) ) ,
137138 ignoreElements ( ) ,
138- concat ( FromObservable . create ( allDirs ) . pipe (
139+ concat ( observableFrom ( allDirs ) . pipe (
139140 concatMap ( p => _callFs ( fs . rmdir , this . _getSystemPath ( p ) ) ) ,
140141 ) ) ,
141142 map ( ( ) => { } ) ,
@@ -251,7 +252,7 @@ export class NodeJsSyncHost implements virtualFs.Host<fs.Stats> {
251252 _createDir ( dirname ( path ) ) ;
252253 fs . writeFileSync ( this . _getSystemPath ( path ) , new Uint8Array ( content ) ) ;
253254
254- return Observable . empty < void > ( ) ;
255+ return empty < void > ( ) ;
255256 }
256257
257258 read ( path : Path ) : Observable < virtualFs . FileBuffer > {
@@ -271,13 +272,13 @@ export class NodeJsSyncHost implements virtualFs.Host<fs.Stats> {
271272 fs . unlinkSync ( this . _getSystemPath ( path ) ) ;
272273 }
273274
274- return Observable . empty ( ) ;
275+ return empty ( ) ;
275276 }
276277
277278 rename ( from : Path , to : Path ) : Observable < void > {
278279 fs . renameSync ( this . _getSystemPath ( from ) , this . _getSystemPath ( to ) ) ;
279280
280- return Observable . empty ( ) ;
281+ return empty ( ) ;
281282 }
282283
283284 list ( path : Path ) : Observable < PathFragment [ ] > {
@@ -292,11 +293,11 @@ export class NodeJsSyncHost implements virtualFs.Host<fs.Stats> {
292293
293294 isDirectory ( path : Path ) : Observable < boolean > {
294295 // tslint:disable-next-line:non-null-operator
295- return this . stats ( path ) ! . map ( stat => stat . isDirectory ( ) ) ;
296+ return this . stats ( path ) ! . pipe ( map ( stat => stat . isDirectory ( ) ) ) ;
296297 }
297298 isFile ( path : Path ) : Observable < boolean > {
298299 // tslint:disable-next-line:non-null-operator
299- return this . stats ( path ) ! . map ( stat => stat . isFile ( ) ) ;
300+ return this . stats ( path ) ! . pipe ( map ( stat => stat . isFile ( ) ) ) ;
300301 }
301302
302303 // Some hosts may not support stats.
0 commit comments