mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-03 09:35:40 -05:00
Merge from vscode 7eaf220cafb9d9e901370ffce02229171cbf3ea6
This commit is contained in:
committed by
Anthony Dresser
parent
39d9eed585
commit
a63578e6f7
@@ -82,9 +82,9 @@ export interface IWorkspaceFoldersChangeEvent {
|
||||
|
||||
export namespace IWorkspace {
|
||||
export function isIWorkspace(thing: unknown): thing is IWorkspace {
|
||||
return thing && typeof thing === 'object'
|
||||
return !!(thing && typeof thing === 'object'
|
||||
&& typeof (thing as IWorkspace).id === 'string'
|
||||
&& Array.isArray((thing as IWorkspace).folders);
|
||||
&& Array.isArray((thing as IWorkspace).folders));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,10 +127,10 @@ export interface IWorkspaceFolderData {
|
||||
|
||||
export namespace IWorkspaceFolder {
|
||||
export function isIWorkspaceFolder(thing: unknown): thing is IWorkspaceFolder {
|
||||
return thing && typeof thing === 'object'
|
||||
return !!(thing && typeof thing === 'object'
|
||||
&& URI.isUri((thing as IWorkspaceFolder).uri)
|
||||
&& typeof (thing as IWorkspaceFolder).name === 'string'
|
||||
&& typeof (thing as IWorkspaceFolder).toResource === 'function';
|
||||
&& typeof (thing as IWorkspaceFolder).toResource === 'function');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user