Skip to content

Commit a6eab3a

Browse files
committed
Move comparer types to public namespace
1 parent 61c6ecb commit a6eab3a

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

src/compiler/core.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,6 @@ namespace ts {
171171
return <Path>getCanonicalFileName(nonCanonicalizedPath);
172172
}
173173

174-
export const enum Comparison {
175-
LessThan = -1,
176-
EqualTo = 0,
177-
GreaterThan = 1
178-
}
179-
180174
export function length(array: ReadonlyArray<any>) {
181175
return array ? array.length : 0;
182176
}
@@ -858,8 +852,6 @@ namespace ts {
858852
return result;
859853
}
860854

861-
export type Comparer<T> = (a: T, b: T) => Comparison;
862-
863855
/**
864856
* Performs a binary search, finding the index at which 'value' occurs in 'array'.
865857
* If no such index is found, returns the 2's-complement of first index at which

src/compiler/types.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4434,4 +4434,11 @@ namespace ts {
44344434
export interface SyntaxList extends Node {
44354435
_children: Node[];
44364436
}
4437+
4438+
export type Comparer<T> = (a: T, b: T) => Comparison;
4439+
export const enum Comparison {
4440+
LessThan = -1,
4441+
EqualTo = 0,
4442+
GreaterThan = 1
4443+
}
44374444
}

0 commit comments

Comments
 (0)