mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode cfc1ab4c5f816765b91fb7ead3c3427a7c8581a3
This commit is contained in:
@@ -5,9 +5,11 @@
|
||||
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { CharCode } from 'vs/base/common/charCode';
|
||||
import { Iterator, IteratorResult, FIN } from './iterator';
|
||||
|
||||
import { FIN } from './iterator';
|
||||
|
||||
/**
|
||||
* @deprecated ES6: use `[...SetOrMap.values()]`
|
||||
*/
|
||||
export function values<V = any>(set: Set<V>): V[];
|
||||
export function values<K = any, V = any>(map: Map<K, V>): V[];
|
||||
export function values<V>(forEachable: { forEach(callback: (value: V, ...more: any[]) => any): void }): V[] {
|
||||
@@ -16,6 +18,9 @@ export function values<V>(forEachable: { forEach(callback: (value: V, ...more: a
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated ES6: use `[...map.keys()]`
|
||||
*/
|
||||
export function keys<K, V>(map: Map<K, V>): K[] {
|
||||
const result: K[] = [];
|
||||
map.forEach((_value, key) => result.push(key));
|
||||
@@ -51,6 +56,9 @@ export function setToString<K>(set: Set<K>): string {
|
||||
return `Set(${set.size}) {${entries.join(', ')}}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated ES6: use `...Map.entries()`
|
||||
*/
|
||||
export function mapToSerializable(map: Map<string, string>): [string, string][] {
|
||||
const serializable: [string, string][] = [];
|
||||
|
||||
@@ -61,6 +69,9 @@ export function mapToSerializable(map: Map<string, string>): [string, string][]
|
||||
return serializable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated ES6: use `new Map([[key1, value1],[key2, value2]])`
|
||||
*/
|
||||
export function serializableToMap(serializable: [string, string][]): Map<string, string> {
|
||||
const items = new Map<string, string>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user