提交 512ca3ab 编写于 作者: J Johannes Rieken

remove map,set from editor/core as they are now everywhere

上级 3fde4402
......@@ -4,7 +4,6 @@
*--------------------------------------------------------------------------------------------*/
'use strict';
import { createMap, Map } from 'vs/editor/common/core/map';
import { toUint8 } from 'vs/editor/common/core/uint';
/**
......@@ -28,7 +27,7 @@ export class CharacterClassifier<T extends number> {
this._defaultValue = defaultValue;
this._asciiMap = CharacterClassifier._createAsciiMap(defaultValue);
this._map = createMap<number, number>();
this._map = new Map<number, number>();
}
private static _createAsciiMap(defaultValue: number): Uint8Array {
......
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
export interface Map<K, V> {
clear(): void;
delete(key: K): boolean;
forEach(callbackfn: (value: V, index: K, map: Map<K, V>) => void, thisArg?: any): void;
get(key: K): V;
has(key: K): boolean;
set(key: K, value?: V): Map<K, V>;
size: number;
// not supported on IE11:
// entries(): IterableIterator<[K, V]>;
// keys(): IterableIterator<K>;
// values(): IterableIterator<V>;
// [Symbol.iterator]():IterableIterator<[K,V]>;
// [Symbol.toStringTag]: string;
}
interface MapConstructor {
new <K, V>(): Map<K, V>;
prototype: Map<any, any>;
// not supported on IE11:
// new <K, V>(iterable: Iterable<[K, V]>): Map<K, V>;
}
declare var Map: MapConstructor;
export function createMap<K, V>(): Map<K, V> {
return new Map<K, V>();
}
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
export interface Set<T> {
add(value: T): Set<T>;
clear(): void;
delete(value: T): boolean;
forEach(callbackfn: (value: T, index: T, set: Set<T>) => void, thisArg?: any): void;
has(value: T): boolean;
size: number;
// not supported on IE11:
// entries(): IterableIterator<[T, T]>;
// keys(): IterableIterator<T>;
// values(): IterableIterator<T>;
// [Symbol.iterator]():IterableIterator<T>;
// [Symbol.toStringTag]: string;
}
interface SetConstructor {
new <T>(): Set<T>;
prototype: Set<any>;
// not supported on IE11:
// new <T>(iterable: Iterable<T>): Set<T>;
}
declare var Set: SetConstructor;
export function createSet<T>(): Set<T> {
return new Set<T>();
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册