11
22// ECMAScript Language Specification
3- // Specification: https://tc39.es/ecma262/
3+ // Specification: https://tc39.es/ecma262/multipage/
44// Repository: https://github.com/tc39/ecma262
55
66// Fundamental Objects
@@ -10,7 +10,47 @@ interface ObjectConstructor {
1010 groupBy < T > ( array : T [ ] , callback : ( item : T , index ?: number ) => string ) : Record < string , T [ ] > ;
1111}
1212
13+ // Text Processing
14+ // https://tc39.es/ecma262/multipage/text-processing.html
15+
16+ interface String {
17+ isWellFormed ( ) : boolean ;
18+ toWellFormed ( ) : string ;
19+ }
20+
21+ interface RegExp {
22+ readonly unicodeSets : boolean ;
23+ }
24+
25+ // Keyed Collections
26+ // https://tc39.es/ecma262/multipage/keyed-collections.html
27+
1328interface MapConstructor {
1429 groupBy < T , K > ( array : T [ ] , callback : ( item : T , index ?: number ) => K ) : Map < K , T [ ] > ;
1530}
1631
32+ // Structured Data
33+ // https://tc39.es/ecma262/multipage/structured-data.html
34+
35+ interface ArrayBuffer {
36+ readonly maxByteLength : number ;
37+ readonly resizable : boolean ;
38+ resize ( newLength : number ) : void ;
39+ }
40+
41+ interface SharedArrayBuffer {
42+ grow ( newLength : number ) : void ;
43+ readonly growable : boolean ;
44+ readonly maxByteLength : number ;
45+ }
46+
47+ // Control Abstraction Objects
48+ // https://tc39.es/ecma262/multipage/control-abstraction-objects.html
49+
50+ interface PromiseConstructor {
51+ withResolvers < T = any > ( ) : {
52+ promise : Promise < T > ;
53+ resolve : ( value ?: T | PromiseLike < T > ) => void ;
54+ reject : ( reason ?: any ) => void ;
55+ } ;
56+ }
0 commit comments