a zip code crypto-currency system good for red ONLY

index.d.ts 22KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491
  1. /*! *****************************************************************************
  2. Copyright (C) Microsoft. All rights reserved.
  3. Licensed under the Apache License, Version 2.0 (the "License"); you may not use
  4. this file except in compliance with the License. You may obtain a copy of the
  5. License at http://www.apache.org/licenses/LICENSE-2.0
  6. THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  7. KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
  8. WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
  9. MERCHANTABLITY OR NON-INFRINGEMENT.
  10. See the Apache Version 2.0 License for specific language governing permissions
  11. and limitations under the License.
  12. ***************************************************************************** */
  13. // The "reflect-metadata" module has no imports or exports, but can be imported by modules to load the polyfill.
  14. export { };
  15. declare global {
  16. namespace Reflect {
  17. /**
  18. * Applies a set of decorators to a target object.
  19. * @param decorators An array of decorators.
  20. * @param target The target object.
  21. * @returns The result of applying the provided decorators.
  22. * @remarks Decorators are applied in reverse order of their positions in the array.
  23. * @example
  24. *
  25. * class Example { }
  26. *
  27. * // constructor
  28. * Example = Reflect.decorate(decoratorsArray, Example);
  29. *
  30. */
  31. function decorate(decorators: ClassDecorator[], target: Function): Function;
  32. /**
  33. * Applies a set of decorators to a property of a target object.
  34. * @param decorators An array of decorators.
  35. * @param target The target object.
  36. * @param propertyKey The property key to decorate.
  37. * @param attributes A property descriptor.
  38. * @remarks Decorators are applied in reverse order.
  39. * @example
  40. *
  41. * class Example {
  42. * // property declarations are not part of ES6, though they are valid in TypeScript:
  43. * // static staticProperty;
  44. * // property;
  45. *
  46. * static staticMethod() { }
  47. * method() { }
  48. * }
  49. *
  50. * // property (on constructor)
  51. * Reflect.decorate(decoratorsArray, Example, "staticProperty");
  52. *
  53. * // property (on prototype)
  54. * Reflect.decorate(decoratorsArray, Example.prototype, "property");
  55. *
  56. * // method (on constructor)
  57. * Object.defineProperty(Example, "staticMethod",
  58. * Reflect.decorate(decoratorsArray, Example, "staticMethod",
  59. * Object.getOwnPropertyDescriptor(Example, "staticMethod")));
  60. *
  61. * // method (on prototype)
  62. * Object.defineProperty(Example.prototype, "method",
  63. * Reflect.decorate(decoratorsArray, Example.prototype, "method",
  64. * Object.getOwnPropertyDescriptor(Example.prototype, "method")));
  65. *
  66. */
  67. function decorate(decorators: (PropertyDecorator | MethodDecorator)[], target: Object, propertyKey: string | symbol, attributes?: PropertyDescriptor): PropertyDescriptor;
  68. /**
  69. * A default metadata decorator factory that can be used on a class, class member, or parameter.
  70. * @param metadataKey The key for the metadata entry.
  71. * @param metadataValue The value for the metadata entry.
  72. * @returns A decorator function.
  73. * @remarks
  74. * If `metadataKey` is already defined for the target and target key, the
  75. * metadataValue for that key will be overwritten.
  76. * @example
  77. *
  78. * // constructor
  79. * @Reflect.metadata(key, value)
  80. * class Example {
  81. * }
  82. *
  83. * // property (on constructor, TypeScript only)
  84. * class Example {
  85. * @Reflect.metadata(key, value)
  86. * static staticProperty;
  87. * }
  88. *
  89. * // property (on prototype, TypeScript only)
  90. * class Example {
  91. * @Reflect.metadata(key, value)
  92. * property;
  93. * }
  94. *
  95. * // method (on constructor)
  96. * class Example {
  97. * @Reflect.metadata(key, value)
  98. * static staticMethod() { }
  99. * }
  100. *
  101. * // method (on prototype)
  102. * class Example {
  103. * @Reflect.metadata(key, value)
  104. * method() { }
  105. * }
  106. *
  107. */
  108. function metadata(metadataKey: any, metadataValue: any): {
  109. (target: Function): void;
  110. (target: Object, propertyKey: string | symbol): void;
  111. };
  112. /**
  113. * Define a unique metadata entry on the target.
  114. * @param metadataKey A key used to store and retrieve metadata.
  115. * @param metadataValue A value that contains attached metadata.
  116. * @param target The target object on which to define metadata.
  117. * @example
  118. *
  119. * class Example {
  120. * }
  121. *
  122. * // constructor
  123. * Reflect.defineMetadata("custom:annotation", options, Example);
  124. *
  125. * // decorator factory as metadata-producing annotation.
  126. * function MyAnnotation(options): ClassDecorator {
  127. * return target => Reflect.defineMetadata("custom:annotation", options, target);
  128. * }
  129. *
  130. */
  131. function defineMetadata(metadataKey: any, metadataValue: any, target: Object): void;
  132. /**
  133. * Define a unique metadata entry on the target.
  134. * @param metadataKey A key used to store and retrieve metadata.
  135. * @param metadataValue A value that contains attached metadata.
  136. * @param target The target object on which to define metadata.
  137. * @param propertyKey The property key for the target.
  138. * @example
  139. *
  140. * class Example {
  141. * // property declarations are not part of ES6, though they are valid in TypeScript:
  142. * // static staticProperty;
  143. * // property;
  144. *
  145. * static staticMethod(p) { }
  146. * method(p) { }
  147. * }
  148. *
  149. * // property (on constructor)
  150. * Reflect.defineMetadata("custom:annotation", Number, Example, "staticProperty");
  151. *
  152. * // property (on prototype)
  153. * Reflect.defineMetadata("custom:annotation", Number, Example.prototype, "property");
  154. *
  155. * // method (on constructor)
  156. * Reflect.defineMetadata("custom:annotation", Number, Example, "staticMethod");
  157. *
  158. * // method (on prototype)
  159. * Reflect.defineMetadata("custom:annotation", Number, Example.prototype, "method");
  160. *
  161. * // decorator factory as metadata-producing annotation.
  162. * function MyAnnotation(options): PropertyDecorator {
  163. * return (target, key) => Reflect.defineMetadata("custom:annotation", options, target, key);
  164. * }
  165. *
  166. */
  167. function defineMetadata(metadataKey: any, metadataValue: any, target: Object, propertyKey: string | symbol): void;
  168. /**
  169. * Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.
  170. * @param metadataKey A key used to store and retrieve metadata.
  171. * @param target The target object on which the metadata is defined.
  172. * @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`.
  173. * @example
  174. *
  175. * class Example {
  176. * }
  177. *
  178. * // constructor
  179. * result = Reflect.hasMetadata("custom:annotation", Example);
  180. *
  181. */
  182. function hasMetadata(metadataKey: any, target: Object): boolean;
  183. /**
  184. * Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.
  185. * @param metadataKey A key used to store and retrieve metadata.
  186. * @param target The target object on which the metadata is defined.
  187. * @param propertyKey The property key for the target.
  188. * @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`.
  189. * @example
  190. *
  191. * class Example {
  192. * // property declarations are not part of ES6, though they are valid in TypeScript:
  193. * // static staticProperty;
  194. * // property;
  195. *
  196. * static staticMethod(p) { }
  197. * method(p) { }
  198. * }
  199. *
  200. * // property (on constructor)
  201. * result = Reflect.hasMetadata("custom:annotation", Example, "staticProperty");
  202. *
  203. * // property (on prototype)
  204. * result = Reflect.hasMetadata("custom:annotation", Example.prototype, "property");
  205. *
  206. * // method (on constructor)
  207. * result = Reflect.hasMetadata("custom:annotation", Example, "staticMethod");
  208. *
  209. * // method (on prototype)
  210. * result = Reflect.hasMetadata("custom:annotation", Example.prototype, "method");
  211. *
  212. */
  213. function hasMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): boolean;
  214. /**
  215. * Gets a value indicating whether the target object has the provided metadata key defined.
  216. * @param metadataKey A key used to store and retrieve metadata.
  217. * @param target The target object on which the metadata is defined.
  218. * @returns `true` if the metadata key was defined on the target object; otherwise, `false`.
  219. * @example
  220. *
  221. * class Example {
  222. * }
  223. *
  224. * // constructor
  225. * result = Reflect.hasOwnMetadata("custom:annotation", Example);
  226. *
  227. */
  228. function hasOwnMetadata(metadataKey: any, target: Object): boolean;
  229. /**
  230. * Gets a value indicating whether the target object has the provided metadata key defined.
  231. * @param metadataKey A key used to store and retrieve metadata.
  232. * @param target The target object on which the metadata is defined.
  233. * @param propertyKey The property key for the target.
  234. * @returns `true` if the metadata key was defined on the target object; otherwise, `false`.
  235. * @example
  236. *
  237. * class Example {
  238. * // property declarations are not part of ES6, though they are valid in TypeScript:
  239. * // static staticProperty;
  240. * // property;
  241. *
  242. * static staticMethod(p) { }
  243. * method(p) { }
  244. * }
  245. *
  246. * // property (on constructor)
  247. * result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticProperty");
  248. *
  249. * // property (on prototype)
  250. * result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "property");
  251. *
  252. * // method (on constructor)
  253. * result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticMethod");
  254. *
  255. * // method (on prototype)
  256. * result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "method");
  257. *
  258. */
  259. function hasOwnMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): boolean;
  260. /**
  261. * Gets the metadata value for the provided metadata key on the target object or its prototype chain.
  262. * @param metadataKey A key used to store and retrieve metadata.
  263. * @param target The target object on which the metadata is defined.
  264. * @returns The metadata value for the metadata key if found; otherwise, `undefined`.
  265. * @example
  266. *
  267. * class Example {
  268. * }
  269. *
  270. * // constructor
  271. * result = Reflect.getMetadata("custom:annotation", Example);
  272. *
  273. */
  274. function getMetadata(metadataKey: any, target: Object): any;
  275. /**
  276. * Gets the metadata value for the provided metadata key on the target object or its prototype chain.
  277. * @param metadataKey A key used to store and retrieve metadata.
  278. * @param target The target object on which the metadata is defined.
  279. * @param propertyKey The property key for the target.
  280. * @returns The metadata value for the metadata key if found; otherwise, `undefined`.
  281. * @example
  282. *
  283. * class Example {
  284. * // property declarations are not part of ES6, though they are valid in TypeScript:
  285. * // static staticProperty;
  286. * // property;
  287. *
  288. * static staticMethod(p) { }
  289. * method(p) { }
  290. * }
  291. *
  292. * // property (on constructor)
  293. * result = Reflect.getMetadata("custom:annotation", Example, "staticProperty");
  294. *
  295. * // property (on prototype)
  296. * result = Reflect.getMetadata("custom:annotation", Example.prototype, "property");
  297. *
  298. * // method (on constructor)
  299. * result = Reflect.getMetadata("custom:annotation", Example, "staticMethod");
  300. *
  301. * // method (on prototype)
  302. * result = Reflect.getMetadata("custom:annotation", Example.prototype, "method");
  303. *
  304. */
  305. function getMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): any;
  306. /**
  307. * Gets the metadata value for the provided metadata key on the target object.
  308. * @param metadataKey A key used to store and retrieve metadata.
  309. * @param target The target object on which the metadata is defined.
  310. * @returns The metadata value for the metadata key if found; otherwise, `undefined`.
  311. * @example
  312. *
  313. * class Example {
  314. * }
  315. *
  316. * // constructor
  317. * result = Reflect.getOwnMetadata("custom:annotation", Example);
  318. *
  319. */
  320. function getOwnMetadata(metadataKey: any, target: Object): any;
  321. /**
  322. * Gets the metadata value for the provided metadata key on the target object.
  323. * @param metadataKey A key used to store and retrieve metadata.
  324. * @param target The target object on which the metadata is defined.
  325. * @param propertyKey The property key for the target.
  326. * @returns The metadata value for the metadata key if found; otherwise, `undefined`.
  327. * @example
  328. *
  329. * class Example {
  330. * // property declarations are not part of ES6, though they are valid in TypeScript:
  331. * // static staticProperty;
  332. * // property;
  333. *
  334. * static staticMethod(p) { }
  335. * method(p) { }
  336. * }
  337. *
  338. * // property (on constructor)
  339. * result = Reflect.getOwnMetadata("custom:annotation", Example, "staticProperty");
  340. *
  341. * // property (on prototype)
  342. * result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "property");
  343. *
  344. * // method (on constructor)
  345. * result = Reflect.getOwnMetadata("custom:annotation", Example, "staticMethod");
  346. *
  347. * // method (on prototype)
  348. * result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "method");
  349. *
  350. */
  351. function getOwnMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): any;
  352. /**
  353. * Gets the metadata keys defined on the target object or its prototype chain.
  354. * @param target The target object on which the metadata is defined.
  355. * @returns An array of unique metadata keys.
  356. * @example
  357. *
  358. * class Example {
  359. * }
  360. *
  361. * // constructor
  362. * result = Reflect.getMetadataKeys(Example);
  363. *
  364. */
  365. function getMetadataKeys(target: Object): any[];
  366. /**
  367. * Gets the metadata keys defined on the target object or its prototype chain.
  368. * @param target The target object on which the metadata is defined.
  369. * @param propertyKey The property key for the target.
  370. * @returns An array of unique metadata keys.
  371. * @example
  372. *
  373. * class Example {
  374. * // property declarations are not part of ES6, though they are valid in TypeScript:
  375. * // static staticProperty;
  376. * // property;
  377. *
  378. * static staticMethod(p) { }
  379. * method(p) { }
  380. * }
  381. *
  382. * // property (on constructor)
  383. * result = Reflect.getMetadataKeys(Example, "staticProperty");
  384. *
  385. * // property (on prototype)
  386. * result = Reflect.getMetadataKeys(Example.prototype, "property");
  387. *
  388. * // method (on constructor)
  389. * result = Reflect.getMetadataKeys(Example, "staticMethod");
  390. *
  391. * // method (on prototype)
  392. * result = Reflect.getMetadataKeys(Example.prototype, "method");
  393. *
  394. */
  395. function getMetadataKeys(target: Object, propertyKey: string | symbol): any[];
  396. /**
  397. * Gets the unique metadata keys defined on the target object.
  398. * @param target The target object on which the metadata is defined.
  399. * @returns An array of unique metadata keys.
  400. * @example
  401. *
  402. * class Example {
  403. * }
  404. *
  405. * // constructor
  406. * result = Reflect.getOwnMetadataKeys(Example);
  407. *
  408. */
  409. function getOwnMetadataKeys(target: Object): any[];
  410. /**
  411. * Gets the unique metadata keys defined on the target object.
  412. * @param target The target object on which the metadata is defined.
  413. * @param propertyKey The property key for the target.
  414. * @returns An array of unique metadata keys.
  415. * @example
  416. *
  417. * class Example {
  418. * // property declarations are not part of ES6, though they are valid in TypeScript:
  419. * // static staticProperty;
  420. * // property;
  421. *
  422. * static staticMethod(p) { }
  423. * method(p) { }
  424. * }
  425. *
  426. * // property (on constructor)
  427. * result = Reflect.getOwnMetadataKeys(Example, "staticProperty");
  428. *
  429. * // property (on prototype)
  430. * result = Reflect.getOwnMetadataKeys(Example.prototype, "property");
  431. *
  432. * // method (on constructor)
  433. * result = Reflect.getOwnMetadataKeys(Example, "staticMethod");
  434. *
  435. * // method (on prototype)
  436. * result = Reflect.getOwnMetadataKeys(Example.prototype, "method");
  437. *
  438. */
  439. function getOwnMetadataKeys(target: Object, propertyKey: string | symbol): any[];
  440. /**
  441. * Deletes the metadata entry from the target object with the provided key.
  442. * @param metadataKey A key used to store and retrieve metadata.
  443. * @param target The target object on which the metadata is defined.
  444. * @returns `true` if the metadata entry was found and deleted; otherwise, false.
  445. * @example
  446. *
  447. * class Example {
  448. * }
  449. *
  450. * // constructor
  451. * result = Reflect.deleteMetadata("custom:annotation", Example);
  452. *
  453. */
  454. function deleteMetadata(metadataKey: any, target: Object): boolean;
  455. /**
  456. * Deletes the metadata entry from the target object with the provided key.
  457. * @param metadataKey A key used to store and retrieve metadata.
  458. * @param target The target object on which the metadata is defined.
  459. * @param propertyKey The property key for the target.
  460. * @returns `true` if the metadata entry was found and deleted; otherwise, false.
  461. * @example
  462. *
  463. * class Example {
  464. * // property declarations are not part of ES6, though they are valid in TypeScript:
  465. * // static staticProperty;
  466. * // property;
  467. *
  468. * static staticMethod(p) { }
  469. * method(p) { }
  470. * }
  471. *
  472. * // property (on constructor)
  473. * result = Reflect.deleteMetadata("custom:annotation", Example, "staticProperty");
  474. *
  475. * // property (on prototype)
  476. * result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "property");
  477. *
  478. * // method (on constructor)
  479. * result = Reflect.deleteMetadata("custom:annotation", Example, "staticMethod");
  480. *
  481. * // method (on prototype)
  482. * result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "method");
  483. *
  484. */
  485. function deleteMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): boolean;
  486. }
  487. }