mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-04-27 16:55:44 +08:00
enable strictNull-checks
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"strictNullChecks": true,
|
||||
"module": "commonjs",
|
||||
"target": "es6",
|
||||
"outDir": "out",
|
||||
@ -13,4 +14,4 @@
|
||||
"node_modules",
|
||||
".vscode-test"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user