mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Create separate ScriptableDialogBase (#22974)
* Create separate ScriptableDialogBase * more
This commit is contained in:
@@ -8,25 +8,6 @@ import * as vscode from 'vscode';
|
||||
import { getErrorMessage } from '../utils';
|
||||
import * as localizedConstants from './localizedConstants';
|
||||
|
||||
export function deepClone<T>(obj: T): T {
|
||||
if (!obj || typeof obj !== 'object') {
|
||||
return obj;
|
||||
}
|
||||
if (obj instanceof RegExp) {
|
||||
// See https://github.com/Microsoft/TypeScript/issues/10990
|
||||
return obj as any;
|
||||
}
|
||||
const result: any = Array.isArray(obj) ? [] : {};
|
||||
Object.keys(<any>obj).forEach((key: string) => {
|
||||
if ((<any>obj)[key] && typeof (<any>obj)[key] === 'object') {
|
||||
result[key] = deepClone((<any>obj)[key]);
|
||||
} else {
|
||||
result[key] = (<any>obj)[key];
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
export async function refreshParentNode(context: azdata.ObjectExplorerContext): Promise<void> {
|
||||
if (context) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user