Deployed the page to Github Pages.

This commit is contained in:
Batuhan Berk Başoğlu 2024-11-03 21:30:09 -05:00
parent 1d79754e93
commit 2c89899458
Signed by: batuhan-basoglu
SSH key fingerprint: SHA256:kEsnuHX+qbwhxSAXPUQ4ox535wFHu/hIRaa53FzxRpo
62797 changed files with 6551425 additions and 15279 deletions

5
node_modules/reflect-metadata/AUTHORS.md generated vendored Normal file
View file

@ -0,0 +1,5 @@
reflect-metadata is authored by:
* Cy Brown
* Oleh Dokuka
* Ron Buckton
* William Buchwalter

15
node_modules/reflect-metadata/CopyrightNotice.txt generated vendored Normal file
View file

@ -0,0 +1,15 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */

55
node_modules/reflect-metadata/LICENSE generated vendored Normal file
View file

@ -0,0 +1,55 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
You must give any other recipients of the Work or Derivative Works a copy of this License; and
You must cause any modified files to carry prominent notices stating that You changed the files; and
You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS

232
node_modules/reflect-metadata/README.md generated vendored Normal file
View file

@ -0,0 +1,232 @@
# Metadata Reflection API
NOTE: Now that both [Decorators](https://github.com/tc39/proposal-decorators) and
[Decorator Metadata](https://github.com/tc39/proposal-decorator-metadata) have achieved Stage 3 within TC39, the API
proposed below is no longer being considered for standardization. However, this package will continue to support
projects that leverage TypeScript's legacy `--experimentalDecorators` option as some projects may not be able to migrate
to use standard decorators.
* [Detailed proposal][metadata-spec]
## Installation
```
npm install reflect-metadata
```
## Usage
### ES Modules in NodeJS/Browser, TypeScript/Babel, Bundlers
```ts
// - Modifies global `Reflect` object (or defines one in ES5 runtimes).
// - Supports ESM and CommonJS.
// - Contains internal polyfills for `Map`, `Set`, and `WeakMap` for older runtimes.
import "reflect-metadata";
// - Modifies global `Reflect` object (or defines one in ES5 runtimes).
// - Supports ESM and CommonJS.
// - Requires runtime support for `"exports"` in `package.json`.
// - Does not include internal polyfills.
import "reflect-metadata/lite";
```
### CommonJS
```ts
// - Modifies global `Reflect` object (or defines one in ES5 runtimes).
// - Contains internal polyfills for `Map`, `Set`, and `WeakMap` for older runtimes.
require("reflect-metadata");
// - Modifies global `Reflect` object (or defines one in ES5 runtimes).
// - Requires runtime support for `"exports"` in `package.json`.
// - Does not include internal polyfills.
require("reflect-metadata/lite");
```
### In the Browser via `<script>`
**HTML**
```html
<!-- Modifies global `Reflect` object (or defines one in ES5 runtimes). -->
<!-- Contains internal polyfills for `Map`, `Set`, and `WeakMap` for older runtimes. -->
<script src="path/to/reflect-metadata/Reflect.js"></script>
<!-- Modifies global `Reflect` object (or defines one in ES5 runtimes). -->
<!-- Does not include internal polyfills. -->
<script src="path/to/reflect-metadata/ReflectLite.js"></script>
```
**Script**
```js
// - Makes types available in your editor.
/// <reference path="path/to/reflect-metadata/standalone.d.ts" />
```
## Background
* Decorators add the ability to augment a class and its members as the class is defined, through a declarative syntax.
* [Traceur][traceur] attaches annotations to a static property on the class.
* Languages like C# (.NET), and Java support attributes or annotations that add metadata to types, along with a reflective API for reading metadata.
## Goals
* A number of use cases (Composition/Dependency Injection, Runtime Type Assertions, Reflection/Mirroring, Testing) want the ability to add additional metadata to a class in a consistent manner.
* A consistent approach is needed for various tools and libraries to be able to reason over metadata.
* Metadata-producing decorators (nee. "Annotations") need to be generally composable with mutating decorators.
* Metadata should be available not only on an object but also through a Proxy, with related traps.
* Defining new metadata-producing decorators should not be arduous or over-complex for a developer.
* Metadata should be consistent with other language and runtime features of ECMAScript.
## Syntax
* Declarative definition of metadata:
```JavaScript
class C {
@Reflect.metadata(metadataKey, metadataValue)
method() {
}
}
```
* Imperative definition of metadata:
```JavaScript
Reflect.defineMetadata(metadataKey, metadataValue, C.prototype, "method");
```
* Imperative introspection of metadata:
```JavaScript
let obj = new C();
let metadataValue = Reflect.getMetadata(metadataKey, obj, "method");
```
## Semantics
* Object has a new \[\[Metadata\]\] internal property that will contain a Map whose keys are property keys (or **undefined**) and whose values are Maps of metadata keys to metadata values.
* Object will have a number of new internal methods for \[\[DefineOwnMetadata\]\], \[\[GetOwnMetadata\]\], \[\[HasOwnMetadata\]\], etc.
* These internal methods can be overridden by a Proxy to support additional traps.
* These internal methods will by default call a set of abstract operations to define and read metadata.
* The Reflect object will expose the MOP operations to allow imperative access to metadata.
* Metadata defined on class declaration *C* is stored in *C*.\[\[Metadata\]\], with **undefined** as the key.
* Metadata defined on static members of class declaration *C* are stored in *C*.\[\[Metadata\]\], with the property key as the key.
* Metadata defined on instance members of class declaration *C* are stored in *C*.prototype.\[\[Metadata\]\], with the property key as the key.
## API
```JavaScript
// define metadata on an object or property
Reflect.defineMetadata(metadataKey, metadataValue, target);
Reflect.defineMetadata(metadataKey, metadataValue, target, propertyKey);
// check for presence of a metadata key on the prototype chain of an object or property
let result = Reflect.hasMetadata(metadataKey, target);
let result = Reflect.hasMetadata(metadataKey, target, propertyKey);
// check for presence of an own metadata key of an object or property
let result = Reflect.hasOwnMetadata(metadataKey, target);
let result = Reflect.hasOwnMetadata(metadataKey, target, propertyKey);
// get metadata value of a metadata key on the prototype chain of an object or property
let result = Reflect.getMetadata(metadataKey, target);
let result = Reflect.getMetadata(metadataKey, target, propertyKey);
// get metadata value of an own metadata key of an object or property
let result = Reflect.getOwnMetadata(metadataKey, target);
let result = Reflect.getOwnMetadata(metadataKey, target, propertyKey);
// get all metadata keys on the prototype chain of an object or property
let result = Reflect.getMetadataKeys(target);
let result = Reflect.getMetadataKeys(target, propertyKey);
// get all own metadata keys of an object or property
let result = Reflect.getOwnMetadataKeys(target);
let result = Reflect.getOwnMetadataKeys(target, propertyKey);
// delete metadata from an object or property
let result = Reflect.deleteMetadata(metadataKey, target);
let result = Reflect.deleteMetadata(metadataKey, target, propertyKey);
// apply metadata via a decorator to a constructor
@Reflect.metadata(metadataKey, metadataValue)
class C {
// apply metadata via a decorator to a method (property)
@Reflect.metadata(metadataKey, metadataValue)
method() {
}
}
```
## Alternatives
* Use properties rather than a separate API.
* Obvious downside is that this can be a lot of code:
```JavaScript
function ParamTypes(...types) {
return (target, propertyKey) => {
const symParamTypes = Symbol.for("design:paramtypes");
if (propertyKey === undefined) {
target[symParamTypes] = types;
}
else {
const symProperties = Symbol.for("design:properties");
let properties, property;
if (Object.prototype.hasOwnProperty.call(target, symProperties)) {
properties = target[symProperties];
}
else {
properties = target[symProperties] = {};
}
if (Object.prototype.hasOwnProperty.call(properties, propertyKey)) {
property = properties[propertyKey];
}
else {
property = properties[propertyKey] = {};
}
property[symParamTypes] = types;
}
};
}
```
## Notes
* Though it may seem counterintuitive, the methods on Reflect place the parameters for the metadata key and metadata value before the target or property key. This is due to the fact that the property key is the only optional parameter in the argument list. This also makes the methods easier to curry with Function#bind. This also helps reduce the overall footprint and complexity of a metadata-producing decorator that could target both a class or a property:
```JavaScript
function ParamTypes(...types) {
// as propertyKey is effectively optional, its easier to use here
return (target, propertyKey) => { Reflect.defineMetadata("design:paramtypes", types, target, propertyKey); }
// vs. having multiple overloads with the target and key in the front:
//
// return (target, propertyKey) => {
// if (propertyKey === undefined) {
// Reflect.defineMetadata(target, "design:paramtypes", types);
// }
// else {
// Reflect.defineMetadata(target, propertyKey, "design:paramtypes", types);
// }
// }
//
// vs. having a different methods for the class or a property:
//
// return (target, propertyKey) => {
// if (propertyKey === undefined) {
// Reflect.defineMetadata(target, "design:paramtypes", types);
// }
// else {
// Reflect.definePropertyMetadata(target, propertyKey, "design:paramtypes", types);
// }
// }
}
```
* To enable experimental support for metadata decorators in your TypeScript project, you must add `"experimentalDecorators": true` to your tsconfig.json file.
* To enable experimental support for auto-generated type metadata in your TypeScript project, you must add `"emitDecoratorMetadata": true` to your tsconfig.json file.
* Please note that auto-generated type metadata may have issues with circular or forward references for types.
## Issues
* A poorly written mutating decorator for a class constructor could cause metadata to become lost if the prototype chain is not maintained. Though, not maintaining the prototype chain in a mutating decorator for a class constructor would have other negative side effects as well. @rbuckton
* This is mitigated if the mutating decorator returns a class expression that extends from the target, or returns a proxy for the decorator. @rbuckton
* Metadata for a method is attached to the class (or prototype) via the property key. It would not then be available if trying to read metadata on the function of the method (e.g. "tearing-off" the method from the class). @rbuckton
[metadata-spec]: https://rbuckton.github.io/reflect-metadata
[traceur]: https://github.com/google/traceur-compiler

1415
node_modules/reflect-metadata/Reflect.js generated vendored Normal file

File diff suppressed because it is too large Load diff

1137
node_modules/reflect-metadata/ReflectLite.js generated vendored Normal file

File diff suppressed because it is too large Load diff

1111
node_modules/reflect-metadata/ReflectNoConflict.js generated vendored Normal file

File diff suppressed because it is too large Load diff

491
node_modules/reflect-metadata/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,491 @@
/*! *****************************************************************************
Copyright (C) Microsoft. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
// The "reflect-metadata" module has no imports or exports, but can be imported by modules to load the polyfill.
export { };
declare global {
namespace Reflect {
/**
* Applies a set of decorators to a target object.
* @param decorators An array of decorators.
* @param target The target object.
* @returns The result of applying the provided decorators.
* @remarks Decorators are applied in reverse order of their positions in the array.
* @example
*
* class Example { }
*
* // constructor
* Example = Reflect.decorate(decoratorsArray, Example);
*
*/
function decorate(decorators: ClassDecorator[], target: Function): Function;
/**
* Applies a set of decorators to a property of a target object.
* @param decorators An array of decorators.
* @param target The target object.
* @param propertyKey The property key to decorate.
* @param attributes A property descriptor.
* @remarks Decorators are applied in reverse order.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod() { }
* method() { }
* }
*
* // property (on constructor)
* Reflect.decorate(decoratorsArray, Example, "staticProperty");
*
* // property (on prototype)
* Reflect.decorate(decoratorsArray, Example.prototype, "property");
*
* // method (on constructor)
* Object.defineProperty(Example, "staticMethod",
* Reflect.decorate(decoratorsArray, Example, "staticMethod",
* Object.getOwnPropertyDescriptor(Example, "staticMethod")));
*
* // method (on prototype)
* Object.defineProperty(Example.prototype, "method",
* Reflect.decorate(decoratorsArray, Example.prototype, "method",
* Object.getOwnPropertyDescriptor(Example.prototype, "method")));
*
*/
function decorate(decorators: (PropertyDecorator | MethodDecorator)[], target: Object, propertyKey: string | symbol, attributes?: PropertyDescriptor): PropertyDescriptor;
/**
* A default metadata decorator factory that can be used on a class, class member, or parameter.
* @param metadataKey The key for the metadata entry.
* @param metadataValue The value for the metadata entry.
* @returns A decorator function.
* @remarks
* If `metadataKey` is already defined for the target and target key, the
* metadataValue for that key will be overwritten.
* @example
*
* // constructor
* @Reflect.metadata(key, value)
* class Example {
* }
*
* // property (on constructor, TypeScript only)
* class Example {
* @Reflect.metadata(key, value)
* static staticProperty;
* }
*
* // property (on prototype, TypeScript only)
* class Example {
* @Reflect.metadata(key, value)
* property;
* }
*
* // method (on constructor)
* class Example {
* @Reflect.metadata(key, value)
* static staticMethod() { }
* }
*
* // method (on prototype)
* class Example {
* @Reflect.metadata(key, value)
* method() { }
* }
*
*/
function metadata(metadataKey: any, metadataValue: any): {
(target: Function): void;
(target: Object, propertyKey: string | symbol): void;
};
/**
* Define a unique metadata entry on the target.
* @param metadataKey A key used to store and retrieve metadata.
* @param metadataValue A value that contains attached metadata.
* @param target The target object on which to define metadata.
* @example
*
* class Example {
* }
*
* // constructor
* Reflect.defineMetadata("custom:annotation", options, Example);
*
* // decorator factory as metadata-producing annotation.
* function MyAnnotation(options): ClassDecorator {
* return target => Reflect.defineMetadata("custom:annotation", options, target);
* }
*
*/
function defineMetadata(metadataKey: any, metadataValue: any, target: Object): void;
/**
* Define a unique metadata entry on the target.
* @param metadataKey A key used to store and retrieve metadata.
* @param metadataValue A value that contains attached metadata.
* @param target The target object on which to define metadata.
* @param propertyKey The property key for the target.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* Reflect.defineMetadata("custom:annotation", Number, Example, "staticProperty");
*
* // property (on prototype)
* Reflect.defineMetadata("custom:annotation", Number, Example.prototype, "property");
*
* // method (on constructor)
* Reflect.defineMetadata("custom:annotation", Number, Example, "staticMethod");
*
* // method (on prototype)
* Reflect.defineMetadata("custom:annotation", Number, Example.prototype, "method");
*
* // decorator factory as metadata-producing annotation.
* function MyAnnotation(options): PropertyDecorator {
* return (target, key) => Reflect.defineMetadata("custom:annotation", options, target, key);
* }
*
*/
function defineMetadata(metadataKey: any, metadataValue: any, target: Object, propertyKey: string | symbol): void;
/**
* Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`.
* @example
*
* class Example {
* }
*
* // constructor
* result = Reflect.hasMetadata("custom:annotation", Example);
*
*/
function hasMetadata(metadataKey: any, target: Object): boolean;
/**
* Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @param propertyKey The property key for the target.
* @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* result = Reflect.hasMetadata("custom:annotation", Example, "staticProperty");
*
* // property (on prototype)
* result = Reflect.hasMetadata("custom:annotation", Example.prototype, "property");
*
* // method (on constructor)
* result = Reflect.hasMetadata("custom:annotation", Example, "staticMethod");
*
* // method (on prototype)
* result = Reflect.hasMetadata("custom:annotation", Example.prototype, "method");
*
*/
function hasMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): boolean;
/**
* Gets a value indicating whether the target object has the provided metadata key defined.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @returns `true` if the metadata key was defined on the target object; otherwise, `false`.
* @example
*
* class Example {
* }
*
* // constructor
* result = Reflect.hasOwnMetadata("custom:annotation", Example);
*
*/
function hasOwnMetadata(metadataKey: any, target: Object): boolean;
/**
* Gets a value indicating whether the target object has the provided metadata key defined.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @param propertyKey The property key for the target.
* @returns `true` if the metadata key was defined on the target object; otherwise, `false`.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticProperty");
*
* // property (on prototype)
* result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "property");
*
* // method (on constructor)
* result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticMethod");
*
* // method (on prototype)
* result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "method");
*
*/
function hasOwnMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): boolean;
/**
* Gets the metadata value for the provided metadata key on the target object or its prototype chain.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
* @example
*
* class Example {
* }
*
* // constructor
* result = Reflect.getMetadata("custom:annotation", Example);
*
*/
function getMetadata(metadataKey: any, target: Object): any;
/**
* Gets the metadata value for the provided metadata key on the target object or its prototype chain.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @param propertyKey The property key for the target.
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* result = Reflect.getMetadata("custom:annotation", Example, "staticProperty");
*
* // property (on prototype)
* result = Reflect.getMetadata("custom:annotation", Example.prototype, "property");
*
* // method (on constructor)
* result = Reflect.getMetadata("custom:annotation", Example, "staticMethod");
*
* // method (on prototype)
* result = Reflect.getMetadata("custom:annotation", Example.prototype, "method");
*
*/
function getMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): any;
/**
* Gets the metadata value for the provided metadata key on the target object.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
* @example
*
* class Example {
* }
*
* // constructor
* result = Reflect.getOwnMetadata("custom:annotation", Example);
*
*/
function getOwnMetadata(metadataKey: any, target: Object): any;
/**
* Gets the metadata value for the provided metadata key on the target object.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @param propertyKey The property key for the target.
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* result = Reflect.getOwnMetadata("custom:annotation", Example, "staticProperty");
*
* // property (on prototype)
* result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "property");
*
* // method (on constructor)
* result = Reflect.getOwnMetadata("custom:annotation", Example, "staticMethod");
*
* // method (on prototype)
* result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "method");
*
*/
function getOwnMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): any;
/**
* Gets the metadata keys defined on the target object or its prototype chain.
* @param target The target object on which the metadata is defined.
* @returns An array of unique metadata keys.
* @example
*
* class Example {
* }
*
* // constructor
* result = Reflect.getMetadataKeys(Example);
*
*/
function getMetadataKeys(target: Object): any[];
/**
* Gets the metadata keys defined on the target object or its prototype chain.
* @param target The target object on which the metadata is defined.
* @param propertyKey The property key for the target.
* @returns An array of unique metadata keys.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* result = Reflect.getMetadataKeys(Example, "staticProperty");
*
* // property (on prototype)
* result = Reflect.getMetadataKeys(Example.prototype, "property");
*
* // method (on constructor)
* result = Reflect.getMetadataKeys(Example, "staticMethod");
*
* // method (on prototype)
* result = Reflect.getMetadataKeys(Example.prototype, "method");
*
*/
function getMetadataKeys(target: Object, propertyKey: string | symbol): any[];
/**
* Gets the unique metadata keys defined on the target object.
* @param target The target object on which the metadata is defined.
* @returns An array of unique metadata keys.
* @example
*
* class Example {
* }
*
* // constructor
* result = Reflect.getOwnMetadataKeys(Example);
*
*/
function getOwnMetadataKeys(target: Object): any[];
/**
* Gets the unique metadata keys defined on the target object.
* @param target The target object on which the metadata is defined.
* @param propertyKey The property key for the target.
* @returns An array of unique metadata keys.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* result = Reflect.getOwnMetadataKeys(Example, "staticProperty");
*
* // property (on prototype)
* result = Reflect.getOwnMetadataKeys(Example.prototype, "property");
*
* // method (on constructor)
* result = Reflect.getOwnMetadataKeys(Example, "staticMethod");
*
* // method (on prototype)
* result = Reflect.getOwnMetadataKeys(Example.prototype, "method");
*
*/
function getOwnMetadataKeys(target: Object, propertyKey: string | symbol): any[];
/**
* Deletes the metadata entry from the target object with the provided key.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @returns `true` if the metadata entry was found and deleted; otherwise, false.
* @example
*
* class Example {
* }
*
* // constructor
* result = Reflect.deleteMetadata("custom:annotation", Example);
*
*/
function deleteMetadata(metadataKey: any, target: Object): boolean;
/**
* Deletes the metadata entry from the target object with the provided key.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @param propertyKey The property key for the target.
* @returns `true` if the metadata entry was found and deleted; otherwise, false.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* result = Reflect.deleteMetadata("custom:annotation", Example, "staticProperty");
*
* // property (on prototype)
* result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "property");
*
* // method (on constructor)
* result = Reflect.deleteMetadata("custom:annotation", Example, "staticMethod");
*
* // method (on prototype)
* result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "method");
*
*/
function deleteMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): boolean;
}
}

484
node_modules/reflect-metadata/no-conflict.d.ts generated vendored Normal file
View file

@ -0,0 +1,484 @@
/*! *****************************************************************************
Copyright (C) Microsoft. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/**
* Applies a set of decorators to a target object.
* @param decorators An array of decorators.
* @param target The target object.
* @returns The result of applying the provided decorators.
* @remarks Decorators are applied in reverse order of their positions in the array.
* @example
*
* class Example { }
*
* // constructor
* Example = Reflect.decorate(decoratorsArray, Example);
*
*/
export declare function decorate(decorators: ClassDecorator[], target: Function): Function;
/**
* Applies a set of decorators to a property of a target object.
* @param decorators An array of decorators.
* @param target The target object.
* @param propertyKey The property key to decorate.
* @param attributes A property descriptor.
* @remarks Decorators are applied in reverse order.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod() { }
* method() { }
* }
*
* // property (on constructor)
* Reflect.decorate(decoratorsArray, Example, "staticProperty");
*
* // property (on prototype)
* Reflect.decorate(decoratorsArray, Example.prototype, "property");
*
* // method (on constructor)
* Object.defineProperty(Example, "staticMethod",
* Reflect.decorate(decoratorsArray, Example, "staticMethod",
* Object.getOwnPropertyDescriptor(Example, "staticMethod")));
*
* // method (on prototype)
* Object.defineProperty(Example.prototype, "method",
* Reflect.decorate(decoratorsArray, Example.prototype, "method",
* Object.getOwnPropertyDescriptor(Example.prototype, "method")));
*
*/
export declare function decorate(decorators: (PropertyDecorator | MethodDecorator)[], target: Object, propertyKey: string | symbol, attributes?: PropertyDescriptor): PropertyDescriptor;
/**
* A default metadata decorator factory that can be used on a class, class member, or parameter.
* @param metadataKey The key for the metadata entry.
* @param metadataValue The value for the metadata entry.
* @returns A decorator function.
* @remarks
* If `metadataKey` is already defined for the target and target key, the
* metadataValue for that key will be overwritten.
* @example
*
* // constructor
* @Reflect.metadata(key, value)
* class Example {
* }
*
* // property (on constructor, TypeScript only)
* class Example {
* @Reflect.metadata(key, value)
* static staticProperty;
* }
*
* // property (on prototype, TypeScript only)
* class Example {
* @Reflect.metadata(key, value)
* property;
* }
*
* // method (on constructor)
* class Example {
* @Reflect.metadata(key, value)
* static staticMethod() { }
* }
*
* // method (on prototype)
* class Example {
* @Reflect.metadata(key, value)
* method() { }
* }
*
*/
export declare function metadata(metadataKey: any, metadataValue: any): {
(target: Function): void;
(target: Object, propertyKey: string | symbol): void;
};
/**
* Define a unique metadata entry on the target.
* @param metadataKey A key used to store and retrieve metadata.
* @param metadataValue A value that contains attached metadata.
* @param target The target object on which to define metadata.
* @example
*
* class Example {
* }
*
* // constructor
* Reflect.defineMetadata("custom:annotation", options, Example);
*
* // decorator factory as metadata-producing annotation.
* function MyAnnotation(options): ClassDecorator {
* return target => Reflect.defineMetadata("custom:annotation", options, target);
* }
*
*/
export declare function defineMetadata(metadataKey: any, metadataValue: any, target: Object): void;
/**
* Define a unique metadata entry on the target.
* @param metadataKey A key used to store and retrieve metadata.
* @param metadataValue A value that contains attached metadata.
* @param target The target object on which to define metadata.
* @param propertyKey The property key for the target.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* Reflect.defineMetadata("custom:annotation", Number, Example, "staticProperty");
*
* // property (on prototype)
* Reflect.defineMetadata("custom:annotation", Number, Example.prototype, "property");
*
* // method (on constructor)
* Reflect.defineMetadata("custom:annotation", Number, Example, "staticMethod");
*
* // method (on prototype)
* Reflect.defineMetadata("custom:annotation", Number, Example.prototype, "method");
*
* // decorator factory as metadata-producing annotation.
* function MyAnnotation(options): PropertyDecorator {
* return (target, key) => Reflect.defineMetadata("custom:annotation", options, target, key);
* }
*
*/
export declare function defineMetadata(metadataKey: any, metadataValue: any, target: Object, propertyKey: string | symbol): void;
/**
* Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`.
* @example
*
* class Example {
* }
*
* // constructor
* result = Reflect.hasMetadata("custom:annotation", Example);
*
*/
export declare function hasMetadata(metadataKey: any, target: Object): boolean;
/**
* Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @param propertyKey The property key for the target.
* @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* result = Reflect.hasMetadata("custom:annotation", Example, "staticProperty");
*
* // property (on prototype)
* result = Reflect.hasMetadata("custom:annotation", Example.prototype, "property");
*
* // method (on constructor)
* result = Reflect.hasMetadata("custom:annotation", Example, "staticMethod");
*
* // method (on prototype)
* result = Reflect.hasMetadata("custom:annotation", Example.prototype, "method");
*
*/
export declare function hasMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): boolean;
/**
* Gets a value indicating whether the target object has the provided metadata key defined.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @returns `true` if the metadata key was defined on the target object; otherwise, `false`.
* @example
*
* class Example {
* }
*
* // constructor
* result = Reflect.hasOwnMetadata("custom:annotation", Example);
*
*/
export declare function hasOwnMetadata(metadataKey: any, target: Object): boolean;
/**
* Gets a value indicating whether the target object has the provided metadata key defined.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @param propertyKey The property key for the target.
* @returns `true` if the metadata key was defined on the target object; otherwise, `false`.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticProperty");
*
* // property (on prototype)
* result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "property");
*
* // method (on constructor)
* result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticMethod");
*
* // method (on prototype)
* result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "method");
*
*/
export declare function hasOwnMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): boolean;
/**
* Gets the metadata value for the provided metadata key on the target object or its prototype chain.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
* @example
*
* class Example {
* }
*
* // constructor
* result = Reflect.getMetadata("custom:annotation", Example);
*
*/
export declare function getMetadata(metadataKey: any, target: Object): any;
/**
* Gets the metadata value for the provided metadata key on the target object or its prototype chain.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @param propertyKey The property key for the target.
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* result = Reflect.getMetadata("custom:annotation", Example, "staticProperty");
*
* // property (on prototype)
* result = Reflect.getMetadata("custom:annotation", Example.prototype, "property");
*
* // method (on constructor)
* result = Reflect.getMetadata("custom:annotation", Example, "staticMethod");
*
* // method (on prototype)
* result = Reflect.getMetadata("custom:annotation", Example.prototype, "method");
*
*/
export declare function getMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): any;
/**
* Gets the metadata value for the provided metadata key on the target object.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
* @example
*
* class Example {
* }
*
* // constructor
* result = Reflect.getOwnMetadata("custom:annotation", Example);
*
*/
export declare function getOwnMetadata(metadataKey: any, target: Object): any;
/**
* Gets the metadata value for the provided metadata key on the target object.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @param propertyKey The property key for the target.
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* result = Reflect.getOwnMetadata("custom:annotation", Example, "staticProperty");
*
* // property (on prototype)
* result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "property");
*
* // method (on constructor)
* result = Reflect.getOwnMetadata("custom:annotation", Example, "staticMethod");
*
* // method (on prototype)
* result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "method");
*
*/
export declare function getOwnMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): any;
/**
* Gets the metadata keys defined on the target object or its prototype chain.
* @param target The target object on which the metadata is defined.
* @returns An array of unique metadata keys.
* @example
*
* class Example {
* }
*
* // constructor
* result = Reflect.getMetadataKeys(Example);
*
*/
export declare function getMetadataKeys(target: Object): any[];
/**
* Gets the metadata keys defined on the target object or its prototype chain.
* @param target The target object on which the metadata is defined.
* @param propertyKey The property key for the target.
* @returns An array of unique metadata keys.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* result = Reflect.getMetadataKeys(Example, "staticProperty");
*
* // property (on prototype)
* result = Reflect.getMetadataKeys(Example.prototype, "property");
*
* // method (on constructor)
* result = Reflect.getMetadataKeys(Example, "staticMethod");
*
* // method (on prototype)
* result = Reflect.getMetadataKeys(Example.prototype, "method");
*
*/
export declare function getMetadataKeys(target: Object, propertyKey: string | symbol): any[];
/**
* Gets the unique metadata keys defined on the target object.
* @param target The target object on which the metadata is defined.
* @returns An array of unique metadata keys.
* @example
*
* class Example {
* }
*
* // constructor
* result = Reflect.getOwnMetadataKeys(Example);
*
*/
export declare function getOwnMetadataKeys(target: Object): any[];
/**
* Gets the unique metadata keys defined on the target object.
* @param target The target object on which the metadata is defined.
* @param propertyKey The property key for the target.
* @returns An array of unique metadata keys.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* result = Reflect.getOwnMetadataKeys(Example, "staticProperty");
*
* // property (on prototype)
* result = Reflect.getOwnMetadataKeys(Example.prototype, "property");
*
* // method (on constructor)
* result = Reflect.getOwnMetadataKeys(Example, "staticMethod");
*
* // method (on prototype)
* result = Reflect.getOwnMetadataKeys(Example.prototype, "method");
*
*/
export declare function getOwnMetadataKeys(target: Object, propertyKey: string | symbol): any[];
/**
* Deletes the metadata entry from the target object with the provided key.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @returns `true` if the metadata entry was found and deleted; otherwise, false.
* @example
*
* class Example {
* }
*
* // constructor
* result = Reflect.deleteMetadata("custom:annotation", Example);
*
*/
export declare function deleteMetadata(metadataKey: any, target: Object): boolean;
/**
* Deletes the metadata entry from the target object with the provided key.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @param propertyKey The property key for the target.
* @returns `true` if the metadata entry was found and deleted; otherwise, false.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* result = Reflect.deleteMetadata("custom:annotation", Example, "staticProperty");
*
* // property (on prototype)
* result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "property");
*
* // method (on constructor)
* result = Reflect.deleteMetadata("custom:annotation", Example, "staticMethod");
*
* // method (on prototype)
* result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "method");
*
*/
export declare function deleteMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): boolean;

68
node_modules/reflect-metadata/package.json generated vendored Normal file
View file

@ -0,0 +1,68 @@
{
"name": "reflect-metadata",
"version": "0.2.2",
"description": "Polyfill for Metadata Reflection API",
"type": "commonjs",
"main": "Reflect.js",
"types": "index.d.ts",
"exports": {
".": {
"types": "./index.d.ts",
"default": "./Reflect.js"
},
"./lite": {
"types": "./index.d.ts",
"default": "./ReflectLite.js"
},
"./no-conflict": {
"types": "./no-conflict.d.ts",
"default": "./ReflectNoConflict.js"
},
"./Reflect": "./Reflect.js",
"./Reflect.js": "./Reflect.js"
},
"scripts": {
"prepublishOnly": "gulp prepublish",
"build": "gulp build",
"test": "gulp test",
"start": "gulp start"
},
"repository": {
"type": "git",
"url": "https://github.com/rbuckton/reflect-metadata.git"
},
"keywords": [
"decorator",
"metadata",
"javascript",
"reflect"
],
"author": {
"name": "Ron Buckton",
"email": "ron.buckton@microsoft.com",
"url": "http://github.com/rbuckton"
},
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/rbuckton/reflect-metadata/issues"
},
"homepage": "http://rbuckton.github.io/reflect-metadata",
"dependencies": {},
"devDependencies": {
"@types/chai": "^3.4.34",
"@types/mocha": "^2.2.34",
"@types/node": "^10.17.60",
"chai": "^3.5.0",
"del": "^2.2.2",
"ecmarkup": "^3.9.3",
"gulp": "^3.9.1",
"gulp-emu": "^1.1.0",
"gulp-live-server": "0.0.30",
"gulp-mocha": "^3.0.1",
"gulp-rename": "^1.2.2",
"gulp-sequence": "^0.4.6",
"gulp-tsb": "^2.0.3",
"mocha": "^3.2.0",
"typescript": "^2.1.4"
}
}

485
node_modules/reflect-metadata/standalone.d.ts generated vendored Normal file
View file

@ -0,0 +1,485 @@
/*! *****************************************************************************
Copyright (C) Microsoft. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
declare namespace Reflect {
/**
* Applies a set of decorators to a target object.
* @param decorators An array of decorators.
* @param target The target object.
* @returns The result of applying the provided decorators.
* @remarks Decorators are applied in reverse order of their positions in the array.
* @example
*
* class Example { }
*
* // constructor
* Example = Reflect.decorate(decoratorsArray, Example);
*
*/
function decorate(decorators: ClassDecorator[], target: Function): Function;
/**
* Applies a set of decorators to a property of a target object.
* @param decorators An array of decorators.
* @param target The target object.
* @param propertyKey The property key to decorate.
* @param attributes A property descriptor.
* @remarks Decorators are applied in reverse order.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod() { }
* method() { }
* }
*
* // property (on constructor)
* Reflect.decorate(decoratorsArray, Example, "staticProperty");
*
* // property (on prototype)
* Reflect.decorate(decoratorsArray, Example.prototype, "property");
*
* // method (on constructor)
* Object.defineProperty(Example, "staticMethod",
* Reflect.decorate(decoratorsArray, Example, "staticMethod",
* Object.getOwnPropertyDescriptor(Example, "staticMethod")));
*
* // method (on prototype)
* Object.defineProperty(Example.prototype, "method",
* Reflect.decorate(decoratorsArray, Example.prototype, "method",
* Object.getOwnPropertyDescriptor(Example.prototype, "method")));
*
*/
function decorate(decorators: (PropertyDecorator | MethodDecorator)[], target: Object, propertyKey: string | symbol, attributes?: PropertyDescriptor): PropertyDescriptor;
/**
* A default metadata decorator factory that can be used on a class, class member, or parameter.
* @param metadataKey The key for the metadata entry.
* @param metadataValue The value for the metadata entry.
* @returns A decorator function.
* @remarks
* If `metadataKey` is already defined for the target and target key, the
* metadataValue for that key will be overwritten.
* @example
*
* // constructor
* @Reflect.metadata(key, value)
* class Example {
* }
*
* // property (on constructor, TypeScript only)
* class Example {
* @Reflect.metadata(key, value)
* static staticProperty;
* }
*
* // property (on prototype, TypeScript only)
* class Example {
* @Reflect.metadata(key, value)
* property;
* }
*
* // method (on constructor)
* class Example {
* @Reflect.metadata(key, value)
* static staticMethod() { }
* }
*
* // method (on prototype)
* class Example {
* @Reflect.metadata(key, value)
* method() { }
* }
*
*/
function metadata(metadataKey: any, metadataValue: any): {
(target: Function): void;
(target: Object, propertyKey: string | symbol): void;
};
/**
* Define a unique metadata entry on the target.
* @param metadataKey A key used to store and retrieve metadata.
* @param metadataValue A value that contains attached metadata.
* @param target The target object on which to define metadata.
* @example
*
* class Example {
* }
*
* // constructor
* Reflect.defineMetadata("custom:annotation", options, Example);
*
* // decorator factory as metadata-producing annotation.
* function MyAnnotation(options): ClassDecorator {
* return target => Reflect.defineMetadata("custom:annotation", options, target);
* }
*
*/
function defineMetadata(metadataKey: any, metadataValue: any, target: Object): void;
/**
* Define a unique metadata entry on the target.
* @param metadataKey A key used to store and retrieve metadata.
* @param metadataValue A value that contains attached metadata.
* @param target The target object on which to define metadata.
* @param propertyKey The property key for the target.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* Reflect.defineMetadata("custom:annotation", Number, Example, "staticProperty");
*
* // property (on prototype)
* Reflect.defineMetadata("custom:annotation", Number, Example.prototype, "property");
*
* // method (on constructor)
* Reflect.defineMetadata("custom:annotation", Number, Example, "staticMethod");
*
* // method (on prototype)
* Reflect.defineMetadata("custom:annotation", Number, Example.prototype, "method");
*
* // decorator factory as metadata-producing annotation.
* function MyAnnotation(options): PropertyDecorator {
* return (target, key) => Reflect.defineMetadata("custom:annotation", options, target, key);
* }
*
*/
function defineMetadata(metadataKey: any, metadataValue: any, target: Object, propertyKey: string | symbol): void;
/**
* Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`.
* @example
*
* class Example {
* }
*
* // constructor
* result = Reflect.hasMetadata("custom:annotation", Example);
*
*/
function hasMetadata(metadataKey: any, target: Object): boolean;
/**
* Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @param propertyKey The property key for the target.
* @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* result = Reflect.hasMetadata("custom:annotation", Example, "staticProperty");
*
* // property (on prototype)
* result = Reflect.hasMetadata("custom:annotation", Example.prototype, "property");
*
* // method (on constructor)
* result = Reflect.hasMetadata("custom:annotation", Example, "staticMethod");
*
* // method (on prototype)
* result = Reflect.hasMetadata("custom:annotation", Example.prototype, "method");
*
*/
function hasMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): boolean;
/**
* Gets a value indicating whether the target object has the provided metadata key defined.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @returns `true` if the metadata key was defined on the target object; otherwise, `false`.
* @example
*
* class Example {
* }
*
* // constructor
* result = Reflect.hasOwnMetadata("custom:annotation", Example);
*
*/
function hasOwnMetadata(metadataKey: any, target: Object): boolean;
/**
* Gets a value indicating whether the target object has the provided metadata key defined.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @param propertyKey The property key for the target.
* @returns `true` if the metadata key was defined on the target object; otherwise, `false`.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticProperty");
*
* // property (on prototype)
* result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "property");
*
* // method (on constructor)
* result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticMethod");
*
* // method (on prototype)
* result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "method");
*
*/
function hasOwnMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): boolean;
/**
* Gets the metadata value for the provided metadata key on the target object or its prototype chain.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
* @example
*
* class Example {
* }
*
* // constructor
* result = Reflect.getMetadata("custom:annotation", Example);
*
*/
function getMetadata(metadataKey: any, target: Object): any;
/**
* Gets the metadata value for the provided metadata key on the target object or its prototype chain.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @param propertyKey The property key for the target.
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* result = Reflect.getMetadata("custom:annotation", Example, "staticProperty");
*
* // property (on prototype)
* result = Reflect.getMetadata("custom:annotation", Example.prototype, "property");
*
* // method (on constructor)
* result = Reflect.getMetadata("custom:annotation", Example, "staticMethod");
*
* // method (on prototype)
* result = Reflect.getMetadata("custom:annotation", Example.prototype, "method");
*
*/
function getMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): any;
/**
* Gets the metadata value for the provided metadata key on the target object.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
* @example
*
* class Example {
* }
*
* // constructor
* result = Reflect.getOwnMetadata("custom:annotation", Example);
*
*/
function getOwnMetadata(metadataKey: any, target: Object): any;
/**
* Gets the metadata value for the provided metadata key on the target object.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @param propertyKey The property key for the target.
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* result = Reflect.getOwnMetadata("custom:annotation", Example, "staticProperty");
*
* // property (on prototype)
* result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "property");
*
* // method (on constructor)
* result = Reflect.getOwnMetadata("custom:annotation", Example, "staticMethod");
*
* // method (on prototype)
* result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "method");
*
*/
function getOwnMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): any;
/**
* Gets the metadata keys defined on the target object or its prototype chain.
* @param target The target object on which the metadata is defined.
* @returns An array of unique metadata keys.
* @example
*
* class Example {
* }
*
* // constructor
* result = Reflect.getMetadataKeys(Example);
*
*/
function getMetadataKeys(target: Object): any[];
/**
* Gets the metadata keys defined on the target object or its prototype chain.
* @param target The target object on which the metadata is defined.
* @param propertyKey The property key for the target.
* @returns An array of unique metadata keys.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* result = Reflect.getMetadataKeys(Example, "staticProperty");
*
* // property (on prototype)
* result = Reflect.getMetadataKeys(Example.prototype, "property");
*
* // method (on constructor)
* result = Reflect.getMetadataKeys(Example, "staticMethod");
*
* // method (on prototype)
* result = Reflect.getMetadataKeys(Example.prototype, "method");
*
*/
function getMetadataKeys(target: Object, propertyKey: string | symbol): any[];
/**
* Gets the unique metadata keys defined on the target object.
* @param target The target object on which the metadata is defined.
* @returns An array of unique metadata keys.
* @example
*
* class Example {
* }
*
* // constructor
* result = Reflect.getOwnMetadataKeys(Example);
*
*/
function getOwnMetadataKeys(target: Object): any[];
/**
* Gets the unique metadata keys defined on the target object.
* @param target The target object on which the metadata is defined.
* @param propertyKey The property key for the target.
* @returns An array of unique metadata keys.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* result = Reflect.getOwnMetadataKeys(Example, "staticProperty");
*
* // property (on prototype)
* result = Reflect.getOwnMetadataKeys(Example.prototype, "property");
*
* // method (on constructor)
* result = Reflect.getOwnMetadataKeys(Example, "staticMethod");
*
* // method (on prototype)
* result = Reflect.getOwnMetadataKeys(Example.prototype, "method");
*
*/
function getOwnMetadataKeys(target: Object, propertyKey: string | symbol): any[];
/**
* Deletes the metadata entry from the target object with the provided key.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @returns `true` if the metadata entry was found and deleted; otherwise, false.
* @example
*
* class Example {
* }
*
* // constructor
* result = Reflect.deleteMetadata("custom:annotation", Example);
*
*/
function deleteMetadata(metadataKey: any, target: Object): boolean;
/**
* Deletes the metadata entry from the target object with the provided key.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @param propertyKey The property key for the target.
* @returns `true` if the metadata entry was found and deleted; otherwise, false.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* result = Reflect.deleteMetadata("custom:annotation", Example, "staticProperty");
*
* // property (on prototype)
* result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "property");
*
* // method (on constructor)
* result = Reflect.deleteMetadata("custom:annotation", Example, "staticMethod");
*
* // method (on prototype)
* result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "method");
*
*/
function deleteMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): boolean;
}