mirror of
https://github.com/Microsoft/vscode
synced 2024-07-16 10:37:35 +00:00
some of #76442
This commit is contained in:
parent
8508bb8b77
commit
ab5b94db34
|
@ -14,11 +14,11 @@ export function deepClone<T>(obj: T): T {
|
|||
return obj as any;
|
||||
}
|
||||
const result: any = Array.isArray(obj) ? [] : {};
|
||||
Object.keys(obj as any).forEach((key: string) => {
|
||||
if (obj[key] && typeof obj[key] === 'object') {
|
||||
result[key] = deepClone(obj[key]);
|
||||
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] = obj[key];
|
||||
result[key] = (<any>obj)[key];
|
||||
}
|
||||
});
|
||||
return result;
|
||||
|
|
|
@ -14,7 +14,7 @@ import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService
|
|||
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
|
||||
import { isSingleFolderWorkspaceIdentifier, toWorkspaceIdentifier, WORKSPACE_EXTENSION } from 'vs/platform/workspaces/common/workspaces';
|
||||
|
||||
export const KnownSnippetVariableNames = Object.freeze({
|
||||
export const KnownSnippetVariableNames: { [key: string]: true } = Object.freeze({
|
||||
'CURRENT_YEAR': true,
|
||||
'CURRENT_YEAR_SHORT': true,
|
||||
'CURRENT_MONTH': true,
|
||||
|
@ -275,4 +275,4 @@ export class WorkspaceBasedVariableResolver implements VariableResolver {
|
|||
}
|
||||
return filename;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue