diff --git a/fsprovider-sample/src/fileSystemProvider.ts b/fsprovider-sample/src/fileSystemProvider.ts index c6699d1a..68844887 100644 --- a/fsprovider-sample/src/fileSystemProvider.ts +++ b/fsprovider-sample/src/fileSystemProvider.ts @@ -152,14 +152,16 @@ export class MemFS implements vscode.FileSystemProvider { // --- lookup - private _lookup(uri: vscode.Uri, silent: boolean): Entry { + private _lookup(uri: vscode.Uri, silent: false): Entry; + private _lookup(uri: vscode.Uri, silent: boolean): Entry | undefined; + private _lookup(uri: vscode.Uri, silent: boolean): Entry | undefined { let parts = uri.path.split('/'); let entry: Entry = this.root; for (const part of parts) { if (!part) { continue; } - let child: Entry; + let child: Entry | undefined; if (entry instanceof Directory) { child = entry.entries.get(part); } diff --git a/fsprovider-sample/tsconfig.json b/fsprovider-sample/tsconfig.json index 11282c9a..79b70855 100644 --- a/fsprovider-sample/tsconfig.json +++ b/fsprovider-sample/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "strictNullChecks": true, "module": "commonjs", "target": "es6", "outDir": "out", @@ -13,4 +14,4 @@ "node_modules", ".vscode-test" ] -} \ No newline at end of file +}