@@ -13,10 +13,7 @@ See the Apache Version 2.0 License for specific language governing permissions
1313and limitations under the License.
1414***************************************************************************** */
1515
16- interface IteratorResult < T > {
17- done : boolean ;
18- value ?: T | undefined ;
19- }
16+ /// <reference lib="es2015" />
2017
2118interface Iterator < T > {
2219 next ( value ?: any ) : IteratorResult < T > ;
@@ -38,13 +35,13 @@ interface Map<K, V> {
3835 entries ( ) : Iterator < [ K , V ] > ;
3936 keys ( ) : Iterator < K > ;
4037 values ( ) : Iterator < V > ;
41- size : number ;
38+ readonly size : number ;
4239}
4340
4441interface MapConstructor {
4542 new < K , V > ( ) : Map < K , V > ;
4643 new < K , V > ( iterable : ForEachable < [ K , V ] > ) : Map < K , V > ;
47- prototype : Map < any , any > ;
44+ readonly prototype : Map < any , any > ;
4845}
4946
5047declare var Map : MapConstructor ;
@@ -58,13 +55,13 @@ interface Set<T> {
5855 entries ( ) : Iterator < [ T , T ] > ;
5956 keys ( ) : Iterator < T > ;
6057 values ( ) : Iterator < T > ;
61- size : number ;
58+ readonly size : number ;
6259}
6360
6461interface SetConstructor {
6562 new < T > ( ) : Set < T > ;
6663 new < T > ( iterable : ForEachable < T > ) : Set < T > ;
67- prototype : Set < any > ;
64+ readonly prototype : Set < any > ;
6865}
6966
7067declare var Set : SetConstructor ;
@@ -80,7 +77,7 @@ interface WeakMap<K extends object, V> {
8077interface WeakMapConstructor {
8178 new < K extends object , V > ( ) : WeakMap < K , V > ;
8279 new < K extends object , V > ( iterable : ForEachable < [ K , V ] > ) : WeakMap < K , V > ;
83- prototype : WeakMap < any , any > ;
80+ readonly prototype : WeakMap < object , any > ;
8481}
8582
8683declare var WeakMap : WeakMapConstructor ;
@@ -93,9 +90,9 @@ interface WeakSet<T> {
9390}
9491
9592interface WeakSetConstructor {
96- new < T > ( ) : WeakSet < T > ;
97- new < T > ( iterable : ForEachable < T > ) : WeakSet < T > ;
98- prototype : WeakSet < any > ;
93+ new < T extends WeakKey = WeakKey > ( ) : WeakSet < T > ;
94+ new < T extends WeakKey = WeakKey > ( iterable : ForEachable < T > ) : WeakSet < T > ;
95+ readonly prototype : WeakSet < object > ;
9996}
10097
10198declare var WeakSet : WeakSetConstructor ;
0 commit comments