es6-shim.d.ts 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668
  1. // Type definitions for es6-shim v0.31.2
  2. // Project: https://github.com/paulmillr/es6-shim
  3. // Definitions by: Ron Buckton <http://github.com/rbuckton>
  4. // Definitions: https://github.com/borisyankov/DefinitelyTyped
  5. declare type PropertyKey = string | number | symbol;
  6. interface IteratorResult<T> {
  7. done: boolean;
  8. value?: T;
  9. }
  10. interface IterableShim<T> {
  11. /**
  12. * Shim for an ES6 iterable. Not intended for direct use by user code.
  13. */
  14. "_es6-shim iterator_"(): Iterator<T>;
  15. }
  16. interface Iterator<T> {
  17. next(value?: any): IteratorResult<T>;
  18. return?(value?: any): IteratorResult<T>;
  19. throw?(e?: any): IteratorResult<T>;
  20. }
  21. interface IterableIteratorShim<T> extends IterableShim<T>, Iterator<T> {
  22. /**
  23. * Shim for an ES6 iterable iterator. Not intended for direct use by user code.
  24. */
  25. "_es6-shim iterator_"(): IterableIteratorShim<T>;
  26. }
  27. interface StringConstructor {
  28. /**
  29. * Return the String value whose elements are, in order, the elements in the List elements.
  30. * If length is 0, the empty string is returned.
  31. */
  32. fromCodePoint(...codePoints: number[]): string;
  33. /**
  34. * String.raw is intended for use as a tag function of a Tagged Template String. When called
  35. * as such the first argument will be a well formed template call site object and the rest
  36. * parameter will contain the substitution values.
  37. * @param template A well-formed template string call site representation.
  38. * @param substitutions A set of substitution values.
  39. */
  40. raw(template: TemplateStringsArray, ...substitutions: any[]): string;
  41. }
  42. interface String {
  43. /**
  44. * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
  45. * value of the UTF-16 encoded code point starting at the string element at position pos in
  46. * the String resulting from converting this object to a String.
  47. * If there is no element at that position, the result is undefined.
  48. * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.
  49. */
  50. codePointAt(pos: number): number;
  51. /**
  52. * Returns true if searchString appears as a substring of the result of converting this
  53. * object to a String, at one or more positions that are
  54. * greater than or equal to position; otherwise, returns false.
  55. * @param searchString search string
  56. * @param position If position is undefined, 0 is assumed, so as to search all of the String.
  57. */
  58. includes(searchString: string, position?: number): boolean;
  59. /**
  60. * Returns true if the sequence of elements of searchString converted to a String is the
  61. * same as the corresponding elements of this object (converted to a String) starting at
  62. * endPosition – length(this). Otherwise returns false.
  63. */
  64. endsWith(searchString: string, endPosition?: number): boolean;
  65. /**
  66. * Returns a String value that is made from count copies appended together. If count is 0,
  67. * T is the empty String is returned.
  68. * @param count number of copies to append
  69. */
  70. repeat(count: number): string;
  71. /**
  72. * Returns true if the sequence of elements of searchString converted to a String is the
  73. * same as the corresponding elements of this object (converted to a String) starting at
  74. * position. Otherwise returns false.
  75. */
  76. startsWith(searchString: string, position?: number): boolean;
  77. /**
  78. * Returns an <a> HTML anchor element and sets the name attribute to the text value
  79. * @param name
  80. */
  81. anchor(name: string): string;
  82. /** Returns a <big> HTML element */
  83. big(): string;
  84. /** Returns a <blink> HTML element */
  85. blink(): string;
  86. /** Returns a <b> HTML element */
  87. bold(): string;
  88. /** Returns a <tt> HTML element */
  89. fixed(): string
  90. /** Returns a <font> HTML element and sets the color attribute value */
  91. fontcolor(color: string): string
  92. /** Returns a <font> HTML element and sets the size attribute value */
  93. fontsize(size: number): string;
  94. /** Returns a <font> HTML element and sets the size attribute value */
  95. fontsize(size: string): string;
  96. /** Returns an <i> HTML element */
  97. italics(): string;
  98. /** Returns an <a> HTML element and sets the href attribute value */
  99. link(url: string): string;
  100. /** Returns a <small> HTML element */
  101. small(): string;
  102. /** Returns a <strike> HTML element */
  103. strike(): string;
  104. /** Returns a <sub> HTML element */
  105. sub(): string;
  106. /** Returns a <sup> HTML element */
  107. sup(): string;
  108. /**
  109. * Shim for an ES6 iterable. Not intended for direct use by user code.
  110. */
  111. "_es6-shim iterator_"(): IterableIteratorShim<string>;
  112. }
  113. interface ArrayConstructor {
  114. /**
  115. * Creates an array from an array-like object.
  116. * @param arrayLike An array-like object to convert to an array.
  117. * @param mapfn A mapping function to call on every element of the array.
  118. * @param thisArg Value of 'this' used to invoke the mapfn.
  119. */
  120. from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): Array<U>;
  121. /**
  122. * Creates an array from an iterable object.
  123. * @param iterable An iterable object to convert to an array.
  124. * @param mapfn A mapping function to call on every element of the array.
  125. * @param thisArg Value of 'this' used to invoke the mapfn.
  126. */
  127. from<T, U>(iterable: IterableShim<T>, mapfn: (v: T, k: number) => U, thisArg?: any): Array<U>;
  128. /**
  129. * Creates an array from an array-like object.
  130. * @param arrayLike An array-like object to convert to an array.
  131. */
  132. from<T>(arrayLike: ArrayLike<T>): Array<T>;
  133. /**
  134. * Creates an array from an iterable object.
  135. * @param iterable An iterable object to convert to an array.
  136. */
  137. from<T>(iterable: IterableShim<T>): Array<T>;
  138. /**
  139. * Returns a new array from a set of elements.
  140. * @param items A set of elements to include in the new array object.
  141. */
  142. of<T>(...items: T[]): Array<T>;
  143. }
  144. interface Array<T> {
  145. /**
  146. * Returns the value of the first element in the array where predicate is true, and undefined
  147. * otherwise.
  148. * @param predicate find calls predicate once for each element of the array, in ascending
  149. * order, until it finds one where predicate returns true. If such an element is found, find
  150. * immediately returns that element value. Otherwise, find returns undefined.
  151. * @param thisArg If provided, it will be used as the this value for each invocation of
  152. * predicate. If it is not provided, undefined is used instead.
  153. */
  154. find(predicate: (value: T, index: number, obj: Array<T>) => boolean, thisArg?: any): T;
  155. /**
  156. * Returns the index of the first element in the array where predicate is true, and undefined
  157. * otherwise.
  158. * @param predicate find calls predicate once for each element of the array, in ascending
  159. * order, until it finds one where predicate returns true. If such an element is found, find
  160. * immediately returns that element value. Otherwise, find returns undefined.
  161. * @param thisArg If provided, it will be used as the this value for each invocation of
  162. * predicate. If it is not provided, undefined is used instead.
  163. */
  164. findIndex(predicate: (value: T) => boolean, thisArg?: any): number;
  165. /**
  166. * Returns the this object after filling the section identified by start and end with value
  167. * @param value value to fill array section with
  168. * @param start index to start filling the array at. If start is negative, it is treated as
  169. * length+start where length is the length of the array.
  170. * @param end index to stop filling the array at. If end is negative, it is treated as
  171. * length+end.
  172. */
  173. fill(value: T, start?: number, end?: number): T[];
  174. /**
  175. * Returns the this object after copying a section of the array identified by start and end
  176. * to the same array starting at position target
  177. * @param target If target is negative, it is treated as length+target where length is the
  178. * length of the array.
  179. * @param start If start is negative, it is treated as length+start. If end is negative, it
  180. * is treated as length+end.
  181. * @param end If not specified, length of the this object is used as its default value.
  182. */
  183. copyWithin(target: number, start: number, end?: number): T[];
  184. /**
  185. * Returns an array of key, value pairs for every entry in the array
  186. */
  187. entries(): IterableIteratorShim<[number, T]>;
  188. /**
  189. * Returns an list of keys in the array
  190. */
  191. keys(): IterableIteratorShim<number>;
  192. /**
  193. * Returns an list of values in the array
  194. */
  195. values(): IterableIteratorShim<T>;
  196. /**
  197. * Shim for an ES6 iterable. Not intended for direct use by user code.
  198. */
  199. "_es6-shim iterator_"(): IterableIteratorShim<T>;
  200. }
  201. interface NumberConstructor {
  202. /**
  203. * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1
  204. * that is representable as a Number value, which is approximately:
  205. * 2.2204460492503130808472633361816 x 10‍−‍16.
  206. */
  207. EPSILON: number;
  208. /**
  209. * Returns true if passed value is finite.
  210. * Unlike the global isFininte, Number.isFinite doesn't forcibly convert the parameter to a
  211. * number. Only finite values of the type number, result in true.
  212. * @param number A numeric value.
  213. */
  214. isFinite(number: number): boolean;
  215. /**
  216. * Returns true if the value passed is an integer, false otherwise.
  217. * @param number A numeric value.
  218. */
  219. isInteger(number: number): boolean;
  220. /**
  221. * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
  222. * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter
  223. * to a number. Only values of the type number, that are also NaN, result in true.
  224. * @param number A numeric value.
  225. */
  226. isNaN(number: number): boolean;
  227. /**
  228. * Returns true if the value passed is a safe integer.
  229. * @param number A numeric value.
  230. */
  231. isSafeInteger(number: number): boolean;
  232. /**
  233. * The value of the largest integer n such that n and n + 1 are both exactly representable as
  234. * a Number value.
  235. * The value of Number.MIN_SAFE_INTEGER is 9007199254740991 2^53 − 1.
  236. */
  237. MAX_SAFE_INTEGER: number;
  238. /**
  239. * The value of the smallest integer n such that n and n − 1 are both exactly representable as
  240. * a Number value.
  241. * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)).
  242. */
  243. MIN_SAFE_INTEGER: number;
  244. /**
  245. * Converts a string to a floating-point number.
  246. * @param string A string that contains a floating-point number.
  247. */
  248. parseFloat(string: string): number;
  249. /**
  250. * Converts A string to an integer.
  251. * @param s A string to convert into a number.
  252. * @param radix A value between 2 and 36 that specifies the base of the number in numString.
  253. * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
  254. * All other strings are considered decimal.
  255. */
  256. parseInt(string: string, radix?: number): number;
  257. }
  258. interface ObjectConstructor {
  259. /**
  260. * Copy the values of all of the enumerable own properties from one or more source objects to a
  261. * target object. Returns the target object.
  262. * @param target The target object to copy to.
  263. * @param sources One or more source objects to copy properties from.
  264. */
  265. assign(target: any, ...sources: any[]): any;
  266. /**
  267. * Returns true if the values are the same value, false otherwise.
  268. * @param value1 The first value.
  269. * @param value2 The second value.
  270. */
  271. is(value1: any, value2: any): boolean;
  272. /**
  273. * Sets the prototype of a specified object o to object proto or null. Returns the object o.
  274. * @param o The object to change its prototype.
  275. * @param proto The value of the new prototype or null.
  276. * @remarks Requires `__proto__` support.
  277. */
  278. setPrototypeOf(o: any, proto: any): any;
  279. }
  280. interface RegExp {
  281. /**
  282. * Returns a string indicating the flags of the regular expression in question. This field is read-only.
  283. * The characters in this string are sequenced and concatenated in the following order:
  284. *
  285. * - "g" for global
  286. * - "i" for ignoreCase
  287. * - "m" for multiline
  288. * - "u" for unicode
  289. * - "y" for sticky
  290. *
  291. * If no flags are set, the value is the empty string.
  292. */
  293. flags: string;
  294. }
  295. interface Math {
  296. /**
  297. * Returns the number of leading zero bits in the 32-bit binary representation of a number.
  298. * @param x A numeric expression.
  299. */
  300. clz32(x: number): number;
  301. /**
  302. * Returns the result of 32-bit multiplication of two numbers.
  303. * @param x First number
  304. * @param y Second number
  305. */
  306. imul(x: number, y: number): number;
  307. /**
  308. * Returns the sign of the x, indicating whether x is positive, negative or zero.
  309. * @param x The numeric expression to test
  310. */
  311. sign(x: number): number;
  312. /**
  313. * Returns the base 10 logarithm of a number.
  314. * @param x A numeric expression.
  315. */
  316. log10(x: number): number;
  317. /**
  318. * Returns the base 2 logarithm of a number.
  319. * @param x A numeric expression.
  320. */
  321. log2(x: number): number;
  322. /**
  323. * Returns the natural logarithm of 1 + x.
  324. * @param x A numeric expression.
  325. */
  326. log1p(x: number): number;
  327. /**
  328. * Returns the result of (e^x - 1) of x (e raised to the power of x, where e is the base of
  329. * the natural logarithms).
  330. * @param x A numeric expression.
  331. */
  332. expm1(x: number): number;
  333. /**
  334. * Returns the hyperbolic cosine of a number.
  335. * @param x A numeric expression that contains an angle measured in radians.
  336. */
  337. cosh(x: number): number;
  338. /**
  339. * Returns the hyperbolic sine of a number.
  340. * @param x A numeric expression that contains an angle measured in radians.
  341. */
  342. sinh(x: number): number;
  343. /**
  344. * Returns the hyperbolic tangent of a number.
  345. * @param x A numeric expression that contains an angle measured in radians.
  346. */
  347. tanh(x: number): number;
  348. /**
  349. * Returns the inverse hyperbolic cosine of a number.
  350. * @param x A numeric expression that contains an angle measured in radians.
  351. */
  352. acosh(x: number): number;
  353. /**
  354. * Returns the inverse hyperbolic sine of a number.
  355. * @param x A numeric expression that contains an angle measured in radians.
  356. */
  357. asinh(x: number): number;
  358. /**
  359. * Returns the inverse hyperbolic tangent of a number.
  360. * @param x A numeric expression that contains an angle measured in radians.
  361. */
  362. atanh(x: number): number;
  363. /**
  364. * Returns the square root of the sum of squares of its arguments.
  365. * @param values Values to compute the square root for.
  366. * If no arguments are passed, the result is +0.
  367. * If there is only one argument, the result is the absolute value.
  368. * If any argument is +Infinity or -Infinity, the result is +Infinity.
  369. * If any argument is NaN, the result is NaN.
  370. * If all arguments are either +0 or −0, the result is +0.
  371. */
  372. hypot(...values: number[]): number;
  373. /**
  374. * Returns the integral part of the a numeric expression, x, removing any fractional digits.
  375. * If x is already an integer, the result is x.
  376. * @param x A numeric expression.
  377. */
  378. trunc(x: number): number;
  379. /**
  380. * Returns the nearest single precision float representation of a number.
  381. * @param x A numeric expression.
  382. */
  383. fround(x: number): number;
  384. /**
  385. * Returns an implementation-dependent approximation to the cube root of number.
  386. * @param x A numeric expression.
  387. */
  388. cbrt(x: number): number;
  389. }
  390. interface PromiseLike<T> {
  391. /**
  392. * Attaches callbacks for the resolution and/or rejection of the Promise.
  393. * @param onfulfilled The callback to execute when the Promise is resolved.
  394. * @param onrejected The callback to execute when the Promise is rejected.
  395. * @returns A Promise for the completion of which ever callback is executed.
  396. */
  397. then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): PromiseLike<TResult>;
  398. then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): PromiseLike<TResult>;
  399. }
  400. /**
  401. * Represents the completion of an asynchronous operation
  402. */
  403. interface Promise<T> {
  404. /**
  405. * Attaches callbacks for the resolution and/or rejection of the Promise.
  406. * @param onfulfilled The callback to execute when the Promise is resolved.
  407. * @param onrejected The callback to execute when the Promise is rejected.
  408. * @returns A Promise for the completion of which ever callback is executed.
  409. */
  410. then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<TResult>;
  411. then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): Promise<TResult>;
  412. /**
  413. * Attaches a callback for only the rejection of the Promise.
  414. * @param onrejected The callback to execute when the Promise is rejected.
  415. * @returns A Promise for the completion of the callback.
  416. */
  417. catch(onrejected?: (reason: any) => T | PromiseLike<T>): Promise<T>;
  418. catch(onrejected?: (reason: any) => void): Promise<T>;
  419. }
  420. interface PromiseConstructor {
  421. /**
  422. * A reference to the prototype.
  423. */
  424. prototype: Promise<any>;
  425. /**
  426. * Creates a new Promise.
  427. * @param executor A callback used to initialize the promise. This callback is passed two arguments:
  428. * a resolve callback used resolve the promise with a value or the result of another promise,
  429. * and a reject callback used to reject the promise with a provided reason or error.
  430. */
  431. new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
  432. /**
  433. * Creates a Promise that is resolved with an array of results when all of the provided Promises
  434. * resolve, or rejected when any Promise is rejected.
  435. * @param values An array of Promises.
  436. * @returns A new Promise.
  437. */
  438. all<T>(values: IterableShim<T | PromiseLike<T>>): Promise<T[]>;
  439. /**
  440. * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
  441. * or rejected.
  442. * @param values An array of Promises.
  443. * @returns A new Promise.
  444. */
  445. race<T>(values: IterableShim<T | PromiseLike<T>>): Promise<T>;
  446. /**
  447. * Creates a new rejected promise for the provided reason.
  448. * @param reason The reason the promise was rejected.
  449. * @returns A new rejected Promise.
  450. */
  451. reject(reason: any): Promise<void>;
  452. /**
  453. * Creates a new rejected promise for the provided reason.
  454. * @param reason The reason the promise was rejected.
  455. * @returns A new rejected Promise.
  456. */
  457. reject<T>(reason: any): Promise<T>;
  458. /**
  459. * Creates a new resolved promise for the provided value.
  460. * @param value A promise.
  461. * @returns A promise whose internal state matches the provided promise.
  462. */
  463. resolve<T>(value: T | PromiseLike<T>): Promise<T>;
  464. /**
  465. * Creates a new resolved promise .
  466. * @returns A resolved promise.
  467. */
  468. resolve(): Promise<void>;
  469. }
  470. declare var Promise: PromiseConstructor;
  471. interface Map<K, V> {
  472. clear(): void;
  473. delete(key: K): boolean;
  474. forEach(callbackfn: (value: V, index: K, map: Map<K, V>) => void, thisArg?: any): void;
  475. get(key: K): V;
  476. has(key: K): boolean;
  477. set(key: K, value?: V): Map<K, V>;
  478. size: number;
  479. entries(): IterableIteratorShim<[K, V]>;
  480. keys(): IterableIteratorShim<K>;
  481. values(): IterableIteratorShim<V>;
  482. }
  483. interface MapConstructor {
  484. new <K, V>(): Map<K, V>;
  485. new <K, V>(iterable: IterableShim<[K, V]>): Map<K, V>;
  486. prototype: Map<any, any>;
  487. }
  488. declare var Map: MapConstructor;
  489. interface Set<T> {
  490. add(value: T): Set<T>;
  491. clear(): void;
  492. delete(value: T): boolean;
  493. forEach(callbackfn: (value: T, index: T, set: Set<T>) => void, thisArg?: any): void;
  494. has(value: T): boolean;
  495. size: number;
  496. entries(): IterableIteratorShim<[T, T]>;
  497. keys(): IterableIteratorShim<T>;
  498. values(): IterableIteratorShim<T>;
  499. }
  500. interface SetConstructor {
  501. new <T>(): Set<T>;
  502. new <T>(iterable: IterableShim<T>): Set<T>;
  503. prototype: Set<any>;
  504. }
  505. declare var Set: SetConstructor;
  506. interface WeakMap<K, V> {
  507. delete(key: K): boolean;
  508. get(key: K): V;
  509. has(key: K): boolean;
  510. set(key: K, value?: V): WeakMap<K, V>;
  511. }
  512. interface WeakMapConstructor {
  513. new <K, V>(): WeakMap<K, V>;
  514. new <K, V>(iterable: IterableShim<[K, V]>): WeakMap<K, V>;
  515. prototype: WeakMap<any, any>;
  516. }
  517. declare var WeakMap: WeakMapConstructor;
  518. interface WeakSet<T> {
  519. add(value: T): WeakSet<T>;
  520. delete(value: T): boolean;
  521. has(value: T): boolean;
  522. }
  523. interface WeakSetConstructor {
  524. new <T>(): WeakSet<T>;
  525. new <T>(iterable: IterableShim<T>): WeakSet<T>;
  526. prototype: WeakSet<any>;
  527. }
  528. declare var WeakSet: WeakSetConstructor;
  529. declare module Reflect {
  530. function apply(target: Function, thisArgument: any, argumentsList: ArrayLike<any>): any;
  531. function construct(target: Function, argumentsList: ArrayLike<any>): any;
  532. function defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean;
  533. function deleteProperty(target: any, propertyKey: PropertyKey): boolean;
  534. function enumerate(target: any): IterableIteratorShim<any>;
  535. function get(target: any, propertyKey: PropertyKey, receiver?: any): any;
  536. function getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor;
  537. function getPrototypeOf(target: any): any;
  538. function has(target: any, propertyKey: PropertyKey): boolean;
  539. function isExtensible(target: any): boolean;
  540. function ownKeys(target: any): Array<PropertyKey>;
  541. function preventExtensions(target: any): boolean;
  542. function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean;
  543. function setPrototypeOf(target: any, proto: any): boolean;
  544. }
  545. declare module "es6-shim" {
  546. var String: StringConstructor;
  547. var Array: ArrayConstructor;
  548. var Number: NumberConstructor;
  549. var Math: Math;
  550. var Object: ObjectConstructor;
  551. var Map: MapConstructor;
  552. var Set: SetConstructor;
  553. var WeakMap: WeakMapConstructor;
  554. var WeakSet: WeakSetConstructor;
  555. var Promise: PromiseConstructor;
  556. module Reflect {
  557. function apply(target: Function, thisArgument: any, argumentsList: ArrayLike<any>): any;
  558. function construct(target: Function, argumentsList: ArrayLike<any>): any;
  559. function defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean;
  560. function deleteProperty(target: any, propertyKey: PropertyKey): boolean;
  561. function enumerate(target: any): Iterator<any>;
  562. function get(target: any, propertyKey: PropertyKey, receiver?: any): any;
  563. function getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor;
  564. function getPrototypeOf(target: any): any;
  565. function has(target: any, propertyKey: PropertyKey): boolean;
  566. function isExtensible(target: any): boolean;
  567. function ownKeys(target: any): Array<PropertyKey>;
  568. function preventExtensions(target: any): boolean;
  569. function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean;
  570. function setPrototypeOf(target: any, proto: any): boolean;
  571. }
  572. }