| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent ec0530b commit 5dc60f1
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | export declare class TempScopedNodeJsSyncHost extends virtualFs.ScopedHost<fs.Stats> { | |
| 2 | 2 | protected _root: Path; | |
| 3 | - protected _sync: virtualFs.SyncDelegateHost<fs.Stats>; | ||
| 3 | + protected _sync?: virtualFs.SyncDelegateHost<fs.Stats>; | ||
| 4 | 4 | get files(): Path[]; | |
| 5 | 5 | get root(): Path; | |
| 6 | 6 | get sync(): virtualFs.SyncDelegateHost<fs.Stats>; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -160,8 +160,8 @@ export class NodeJsAsyncHost implements virtualFs.Host<fs.Stats> { | |||
| 160 | 160 | } | |
| 161 | 161 | ||
| 162 | 162 | list(path: Path): Observable<PathFragment[]> { | |
| 163 | - return _callFs(fs.readdir, getSystemPath(path)).pipe( | ||
| 164 | - map((names: string[]) => names.map(name => fragment(name))), | ||
| 163 | + return _callFs<string[], string>(fs.readdir, getSystemPath(path)).pipe( | ||
| 164 | + map((names) => names.map(name => fragment(name))), | ||
| 165 | 165 | ); | |
| 166 | 166 | } | |
| 167 | 167 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,7 +15,7 @@ import { NodeJsSyncHost } from '../host'; | |||
| 15 | 15 | * A Sync Scoped Host that creates a temporary directory and scope to it. | |
| 16 | 16 | */ | |
| 17 | 17 | export class TempScopedNodeJsSyncHost extends virtualFs.ScopedHost<fs.Stats> { | |
| 18 | - protected _sync: virtualFs.SyncDelegateHost<fs.Stats>; | ||
| 18 | + protected _sync?: virtualFs.SyncDelegateHost<fs.Stats>; | ||
| 19 | 19 | protected _root: Path; | |
| 20 | 20 | ||
| 21 | 21 | constructor() { | |
@@ -30,8 +30,8 @@ export class TempScopedNodeJsSyncHost extends virtualFs.ScopedHost<fs.Stats> { | |||
| 30 | 30 | const sync = this.sync; | |
| 31 | 31 | function _visit(p: Path): Path[] { | |
| 32 | 32 | return sync.list(p) | |
| 33 | - .map((fragment: PathFragment) => join(p, fragment)) | ||
| 34 | - .reduce((files: Path[], path: PathFragment) => { | ||
| 33 | + .map((fragment) => join(p, fragment)) | ||
| 34 | + .reduce((files, path) => { | ||
| 35 | 35 | if (sync.isDirectory(path)) { | |
| 36 | 36 | return files.concat(_visit(path)); | |
| 37 | 37 | } else { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments