@loopback/metadata 4.0.0-alpha.8 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +273 -150
- package/dist/decorator-factory.d.ts +297 -0
- package/{dist6/src → dist}/decorator-factory.js +197 -90
- package/dist/decorator-factory.js.map +1 -0
- package/dist/index.d.ts +22 -1
- package/dist/index.js +24 -7
- package/dist/index.js.map +1 -0
- package/dist/inspector.d.ts +120 -0
- package/dist/inspector.js +186 -0
- package/dist/inspector.js.map +1 -0
- package/dist/{src/reflect.d.ts → reflect.d.ts} +16 -15
- package/dist/{src/reflect.js → reflect.js} +7 -8
- package/dist/reflect.js.map +1 -0
- package/dist/types.d.ts +70 -0
- package/dist/types.js +32 -0
- package/dist/types.js.map +1 -0
- package/package.json +43 -44
- package/src/decorator-factory.ts +289 -140
- package/src/index.ts +22 -2
- package/src/inspector.ts +118 -126
- package/src/reflect.ts +32 -21
- package/src/types.ts +94 -0
- package/CHANGELOG.md +0 -91
- package/api-docs/apple-touch-icon-114x114-precomposed.png +0 -0
- package/api-docs/apple-touch-icon-144x144-precomposed.png +0 -0
- package/api-docs/apple-touch-icon-57x57-precomposed.png +0 -0
- package/api-docs/apple-touch-icon-72x72-precomposed.png +0 -0
- package/api-docs/apple-touch-icon-precomposed.png +0 -0
- package/api-docs/apple-touch-icon.png +0 -0
- package/api-docs/css/bootstrap.min.css +0 -9
- package/api-docs/css/code-themes/arta.css +0 -158
- package/api-docs/css/code-themes/ascetic.css +0 -50
- package/api-docs/css/code-themes/brown_paper.css +0 -104
- package/api-docs/css/code-themes/brown_papersq.png +0 -0
- package/api-docs/css/code-themes/dark.css +0 -103
- package/api-docs/css/code-themes/default.css +0 -135
- package/api-docs/css/code-themes/far.css +0 -111
- package/api-docs/css/code-themes/github.css +0 -127
- package/api-docs/css/code-themes/googlecode.css +0 -144
- package/api-docs/css/code-themes/idea.css +0 -121
- package/api-docs/css/code-themes/ir_black.css +0 -104
- package/api-docs/css/code-themes/magula.css +0 -121
- package/api-docs/css/code-themes/monokai.css +0 -114
- package/api-docs/css/code-themes/pojoaque.css +0 -104
- package/api-docs/css/code-themes/pojoaque.jpg +0 -0
- package/api-docs/css/code-themes/rainbow.css +0 -114
- package/api-docs/css/code-themes/school_book.css +0 -111
- package/api-docs/css/code-themes/school_book.png +0 -0
- package/api-docs/css/code-themes/sl-theme.css +0 -45
- package/api-docs/css/code-themes/solarized_dark.css +0 -88
- package/api-docs/css/code-themes/solarized_light.css +0 -88
- package/api-docs/css/code-themes/sunburst.css +0 -158
- package/api-docs/css/code-themes/tomorrow-night-blue.css +0 -52
- package/api-docs/css/code-themes/tomorrow-night-bright.css +0 -51
- package/api-docs/css/code-themes/tomorrow-night-eighties.css +0 -51
- package/api-docs/css/code-themes/tomorrow-night.css +0 -52
- package/api-docs/css/code-themes/tomorrow.css +0 -49
- package/api-docs/css/code-themes/vs.css +0 -86
- package/api-docs/css/code-themes/xcode.css +0 -154
- package/api-docs/css/code-themes/zenburn.css +0 -115
- package/api-docs/css/main.css +0 -139
- package/api-docs/favicon.ico +0 -0
- package/api-docs/fonts/0ihfXUL2emPh0ROJezvraLO3LdcAZYWl9Si6vvxL-qU.woff +0 -0
- package/api-docs/fonts/OsJ2DjdpjqFRVUSto6IffLO3LdcAZYWl9Si6vvxL-qU.woff +0 -0
- package/api-docs/fonts/_aijTyevf54tkVDLy-dlnLO3LdcAZYWl9Si6vvxL-qU.woff +0 -0
- package/api-docs/index.html +0 -4735
- package/api-docs/js/main.js +0 -19
- package/api-docs/js/vendor/bootstrap.min.js +0 -6
- package/api-docs/js/vendor/jquery-1.10.1.min.js +0 -6
- package/api-docs/js/vendor/jquery.scrollTo-1.4.3.1.js +0 -218
- package/api-docs/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js +0 -11
- package/dist/src/decorator-factory.d.ts +0 -252
- package/dist/src/decorator-factory.js +0 -468
- package/dist/src/decorator-factory.js.map +0 -1
- package/dist/src/index.d.ts +0 -3
- package/dist/src/index.js +0 -13
- package/dist/src/index.js.map +0 -1
- package/dist/src/inspector.d.ts +0 -150
- package/dist/src/inspector.js +0 -163
- package/dist/src/inspector.js.map +0 -1
- package/dist/src/reflect.js.map +0 -1
- package/dist6/index.d.ts +0 -1
- package/dist6/index.js +0 -13
- package/dist6/src/decorator-factory.d.ts +0 -252
- package/dist6/src/decorator-factory.js.map +0 -1
- package/dist6/src/index.d.ts +0 -3
- package/dist6/src/index.js +0 -13
- package/dist6/src/index.js.map +0 -1
- package/dist6/src/inspector.d.ts +0 -150
- package/dist6/src/inspector.js +0 -163
- package/dist6/src/inspector.js.map +0 -1
- package/dist6/src/reflect.d.ts +0 -38
- package/dist6/src/reflect.js +0 -143
- package/dist6/src/reflect.js.map +0 -1
- package/index.d.ts +0 -6
- package/index.js +0 -7
package/dist/src/inspector.js
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright IBM Corp. 2017,2018. All Rights Reserved.
|
|
3
|
-
// Node module: @loopback/metadata
|
|
4
|
-
// This file is licensed under the MIT License.
|
|
5
|
-
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
const reflect_1 = require("./reflect");
|
|
8
|
-
/**
|
|
9
|
-
* TypeScript reflector without a namespace. The TypeScript compiler can be
|
|
10
|
-
* configured to add design time metadata.
|
|
11
|
-
*
|
|
12
|
-
* See https://www.typescriptlang.org/docs/handbook/decorators.html
|
|
13
|
-
*/
|
|
14
|
-
const TSReflector = new reflect_1.NamespacedReflect();
|
|
15
|
-
/**
|
|
16
|
-
* Inspector for metadata applied by decorators
|
|
17
|
-
*/
|
|
18
|
-
class MetadataInspector {
|
|
19
|
-
/**
|
|
20
|
-
* Get the metadata associated with the given key for a given class
|
|
21
|
-
* @param key Metadata key
|
|
22
|
-
* @param target Class that contains the metadata
|
|
23
|
-
* @param options Options for inspection
|
|
24
|
-
*/
|
|
25
|
-
static getClassMetadata(key, target, options) {
|
|
26
|
-
return options && options.ownMetadataOnly
|
|
27
|
-
? reflect_1.Reflector.getOwnMetadata(key, target)
|
|
28
|
-
: reflect_1.Reflector.getMetadata(key, target);
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Define metadata for the given target
|
|
32
|
-
* @param key Metadata key
|
|
33
|
-
* @param value Metadata value
|
|
34
|
-
* @param target Target for the metadata
|
|
35
|
-
* @param member Optional property or method name
|
|
36
|
-
*/
|
|
37
|
-
static defineMetadata(key, value, target, member) {
|
|
38
|
-
reflect_1.Reflector.defineMetadata(key, value, target, member);
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Get the metadata associated with the given key for all methods of the
|
|
42
|
-
* target class or prototype
|
|
43
|
-
* @param key Metadata key
|
|
44
|
-
* @param target Class for static methods or prototype for instance methods
|
|
45
|
-
* @param options Options for inspection
|
|
46
|
-
*/
|
|
47
|
-
static getAllMethodMetadata(key, target, options) {
|
|
48
|
-
return options && options.ownMetadataOnly
|
|
49
|
-
? reflect_1.Reflector.getOwnMetadata(key, target)
|
|
50
|
-
: reflect_1.Reflector.getMetadata(key, target);
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Get the metadata associated with the given key for a given method of the
|
|
54
|
-
* target class or prototype
|
|
55
|
-
* @param key Metadata key
|
|
56
|
-
* @param target Class for static methods or prototype for instance methods
|
|
57
|
-
* @param methodName Method name. If not present, default to '' to use
|
|
58
|
-
* the constructor
|
|
59
|
-
* @param options Options for inspection
|
|
60
|
-
*/
|
|
61
|
-
static getMethodMetadata(key, target, methodName, options) {
|
|
62
|
-
methodName = methodName || '';
|
|
63
|
-
const meta = options && options.ownMetadataOnly
|
|
64
|
-
? reflect_1.Reflector.getOwnMetadata(key, target)
|
|
65
|
-
: reflect_1.Reflector.getMetadata(key, target);
|
|
66
|
-
return meta && meta[methodName];
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Get the metadata associated with the given key for all properties of the
|
|
70
|
-
* target class or prototype
|
|
71
|
-
* @param key Metadata key
|
|
72
|
-
* @param target Class for static methods or prototype for instance methods
|
|
73
|
-
* @param options Options for inspection
|
|
74
|
-
*/
|
|
75
|
-
static getAllPropertyMetadata(key, target, options) {
|
|
76
|
-
return options && options.ownMetadataOnly
|
|
77
|
-
? reflect_1.Reflector.getOwnMetadata(key, target)
|
|
78
|
-
: reflect_1.Reflector.getMetadata(key, target);
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Get the metadata associated with the given key for a given property of the
|
|
82
|
-
* target class or prototype
|
|
83
|
-
* @param key Metadata key
|
|
84
|
-
* @param target Class for static properties or prototype for instance
|
|
85
|
-
* properties
|
|
86
|
-
* @param propertyName Property name
|
|
87
|
-
* @param options Options for inspection
|
|
88
|
-
*/
|
|
89
|
-
static getPropertyMetadata(key, target, propertyName, options) {
|
|
90
|
-
const meta = options && options.ownMetadataOnly
|
|
91
|
-
? reflect_1.Reflector.getOwnMetadata(key, target)
|
|
92
|
-
: reflect_1.Reflector.getMetadata(key, target);
|
|
93
|
-
return meta && meta[propertyName];
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Get the metadata associated with the given key for all parameters of a
|
|
97
|
-
* given method
|
|
98
|
-
* @param key Metadata key
|
|
99
|
-
* @param target Class for static methods or prototype for instance methods
|
|
100
|
-
* @param methodName Method name. If not present, default to '' to use
|
|
101
|
-
* the constructor
|
|
102
|
-
* @param options Options for inspection
|
|
103
|
-
*/
|
|
104
|
-
static getAllParameterMetadata(key, target, methodName, options) {
|
|
105
|
-
methodName = methodName || '';
|
|
106
|
-
const meta = options && options.ownMetadataOnly
|
|
107
|
-
? reflect_1.Reflector.getOwnMetadata(key, target)
|
|
108
|
-
: reflect_1.Reflector.getMetadata(key, target);
|
|
109
|
-
return meta && meta[methodName];
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Get the metadata associated with the given key for a parameter of a given
|
|
113
|
-
* method by index
|
|
114
|
-
* @param key Metadata key
|
|
115
|
-
* @param target Class for static methods or prototype for instance methods
|
|
116
|
-
* @param methodName Method name. If not present, default to '' to use
|
|
117
|
-
* the constructor
|
|
118
|
-
* @param index Index of the parameter, starting with 0
|
|
119
|
-
* @param options Options for inspection
|
|
120
|
-
*/
|
|
121
|
-
static getParameterMetadata(key, target, methodName, index, options) {
|
|
122
|
-
methodName = methodName || '';
|
|
123
|
-
const meta = options && options.ownMetadataOnly
|
|
124
|
-
? reflect_1.Reflector.getOwnMetadata(key, target)
|
|
125
|
-
: reflect_1.Reflector.getMetadata(key, target);
|
|
126
|
-
const params = meta && meta[methodName];
|
|
127
|
-
return params && params[index];
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Get TypeScript design time type for a property
|
|
131
|
-
* @param target Class or prototype
|
|
132
|
-
* @param propertyName Property name
|
|
133
|
-
*/
|
|
134
|
-
static getDesignTypeForProperty(target, propertyName) {
|
|
135
|
-
return TSReflector.getMetadata('design:type', target, propertyName);
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Get TypeScript design time type for a method
|
|
139
|
-
* @param target Class or prototype
|
|
140
|
-
* @param methodName Method name
|
|
141
|
-
*/
|
|
142
|
-
static getDesignTypeForMethod(target, methodName) {
|
|
143
|
-
const type = TSReflector.getMetadata('design:type', target, methodName);
|
|
144
|
-
const parameterTypes = TSReflector.getMetadata('design:paramtypes', target, methodName);
|
|
145
|
-
const returnType = TSReflector.getMetadata('design:returntype', target, methodName);
|
|
146
|
-
return {
|
|
147
|
-
type,
|
|
148
|
-
parameterTypes,
|
|
149
|
-
returnType,
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Expose Reflector, which is a wrapper of `Reflect` and it uses `loopback`
|
|
155
|
-
* as the namespace prefix for all metadata keys
|
|
156
|
-
*/
|
|
157
|
-
MetadataInspector.Reflector = reflect_1.Reflector;
|
|
158
|
-
/**
|
|
159
|
-
* Expose the reflector for TypeScript design-time metadata
|
|
160
|
-
*/
|
|
161
|
-
MetadataInspector.DesignTimeReflector = TSReflector;
|
|
162
|
-
exports.MetadataInspector = MetadataInspector;
|
|
163
|
-
//# sourceMappingURL=inspector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inspector.js","sourceRoot":"","sources":["../../src/inspector.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,kCAAkC;AAClC,+CAA+C;AAC/C,gEAAgE;;AAEhE,uCAAuD;AAGvD;;;;;GAKG;AACH,MAAM,WAAW,GAAG,IAAI,2BAAiB,EAAE,CAAC;AAsD5C;;GAEG;AACH;IAWE;;;;;OAKG;IACH,MAAM,CAAC,gBAAgB,CACrB,GAAW,EACX,MAAgB,EAChB,OAA2B;QAE3B,MAAM,CAAC,OAAO,IAAI,OAAO,CAAC,eAAe;YACvC,CAAC,CAAC,mBAAS,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC;YACvC,CAAC,CAAC,mBAAS,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACzC,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,cAAc,CACnB,GAAW,EACX,KAAQ,EACR,MAAc,EACd,MAAwB;QAExB,mBAAS,CAAC,cAAc,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACvD,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,oBAAoB,CACzB,GAAW,EACX,MAAc,EACd,OAA2B;QAE3B,MAAM,CAAC,OAAO,IAAI,OAAO,CAAC,eAAe;YACvC,CAAC,CAAC,mBAAS,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC;YACvC,CAAC,CAAC,mBAAS,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACzC,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CA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cAAc,CAAC,WAAW,CAAC,CAAC;QAC/C,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;IACtD,CAAC;CACF;AAtKD,8CAsKC;AAED,4CAA4C;AAC/B,QAAA,SAAS,GAAG,IAAI,iBAAiB,CAAC,UAAU,CAAC,CAAC"}
|
package/dist6/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './src';
|
package/dist6/index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright IBM Corp. 2017,2018. All Rights Reserved.
|
|
3
|
-
// Node module: @loopback/metadata
|
|
4
|
-
// This file is licensed under the MIT License.
|
|
5
|
-
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
-
function __export(m) {
|
|
7
|
-
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
// DO NOT EDIT THIS FILE
|
|
11
|
-
// Add any aditional (re)exports to src/index.ts instead.
|
|
12
|
-
__export(require("./src"));
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* An object mapping keys to corresponding metadata
|
|
3
|
-
*/
|
|
4
|
-
export interface MetadataMap<T> {
|
|
5
|
-
[propertyOrMethodName: string]: T;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Options for a decorator
|
|
9
|
-
*/
|
|
10
|
-
export interface DecoratorOptions {
|
|
11
|
-
/**
|
|
12
|
-
* Controls if inherited metadata will be honored. Default to `true`.
|
|
13
|
-
*/
|
|
14
|
-
allowInheritance?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Controls if the value of `spec` argument will be cloned. Sometimes we
|
|
17
|
-
* use shared spec for the decoration, but the decorator function might need
|
|
18
|
-
* to mutate the object. Cloning the input spec makes it safe to use the same
|
|
19
|
-
* spec (`template`) to decorate different members.
|
|
20
|
-
*
|
|
21
|
-
* Default to `true`.
|
|
22
|
-
*/
|
|
23
|
-
cloneInputSpec?: boolean;
|
|
24
|
-
[name: string]: any;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Decorator function types
|
|
28
|
-
*/
|
|
29
|
-
export declare type DecoratorType = ClassDecorator | PropertyDecorator | MethodDecorator | ParameterDecorator;
|
|
30
|
-
/**
|
|
31
|
-
* Base factory class for decorator functions
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* ```
|
|
35
|
-
* function classDecorator(spec: MySpec): ClassDecorator {
|
|
36
|
-
* return ClassDecoratorFactory.createDecorator('my-key', spec);
|
|
37
|
-
* }
|
|
38
|
-
* ```
|
|
39
|
-
* or
|
|
40
|
-
* ```
|
|
41
|
-
* function classDecorator(spec: MySpec): ClassDecorator {
|
|
42
|
-
* const factory: ClassDecoratorFactory<MySpec>('my-key', spec);
|
|
43
|
-
* return factory.create();
|
|
44
|
-
* }
|
|
45
|
-
* ```
|
|
46
|
-
* These functions above declare `@classDecorator` that can be used as follows:
|
|
47
|
-
* ```
|
|
48
|
-
* @classDecorator({x: 1})
|
|
49
|
-
* class MyController {}
|
|
50
|
-
* ```
|
|
51
|
-
*/
|
|
52
|
-
export declare class DecoratorFactory<T, M extends T | MetadataMap<T> | MetadataMap<T[]>, D extends DecoratorType> {
|
|
53
|
-
protected key: string;
|
|
54
|
-
protected spec: T;
|
|
55
|
-
protected options: DecoratorOptions | undefined;
|
|
56
|
-
/**
|
|
57
|
-
* A constant to reference the target of a decoration
|
|
58
|
-
*/
|
|
59
|
-
static TARGET: string;
|
|
60
|
-
/**
|
|
61
|
-
* Construct a new class decorator factory
|
|
62
|
-
* @param key Metadata key
|
|
63
|
-
* @param spec Metadata object from the decorator function
|
|
64
|
-
* @param options Options for the decorator. Default to
|
|
65
|
-
* `{allowInheritance: true}` if not provided
|
|
66
|
-
*/
|
|
67
|
-
constructor(key: string, spec: T, options?: DecoratorOptions | undefined);
|
|
68
|
-
protected allowInheritance(): boolean;
|
|
69
|
-
/**
|
|
70
|
-
* Inherit metadata from base classes. By default, this method merges base
|
|
71
|
-
* metadata into the spec if `allowInheritance` is set to `true`. To customize
|
|
72
|
-
* the behavior, this method can be overridden by sub classes.
|
|
73
|
-
*
|
|
74
|
-
* @param inheritedMetadata Metadata from base classes for the member
|
|
75
|
-
*/
|
|
76
|
-
protected inherit(inheritedMetadata: T | undefined | null): T;
|
|
77
|
-
/**
|
|
78
|
-
* Get the qualified name of a decoration target. For example:
|
|
79
|
-
* ```
|
|
80
|
-
* class MyClass
|
|
81
|
-
* MyClass.constructor[0] // First parameter of the constructor
|
|
82
|
-
* MyClass.myStaticProperty
|
|
83
|
-
* MyClass.myStaticMethod()
|
|
84
|
-
* MyClass.myStaticMethod[0] // First parameter of the myStaticMethod
|
|
85
|
-
* MyClass.prototype.myProperty
|
|
86
|
-
* MyClass.prototype.myMethod()
|
|
87
|
-
* MyClass.prototype.myMethod[1] // Second parameter of myMethod
|
|
88
|
-
* ```
|
|
89
|
-
* @param target Class or prototype of a class
|
|
90
|
-
* @param member Optional property/method name
|
|
91
|
-
* @param descriptorOrIndex Optional method descriptor or parameter index
|
|
92
|
-
*/
|
|
93
|
-
static getTargetName(target: Object, member?: string | symbol, descriptorOrIndex?: TypedPropertyDescriptor<any> | number): string;
|
|
94
|
-
/**
|
|
95
|
-
* Get the number of parameters for a given constructor or method
|
|
96
|
-
* @param target Class or the prototype
|
|
97
|
-
* @param member Method name
|
|
98
|
-
*/
|
|
99
|
-
static getNumberOfParameters(target: Object, member?: string | symbol): number;
|
|
100
|
-
/**
|
|
101
|
-
* Set a reference to the target class or prototype for a given spec if
|
|
102
|
-
* it's an object
|
|
103
|
-
* @param spec Metadata spec
|
|
104
|
-
* @param target Target of the decoration. It is a class or the prototype of
|
|
105
|
-
* a class.
|
|
106
|
-
*/
|
|
107
|
-
withTarget(spec: T, target: Object): T;
|
|
108
|
-
/**
|
|
109
|
-
* Get the optional decoration target of a given spec
|
|
110
|
-
* @param spec Metadata spec
|
|
111
|
-
*/
|
|
112
|
-
getTarget(spec: T): any;
|
|
113
|
-
/**
|
|
114
|
-
* This method is called by the default implementation of the decorator
|
|
115
|
-
* function to merge the spec argument from the decoration with the inherited
|
|
116
|
-
* metadata for a class, all properties, all methods, or all method
|
|
117
|
-
* parameters that are decorated by this decorator.
|
|
118
|
-
*
|
|
119
|
-
* It MUST be overridden by subclasses to process inherited metadata.
|
|
120
|
-
*
|
|
121
|
-
* @param inheritedMetadata Metadata inherited from the base classes
|
|
122
|
-
* @param target Decoration target
|
|
123
|
-
* @param member Optional property or method
|
|
124
|
-
* @param descriptorOrIndex Optional parameter index or method descriptor
|
|
125
|
-
*/
|
|
126
|
-
protected mergeWithInherited(inheritedMetadata: M, target: Object, member?: string | symbol, descriptorOrIndex?: TypedPropertyDescriptor<any> | number): M;
|
|
127
|
-
/**
|
|
128
|
-
* This method is called by the default implementation of the decorator
|
|
129
|
-
* function to merge the spec argument from the decoration with the own
|
|
130
|
-
* metadata for a class, all properties, all methods, or all method
|
|
131
|
-
* parameters that are decorated by this decorator.
|
|
132
|
-
*
|
|
133
|
-
* It MUST be overridden by subclasses to process own metadata.
|
|
134
|
-
*
|
|
135
|
-
* @param ownMetadata Own Metadata exists locally on the target
|
|
136
|
-
* @param target Decoration target
|
|
137
|
-
* @param member Optional property or method
|
|
138
|
-
* @param descriptorOrIndex Optional parameter index or method descriptor
|
|
139
|
-
*/
|
|
140
|
-
protected mergeWithOwn(ownMetadata: M, target: Object, member?: string | symbol, descriptorOrIndex?: TypedPropertyDescriptor<any> | number): M;
|
|
141
|
-
/**
|
|
142
|
-
* Create a decorator function of the given type. Each sub class MUST
|
|
143
|
-
* implement this method.
|
|
144
|
-
*/
|
|
145
|
-
create(): D;
|
|
146
|
-
/**
|
|
147
|
-
* Base implementation of the decorator function
|
|
148
|
-
* @param target Decorator target
|
|
149
|
-
* @param member Optional property or method
|
|
150
|
-
* @param descriptorOrIndex Optional method descriptor or parameter index
|
|
151
|
-
*/
|
|
152
|
-
protected decorate(target: Object, member?: string | symbol, descriptorOrIndex?: TypedPropertyDescriptor<any> | number): void;
|
|
153
|
-
/**
|
|
154
|
-
* Create a decorator function
|
|
155
|
-
* @param key Metadata key
|
|
156
|
-
* @param spec Metadata object from the decorator function
|
|
157
|
-
* @param options Options for the decorator
|
|
158
|
-
*/
|
|
159
|
-
protected static _createDecorator<T, M extends T | MetadataMap<T> | MetadataMap<T[]>, D extends DecoratorType>(key: string, spec: T, options?: DecoratorOptions): D;
|
|
160
|
-
static cloneDeep<T>(val: T): T;
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* Factory for class decorators
|
|
164
|
-
*/
|
|
165
|
-
export declare class ClassDecoratorFactory<T> extends DecoratorFactory<T, T, ClassDecorator> {
|
|
166
|
-
protected mergeWithInherited(inheritedMetadata: T, target: Object, member?: string | symbol, descriptorOrIndex?: TypedPropertyDescriptor<any> | number): T;
|
|
167
|
-
protected mergeWithOwn(ownMetadata: T, target: Object, member?: string | symbol, descriptorOrIndex?: TypedPropertyDescriptor<any> | number): T;
|
|
168
|
-
create(): ClassDecorator;
|
|
169
|
-
/**
|
|
170
|
-
* Create a class decorator function
|
|
171
|
-
* @param key Metadata key
|
|
172
|
-
* @param spec Metadata object from the decorator function
|
|
173
|
-
* @param options Options for the decorator
|
|
174
|
-
*/
|
|
175
|
-
static createDecorator<T>(key: string, spec: T, options?: DecoratorOptions): ClassDecorator;
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* Factory for property decorators
|
|
179
|
-
*/
|
|
180
|
-
export declare class PropertyDecoratorFactory<T> extends DecoratorFactory<T, MetadataMap<T>, PropertyDecorator> {
|
|
181
|
-
protected mergeWithInherited(inheritedMetadata: MetadataMap<T>, target: Object, propertyName?: string | symbol, descriptorOrIndex?: TypedPropertyDescriptor<any> | number): MetadataMap<T>;
|
|
182
|
-
protected mergeWithOwn(ownMetadata: MetadataMap<T>, target: Object, propertyName?: string | symbol, descriptorOrParameterIndex?: TypedPropertyDescriptor<any> | number): MetadataMap<T>;
|
|
183
|
-
create(): PropertyDecorator;
|
|
184
|
-
/**
|
|
185
|
-
* Create a property decorator function
|
|
186
|
-
* @param key Metadata key
|
|
187
|
-
* @param spec Metadata object from the decorator function
|
|
188
|
-
* @param options Options for the decorator
|
|
189
|
-
*/
|
|
190
|
-
static createDecorator<T>(key: string, spec: T, options?: DecoratorOptions): PropertyDecorator;
|
|
191
|
-
}
|
|
192
|
-
/**
|
|
193
|
-
* Factory for method decorators
|
|
194
|
-
*/
|
|
195
|
-
export declare class MethodDecoratorFactory<T> extends DecoratorFactory<T, MetadataMap<T>, MethodDecorator> {
|
|
196
|
-
protected mergeWithInherited(inheritedMetadata: MetadataMap<T>, target: Object, methodName?: string | symbol, methodDescriptor?: TypedPropertyDescriptor<any> | number): MetadataMap<T>;
|
|
197
|
-
protected mergeWithOwn(ownMetadata: MetadataMap<T>, target: Object, methodName?: string | symbol, methodDescriptor?: TypedPropertyDescriptor<any> | number): MetadataMap<T>;
|
|
198
|
-
create(): MethodDecorator;
|
|
199
|
-
/**
|
|
200
|
-
* Create a method decorator function
|
|
201
|
-
* @param key Metadata key
|
|
202
|
-
* @param spec Metadata object from the decorator function
|
|
203
|
-
* @param options Options for the decorator
|
|
204
|
-
*/
|
|
205
|
-
static createDecorator<T>(key: string, spec: T, options?: DecoratorOptions): MethodDecorator;
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* Factory for parameter decorators
|
|
209
|
-
*/
|
|
210
|
-
export declare class ParameterDecoratorFactory<T> extends DecoratorFactory<T, MetadataMap<T[]>, ParameterDecorator> {
|
|
211
|
-
private getOrInitMetadata(meta, target, methodName?);
|
|
212
|
-
protected mergeWithInherited(inheritedMetadata: MetadataMap<T[]>, target: Object, methodName?: string | symbol, parameterIndex?: TypedPropertyDescriptor<any> | number): MetadataMap<T[]>;
|
|
213
|
-
protected mergeWithOwn(ownMetadata: MetadataMap<T[]>, target: Object, methodName?: string | symbol, parameterIndex?: TypedPropertyDescriptor<any> | number): MetadataMap<T[]>;
|
|
214
|
-
create(): ParameterDecorator;
|
|
215
|
-
/**
|
|
216
|
-
* Create a parameter decorator function
|
|
217
|
-
* @param key Metadata key
|
|
218
|
-
* @param spec Metadata object from the decorator function
|
|
219
|
-
* @param options Options for the decorator
|
|
220
|
-
*/
|
|
221
|
-
static createDecorator<T>(key: string, spec: T, options?: DecoratorOptions): ParameterDecorator;
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* Factory for method level parameter decorator. For example, the following
|
|
225
|
-
* code uses `@param` to declare two parameters for `greet()`.
|
|
226
|
-
* ```ts
|
|
227
|
-
* class MyController {
|
|
228
|
-
* @param('name') // Parameter 0
|
|
229
|
-
* @param('msg') // Parameter 1
|
|
230
|
-
* greet() {}
|
|
231
|
-
* }
|
|
232
|
-
* ```
|
|
233
|
-
*/
|
|
234
|
-
export declare class MethodParameterDecoratorFactory<T> extends DecoratorFactory<T, MetadataMap<T[]>, MethodDecorator> {
|
|
235
|
-
/**
|
|
236
|
-
* Find the corresponding parameter index for the decoration
|
|
237
|
-
* @param target
|
|
238
|
-
* @param methodName
|
|
239
|
-
* @param methodDescriptor
|
|
240
|
-
*/
|
|
241
|
-
private getParameterIndex(target, methodName?, methodDescriptor?);
|
|
242
|
-
protected mergeWithInherited(inheritedMetadata: MetadataMap<T[]>, target: Object, methodName?: string | symbol, methodDescriptor?: TypedPropertyDescriptor<any> | number): MetadataMap<T[]>;
|
|
243
|
-
protected mergeWithOwn(ownMetadata: MetadataMap<T[]>, target: Object, methodName?: string | symbol, methodDescriptor?: TypedPropertyDescriptor<any> | number): MetadataMap<T[]>;
|
|
244
|
-
create(): MethodDecorator;
|
|
245
|
-
/**
|
|
246
|
-
* Create a method decorator function
|
|
247
|
-
* @param key Metadata key
|
|
248
|
-
* @param spec Metadata object from the decorator function
|
|
249
|
-
* @param options Options for the decorator
|
|
250
|
-
*/
|
|
251
|
-
static createDecorator<T>(key: string, spec: T, options?: DecoratorOptions): MethodDecorator;
|
|
252
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"decorator-factory.js","sourceRoot":"","sources":["../../src/decorator-factory.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,kCAAkC;AAClC,+CAA+C;AAC/C,gEAAgE;;AAEhE,uCAAoC;AACpC,4BAA4B;AAC5B,qCAAqC;AACrC,MAAM,KAAK,GAAG,WAAW,CAAC,6BAA6B,CAAC,CAAC;AAwCzD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH;IAUE;;;;;;OAMG;IACH,YACY,GAAW,EACX,IAAO,EACP,OAA0B;QAF1B,QAAG,GAAH,GAAG,CAAQ;QACX,SAAI,GAAJ,IAAI,CAAG;QACP,YAAO,GAAP,OAAO,CAAmB;QAEpC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAC1B,EAAC,gBAAgB,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAC,EAC9C,OAAO,CACR,CAAC;QACF,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC;YAChC,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC/C,CAAC;IACH,CAAC;IAES,gBAAgB;QACxB,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC3D,CAAC;IAED;;;;;;OAMG;IACO,OAAO,CAAC,iBAAuC;QACvD,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;QAC/C,EAAE,CAAC,CAAC,iBAAiB,IAAI,IAAI,CAAC;YAAC,MAAM,CAAC,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B,KAAK,GAAG,CAAC,EACT,MAAM,EACN,UAAU,CACX,CAAC;QACF,MAAM,CAAC,WAAW,CAAC;IACrB,CAAC;IAED,MAAM;QACJ,MAAM,CAAC,CACL,MAAc,EACd,UAA2B,EAC3B,UAAwC,EACxC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;IACrD,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,eAAe,CAAI,GAAW,EAAE,IAAO,EAAE,OAA0B;QACxE,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAC3B,GAAG,EACH,IAAI,EACJ,OAAO,CACR,CAAC;IACJ,CAAC;CACF;AAnHD,0EAmHC"}
|
package/dist6/src/index.d.ts
DELETED
package/dist6/src/index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright IBM Corp. 2017. All Rights Reserved.
|
|
3
|
-
// Node module: @loopback/metadata
|
|
4
|
-
// This file is licensed under the MIT License.
|
|
5
|
-
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
-
function __export(m) {
|
|
7
|
-
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
__export(require("./reflect"));
|
|
11
|
-
__export(require("./decorator-factory"));
|
|
12
|
-
__export(require("./inspector"));
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
package/dist6/src/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,kCAAkC;AAClC,+CAA+C;AAC/C,gEAAgE;;;;;AAEhE,+BAA0B;AAC1B,yCAAoC;AACpC,iCAA4B"}
|
package/dist6/src/inspector.d.ts
DELETED
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import { NamespacedReflect } from './reflect';
|
|
2
|
-
import { MetadataMap } from './decorator-factory';
|
|
3
|
-
/**
|
|
4
|
-
* Design time metadata for a method.
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* ```ts
|
|
8
|
-
* class MyController
|
|
9
|
-
* {
|
|
10
|
-
* myMethod(x: string, y: number, z: MyClass): boolean {
|
|
11
|
-
* // ...
|
|
12
|
-
* return true;
|
|
13
|
-
* }
|
|
14
|
-
* }
|
|
15
|
-
* ```
|
|
16
|
-
*
|
|
17
|
-
* The `myMethod` above has design-time metadata as follows:
|
|
18
|
-
* ```ts
|
|
19
|
-
* {
|
|
20
|
-
* type: Function,
|
|
21
|
-
* parameterTypes: [String, Number, MyClass],
|
|
22
|
-
* returnType: Boolean
|
|
23
|
-
* }
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
export interface DesignTimeMethodMetadata {
|
|
27
|
-
/**
|
|
28
|
-
* Type of the method itself. It is `Function`
|
|
29
|
-
*/
|
|
30
|
-
type: Function;
|
|
31
|
-
/**
|
|
32
|
-
* An array of parameter types
|
|
33
|
-
*/
|
|
34
|
-
parameterTypes: Function[];
|
|
35
|
-
/**
|
|
36
|
-
* Return type
|
|
37
|
-
*/
|
|
38
|
-
returnType: Function;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Options for inspection
|
|
42
|
-
*/
|
|
43
|
-
export interface InspectionOptions {
|
|
44
|
-
/**
|
|
45
|
-
* Only inspect own metadata of a given target. The prototype chain will not
|
|
46
|
-
* be checked. The implementation uses `Reflect.getOwnMetadata()` if the flag
|
|
47
|
-
* is set to `true`. Otherwise, it uses `Reflect.getMetadata()`.
|
|
48
|
-
*
|
|
49
|
-
* The flag is `false` by default for `MetadataInspector`.
|
|
50
|
-
*/
|
|
51
|
-
ownMetadataOnly?: boolean;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Inspector for metadata applied by decorators
|
|
55
|
-
*/
|
|
56
|
-
export declare class MetadataInspector {
|
|
57
|
-
/**
|
|
58
|
-
* Expose Reflector, which is a wrapper of `Reflect` and it uses `loopback`
|
|
59
|
-
* as the namespace prefix for all metadata keys
|
|
60
|
-
*/
|
|
61
|
-
static readonly Reflector: NamespacedReflect;
|
|
62
|
-
/**
|
|
63
|
-
* Expose the reflector for TypeScript design-time metadata
|
|
64
|
-
*/
|
|
65
|
-
static readonly DesignTimeReflector: NamespacedReflect;
|
|
66
|
-
/**
|
|
67
|
-
* Get the metadata associated with the given key for a given class
|
|
68
|
-
* @param key Metadata key
|
|
69
|
-
* @param target Class that contains the metadata
|
|
70
|
-
* @param options Options for inspection
|
|
71
|
-
*/
|
|
72
|
-
static getClassMetadata<T>(key: string, target: Function, options?: InspectionOptions): T | undefined;
|
|
73
|
-
/**
|
|
74
|
-
* Define metadata for the given target
|
|
75
|
-
* @param key Metadata key
|
|
76
|
-
* @param value Metadata value
|
|
77
|
-
* @param target Target for the metadata
|
|
78
|
-
* @param member Optional property or method name
|
|
79
|
-
*/
|
|
80
|
-
static defineMetadata<T>(key: string, value: T, target: Object, member?: string | symbol): void;
|
|
81
|
-
/**
|
|
82
|
-
* Get the metadata associated with the given key for all methods of the
|
|
83
|
-
* target class or prototype
|
|
84
|
-
* @param key Metadata key
|
|
85
|
-
* @param target Class for static methods or prototype for instance methods
|
|
86
|
-
* @param options Options for inspection
|
|
87
|
-
*/
|
|
88
|
-
static getAllMethodMetadata<T>(key: string, target: Object, options?: InspectionOptions): MetadataMap<T> | undefined;
|
|
89
|
-
/**
|
|
90
|
-
* Get the metadata associated with the given key for a given method of the
|
|
91
|
-
* target class or prototype
|
|
92
|
-
* @param key Metadata key
|
|
93
|
-
* @param target Class for static methods or prototype for instance methods
|
|
94
|
-
* @param methodName Method name. If not present, default to '' to use
|
|
95
|
-
* the constructor
|
|
96
|
-
* @param options Options for inspection
|
|
97
|
-
*/
|
|
98
|
-
static getMethodMetadata<T>(key: string, target: Object, methodName?: string | symbol, options?: InspectionOptions): T | undefined;
|
|
99
|
-
/**
|
|
100
|
-
* Get the metadata associated with the given key for all properties of the
|
|
101
|
-
* target class or prototype
|
|
102
|
-
* @param key Metadata key
|
|
103
|
-
* @param target Class for static methods or prototype for instance methods
|
|
104
|
-
* @param options Options for inspection
|
|
105
|
-
*/
|
|
106
|
-
static getAllPropertyMetadata<T>(key: string, target: Object, options?: InspectionOptions): MetadataMap<T> | undefined;
|
|
107
|
-
/**
|
|
108
|
-
* Get the metadata associated with the given key for a given property of the
|
|
109
|
-
* target class or prototype
|
|
110
|
-
* @param key Metadata key
|
|
111
|
-
* @param target Class for static properties or prototype for instance
|
|
112
|
-
* properties
|
|
113
|
-
* @param propertyName Property name
|
|
114
|
-
* @param options Options for inspection
|
|
115
|
-
*/
|
|
116
|
-
static getPropertyMetadata<T>(key: string, target: Object, propertyName: string | symbol, options?: InspectionOptions): T | undefined;
|
|
117
|
-
/**
|
|
118
|
-
* Get the metadata associated with the given key for all parameters of a
|
|
119
|
-
* given method
|
|
120
|
-
* @param key Metadata key
|
|
121
|
-
* @param target Class for static methods or prototype for instance methods
|
|
122
|
-
* @param methodName Method name. If not present, default to '' to use
|
|
123
|
-
* the constructor
|
|
124
|
-
* @param options Options for inspection
|
|
125
|
-
*/
|
|
126
|
-
static getAllParameterMetadata<T>(key: string, target: Object, methodName?: string | symbol, options?: InspectionOptions): T[] | undefined;
|
|
127
|
-
/**
|
|
128
|
-
* Get the metadata associated with the given key for a parameter of a given
|
|
129
|
-
* method by index
|
|
130
|
-
* @param key Metadata key
|
|
131
|
-
* @param target Class for static methods or prototype for instance methods
|
|
132
|
-
* @param methodName Method name. If not present, default to '' to use
|
|
133
|
-
* the constructor
|
|
134
|
-
* @param index Index of the parameter, starting with 0
|
|
135
|
-
* @param options Options for inspection
|
|
136
|
-
*/
|
|
137
|
-
static getParameterMetadata<T>(key: string, target: Object, methodName: string | symbol, index: number, options?: InspectionOptions): T | undefined;
|
|
138
|
-
/**
|
|
139
|
-
* Get TypeScript design time type for a property
|
|
140
|
-
* @param target Class or prototype
|
|
141
|
-
* @param propertyName Property name
|
|
142
|
-
*/
|
|
143
|
-
static getDesignTypeForProperty(target: Object, propertyName: string | symbol): Function;
|
|
144
|
-
/**
|
|
145
|
-
* Get TypeScript design time type for a method
|
|
146
|
-
* @param target Class or prototype
|
|
147
|
-
* @param methodName Method name
|
|
148
|
-
*/
|
|
149
|
-
static getDesignTypeForMethod(target: Object, methodName: string | symbol): DesignTimeMethodMetadata;
|
|
150
|
-
}
|