Skip to content

Commit 7f58924

Browse files
committed
Revert "fix strict null errors"
This reverts commit 9ea18e6.
1 parent 9ea18e6 commit 7f58924

3 files changed

Lines changed: 10 additions & 11 deletions

File tree

src/tsconfig.strictNullChecks.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,6 @@
431431
"./vs/platform/update/node/update.config.contribution.ts",
432432
"./vs/platform/url/common/url.ts",
433433
"./vs/platform/url/common/urlService.ts",
434-
"./vs/platform/windows/common/windows.ts",
435434
"./vs/platform/workbench/common/contextkeys.ts",
436435
"./vs/platform/workspace/common/workspace.ts",
437436
"./vs/platform/workspace/test/common/testWorkspace.ts",

src/vs/platform/storage/common/storage.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export interface IStorageService {
3030
* The scope argument allows to define the scope of the storage
3131
* operation to either the current workspace only or all workspaces.
3232
*/
33-
get<R extends string | undefined>(key: string, scope: StorageScope, fallbackValue?: R): R;
33+
get(key: string, scope: StorageScope, fallbackValue?: string): string | undefined;
3434

3535
/**
3636
* Retrieve an element stored with the given key from storage. Use
@@ -40,7 +40,7 @@ export interface IStorageService {
4040
* The scope argument allows to define the scope of the storage
4141
* operation to either the current workspace only or all workspaces.
4242
*/
43-
getBoolean<R extends boolean | undefined>(key: string, scope: StorageScope, fallbackValue?: R): R;
43+
getBoolean(key: string, scope: StorageScope, fallbackValue?: boolean): boolean | undefined;
4444

4545
/**
4646
* Retrieve an element stored with the given key from storage. Use
@@ -50,7 +50,7 @@ export interface IStorageService {
5050
* The scope argument allows to define the scope of the storage
5151
* operation to either the current workspace only or all workspaces.
5252
*/
53-
getInteger<R extends number | undefined>(key: string, scope: StorageScope, fallbackValue?: R): R;
53+
getInteger(key: string, scope: StorageScope, fallbackValue?: number): number | undefined;
5454

5555
/**
5656
* Store a string value under the given key to storage. The value will
@@ -94,16 +94,16 @@ export const NullStorageService: IStorageService = {
9494
onDidChangeStorage: Event.None,
9595
onWillSaveState: Event.None,
9696

97-
get<R extends string | undefined>(key: string, scope: StorageScope, fallbackValue?: R): R {
98-
return fallbackValue as R;
97+
get(key: string, scope: StorageScope, fallbackValue?: string): string | undefined {
98+
return fallbackValue;
9999
},
100100

101-
getBoolean<R extends boolean | undefined>(key: string, scope: StorageScope, fallbackValue?: R): R {
102-
return fallbackValue as R;
101+
getBoolean(key: string, scope: StorageScope, fallbackValue?: boolean): boolean | undefined {
102+
return fallbackValue;
103103
},
104104

105-
getInteger<R extends number | undefined>(key: string, scope: StorageScope, fallbackValue?: R): R {
106-
return fallbackValue as R;
105+
getInteger(key: string, scope: StorageScope, fallbackValue?: number): number | undefined {
106+
return fallbackValue;
107107
},
108108

109109
store(key: string, value: any, scope: StorageScope): Promise<void> {

src/vs/platform/windows/common/windows.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ export class ActiveWindowManager implements IDisposable {
379379
.then(id => (typeof this._activeWindowId === 'undefined') && this.setActiveWindow(id));
380380
}
381381

382-
private setActiveWindow(windowId: number | undefined) {
382+
private setActiveWindow(windowId: number) {
383383
if (this.firstActiveWindowIdPromise) {
384384
this.firstActiveWindowIdPromise = null;
385385
}

0 commit comments

Comments
 (0)