a zip code crypto-currency system good for red ONLY

standalone.d.ts 20KB

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