Skip to content

Commit 3c7660a

Browse files
authored
Make Collection and ReadonlyCollection internal (#51964)
1 parent bae715f commit 3c7660a

File tree

3 files changed

+11
-24
lines changed

3 files changed

+11
-24
lines changed

src/compiler/corePublic.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,27 @@ export interface SortedArray<T> extends Array<T> {
2323
" __sortedArrayBrand": any;
2424
}
2525

26-
/** Common read methods for ES6 Map/Set. */
26+
/**
27+
* Common read methods for ES6 Map/Set.
28+
*
29+
* @internal
30+
*/
2731
export interface ReadonlyCollection<K> {
2832
readonly size: number;
2933
has(key: K): boolean;
3034
keys(): Iterator<K>;
3135
}
3236

33-
/** Common write methods for ES6 Map/Set. */
37+
/**
38+
* Common write methods for ES6 Map/Set.
39+
*
40+
* @internal
41+
*/
3442
export interface Collection<K> extends ReadonlyCollection<K> {
3543
delete(key: K): boolean;
3644
clear(): void;
3745
}
46+
3847
/** Array that is only intended to be pushed to, never read. */
3948
export interface Push<T> {
4049
push(...values: T[]): void;

tests/baselines/reference/api/tsserverlibrary.d.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3966,17 +3966,6 @@ declare namespace ts {
39663966
interface SortedArray<T> extends Array<T> {
39673967
" __sortedArrayBrand": any;
39683968
}
3969-
/** Common read methods for ES6 Map/Set. */
3970-
interface ReadonlyCollection<K> {
3971-
readonly size: number;
3972-
has(key: K): boolean;
3973-
keys(): Iterator<K>;
3974-
}
3975-
/** Common write methods for ES6 Map/Set. */
3976-
interface Collection<K> extends ReadonlyCollection<K> {
3977-
delete(key: K): boolean;
3978-
clear(): void;
3979-
}
39803969
/** Array that is only intended to be pushed to, never read. */
39813970
interface Push<T> {
39823971
push(...values: T[]): void;

tests/baselines/reference/api/typescript.d.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,6 @@ declare namespace ts {
3131
interface SortedArray<T> extends Array<T> {
3232
" __sortedArrayBrand": any;
3333
}
34-
/** Common read methods for ES6 Map/Set. */
35-
interface ReadonlyCollection<K> {
36-
readonly size: number;
37-
has(key: K): boolean;
38-
keys(): Iterator<K>;
39-
}
40-
/** Common write methods for ES6 Map/Set. */
41-
interface Collection<K> extends ReadonlyCollection<K> {
42-
delete(key: K): boolean;
43-
clear(): void;
44-
}
4534
/** Array that is only intended to be pushed to, never read. */
4635
interface Push<T> {
4736
push(...values: T[]): void;

0 commit comments

Comments
 (0)