-
Notifications
You must be signed in to change notification settings - Fork 12.8k
/
Copy pathcorePublic.ts
47 lines (40 loc) · 1.31 KB
/
corePublic.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// WARNING: The script `configurePrerelease.ts` uses a regexp to parse out these values.
// If changing the text in this section, be sure to test `configurePrerelease` too.
export const versionMajorMinor = "5.9";
// The following is baselined as a literal template type without intervention
/** The version of the TypeScript compiler release */
export const version: string = `${versionMajorMinor}.0-dev`;
/**
* Type of objects whose values are all of the same type.
* The `in` and `for-in` operators can *not* be safely used,
* since `Object.prototype` may be modified by outside code.
*/
export interface MapLike<T> {
[index: string]: T;
}
export interface SortedReadonlyArray<T> extends ReadonlyArray<T> {
" __sortedArrayBrand": any;
}
export interface SortedArray<T> extends Array<T> {
" __sortedArrayBrand": any;
}
/**
* Common read methods for ES6 Map/Set.
*
* @internal
*/
export interface ReadonlyCollection<K> {
readonly size: number;
has(key: K): boolean;
keys(): IterableIterator<K>;
}
/** @internal */
export type EqualityComparer<T> = (a: T, b: T) => boolean;
/** @internal */
export type Comparer<T> = (a: T, b: T) => Comparison;
/** @internal */
export const enum Comparison {
LessThan = -1,
EqualTo = 0,
GreaterThan = 1,
}