UNPKG

1.28 kBTypeScriptView Raw
1import ES5 = require("./es5");
2import ES6 = require("./es6");
3import ES7 = require("./es7");
4
5import ES2015 = require("./es2015");
6import ES2016 = require("./es2016");
7import ES2017 = require("./es2017");
8import ES2018 = require("./es2018");
9import ES2019 = require("./es2019");
10
11declare namespace ESAbstract {
12 // ES2015 types:
13 type PropertyKey = string | symbol;
14
15 // ES5 types:
16 interface GenericDescriptor {
17 "[[Configurable]]"?: boolean | undefined;
18 "[[Enumerable]]"?: boolean | undefined;
19 }
20
21 interface AccessorDescriptor<T = unknown> extends GenericDescriptor {
22 "[[Get]]"?(): T;
23 "[[Set]]"?(value: T): void;
24 }
25
26 interface DataDescriptor<T = unknown> extends GenericDescriptor {
27 "[[Writable]]"?: boolean | undefined;
28 "[[Value]]"?: T | undefined;
29 }
30
31 type PropertyDescriptor<T = unknown> = AccessorDescriptor<T> | DataDescriptor<T>;
32}
33
34interface ESAbstract extends ES6 {
35 readonly ES5: ES5;
36 /** @deprecated */
37 readonly ES6: ES6;
38 /** @deprecated */
39 readonly ES7: ES7;
40
41 readonly ES2015: ES2015;
42 readonly ES2016: ES2016;
43 readonly ES2017: ES2017;
44 readonly ES2018: ES2018;
45 readonly ES2019: ES2019;
46}
47
48declare const ESAbstract: ESAbstract;
49export = ESAbstract;