@alterior/runtime 3.13.3 → 3.13.4
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/dist/app-options.d.ts +65 -65
- package/dist/app-options.js +26 -26
- package/dist/app-options.js.map +1 -1
- package/dist/application.d.ts +52 -52
- package/dist/application.js +172 -171
- package/dist/application.js.map +1 -1
- package/dist/args.d.ts +7 -7
- package/dist/args.js +13 -13
- package/dist/expose.d.ts +12 -12
- package/dist/expose.d.ts.map +1 -1
- package/dist/expose.js +36 -36
- package/dist/expose.js.map +1 -1
- package/dist/index.d.ts +9 -9
- package/dist/index.js +12 -12
- package/dist/lifecycle.d.ts +24 -24
- package/dist/lifecycle.js +2 -2
- package/dist/module.test.d.ts +1 -1
- package/dist/modules.d.ts +120 -120
- package/dist/modules.js +282 -282
- package/dist/modules.js.map +1 -1
- package/dist/reflector.d.ts +123 -123
- package/dist/reflector.js +306 -306
- package/dist/reflector.js.map +1 -1
- package/dist/roles.service.d.ts +79 -79
- package/dist/roles.service.js +124 -124
- package/dist/roles.service.js.map +1 -1
- package/dist/service.d.ts +24 -24
- package/dist/service.js +19 -19
- package/dist/service.js.map +1 -1
- package/dist/test.d.ts +1 -1
- package/dist.esm/app-options.d.ts +65 -65
- package/dist.esm/app-options.js +23 -23
- package/dist.esm/app-options.js.map +1 -1
- package/dist.esm/application.d.ts +52 -52
- package/dist.esm/application.js +167 -166
- package/dist.esm/application.js.map +1 -1
- package/dist.esm/args.d.ts +7 -7
- package/dist.esm/args.js +9 -9
- package/dist.esm/expose.d.ts +12 -12
- package/dist.esm/expose.d.ts.map +1 -1
- package/dist.esm/expose.js +31 -31
- package/dist.esm/expose.js.map +1 -1
- package/dist.esm/index.d.ts +9 -9
- package/dist.esm/index.js +9 -9
- package/dist.esm/lifecycle.d.ts +24 -24
- package/dist.esm/lifecycle.js +1 -1
- package/dist.esm/module.test.d.ts +1 -1
- package/dist.esm/modules.d.ts +120 -120
- package/dist.esm/modules.js +276 -276
- package/dist.esm/modules.js.map +1 -1
- package/dist.esm/reflector.d.ts +123 -123
- package/dist.esm/reflector.js +296 -296
- package/dist.esm/reflector.js.map +1 -1
- package/dist.esm/roles.service.d.ts +79 -79
- package/dist.esm/roles.service.js +121 -121
- package/dist.esm/roles.service.js.map +1 -1
- package/dist.esm/service.d.ts +24 -24
- package/dist.esm/service.js +15 -15
- package/dist.esm/service.js.map +1 -1
- package/dist.esm/test.d.ts +1 -1
- package/package.json +9 -9
- package/src/application.ts +1 -1
- package/tsconfig.esm.tsbuildinfo +1 -0
- package/tsconfig.json +0 -2
- package/tsconfig.tsbuildinfo +1 -5546
package/dist.esm/reflector.d.ts
CHANGED
|
@@ -1,124 +1,124 @@
|
|
|
1
|
-
import { Annotation, IAnnotation } from "@alterior/annotations";
|
|
2
|
-
export type Constructor<T> = new (...args: any[]) => T;
|
|
3
|
-
export type AbstractConstructor<T> = abstract new (...args: any[]) => T;
|
|
4
|
-
export type AnyConstructor<T> = Constructor<T> | AbstractConstructor<T>;
|
|
5
|
-
export type Visibility = 'private' | 'public' | 'protected';
|
|
6
|
-
/**
|
|
7
|
-
* Represents a property on a class. A property can also be a field or a method.
|
|
8
|
-
*/
|
|
9
|
-
export declare class Property<T> {
|
|
10
|
-
private _type;
|
|
11
|
-
private _name;
|
|
12
|
-
private _isStatic;
|
|
13
|
-
constructor(_type: Constructor<T>, _name: string, _isStatic?: boolean);
|
|
14
|
-
private _visibility;
|
|
15
|
-
private _descriptor;
|
|
16
|
-
private _annotations;
|
|
17
|
-
defineMetadata(key: string, value: string): void;
|
|
18
|
-
getMetadata(key: string): any;
|
|
19
|
-
deleteMetadata(key: string): void;
|
|
20
|
-
private _valueType;
|
|
21
|
-
get valueType(): Type<any>;
|
|
22
|
-
get isStatic(): boolean;
|
|
23
|
-
protected get type(): Constructor<T>;
|
|
24
|
-
get annotations(): IAnnotation[];
|
|
25
|
-
annotationsOfType<T extends Annotation>(type: Constructor<T>): T[];
|
|
26
|
-
annotationOfType<T extends Annotation>(type: Constructor<T>): T;
|
|
27
|
-
get descriptor(): PropertyDescriptor;
|
|
28
|
-
get name(): string;
|
|
29
|
-
get visibility(): Visibility;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Represents a method on a class. A method can be a static or instance method, and has a set of parameters
|
|
33
|
-
* and a return type.
|
|
34
|
-
*/
|
|
35
|
-
export declare class Method<T> extends Property<T> {
|
|
36
|
-
constructor(type: Constructor<T>, name: string, isStatic?: boolean);
|
|
37
|
-
private _parameterNames;
|
|
38
|
-
private _implementation;
|
|
39
|
-
private _returnType;
|
|
40
|
-
get returnType(): Type<any>;
|
|
41
|
-
private _parameterTypes;
|
|
42
|
-
get parameterTypes(): Type<any>;
|
|
43
|
-
get implementation(): Function;
|
|
44
|
-
get parameterNames(): string[];
|
|
45
|
-
get parameters(): Parameter<T>[];
|
|
46
|
-
private _parameterAnnotations;
|
|
47
|
-
get parameterAnnotations(): IAnnotation[][];
|
|
48
|
-
}
|
|
49
|
-
export declare class Field<T> extends Property<T> {
|
|
50
|
-
constructor(type: Constructor<T>, name: string, isStatic?: boolean);
|
|
51
|
-
}
|
|
52
|
-
export declare class ConstructorMethod<T> extends Method<T> {
|
|
53
|
-
constructor(type: Constructor<T>);
|
|
54
|
-
private _ctorParameterAnnotations;
|
|
55
|
-
get parameterAnnotations(): IAnnotation[][];
|
|
56
|
-
}
|
|
57
|
-
export declare class Parameter<T> {
|
|
58
|
-
private _method;
|
|
59
|
-
private _index;
|
|
60
|
-
private _name;
|
|
61
|
-
constructor(_method: Method<T>, _index: number, _name?: string);
|
|
62
|
-
private _annotations;
|
|
63
|
-
get annotations(): IAnnotation[];
|
|
64
|
-
annotationsOfType<T extends Annotation>(type: Constructor<T>): T[];
|
|
65
|
-
annotationOfType<T extends Annotation>(type: Constructor<T>): T;
|
|
66
|
-
protected get method(): Method<T>;
|
|
67
|
-
get valueType(): any;
|
|
68
|
-
get index(): number;
|
|
69
|
-
get name(): string;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Represents a class Type and it's metadata
|
|
73
|
-
*/
|
|
74
|
-
export declare class Type<T extends Object> {
|
|
75
|
-
private _class;
|
|
76
|
-
constructor(_class: Constructor<T>);
|
|
77
|
-
private _propertyNames;
|
|
78
|
-
private _methodNames;
|
|
79
|
-
private _fieldNames;
|
|
80
|
-
private _annotations;
|
|
81
|
-
get name(): string;
|
|
82
|
-
getMetadata(key: string): void;
|
|
83
|
-
defineMetadata(key: string, value: any): void;
|
|
84
|
-
deleteMetadata(key: string): void;
|
|
85
|
-
private _metadataKeys;
|
|
86
|
-
get metadataKeys(): string[];
|
|
87
|
-
/**
|
|
88
|
-
* Get all annotations attached to this class
|
|
89
|
-
*/
|
|
90
|
-
get annotations(): IAnnotation[];
|
|
91
|
-
annotationsOfType<T extends Annotation>(type: Constructor<T>): T[];
|
|
92
|
-
annotationOfType<T extends Annotation>(type: Constructor<T>): T;
|
|
93
|
-
private fetchPropertyNames;
|
|
94
|
-
private _staticPropertyNames;
|
|
95
|
-
private _staticMethodNames;
|
|
96
|
-
private _staticFieldNames;
|
|
97
|
-
private fetchStaticPropertyNames;
|
|
98
|
-
get staticPropertyNames(): string[];
|
|
99
|
-
get staticMethodNames(): string[];
|
|
100
|
-
get staticFieldNames(): string[];
|
|
101
|
-
private _staticMethods;
|
|
102
|
-
get staticMethods(): Method<T>[];
|
|
103
|
-
private _staticFields;
|
|
104
|
-
get staticFields(): Field<T>[];
|
|
105
|
-
private _staticProperties;
|
|
106
|
-
get staticProperties(): Property<T>[];
|
|
107
|
-
get propertyNames(): string[];
|
|
108
|
-
get methodNames(): string[];
|
|
109
|
-
get fieldNames(): string[];
|
|
110
|
-
private _ctor;
|
|
111
|
-
get constructorMethod(): ConstructorMethod<T>;
|
|
112
|
-
private _methods;
|
|
113
|
-
get methods(): Method<T>[];
|
|
114
|
-
private _properties;
|
|
115
|
-
get properties(): Property<T>[];
|
|
116
|
-
private _fields;
|
|
117
|
-
get fields(): Field<T>[];
|
|
118
|
-
get base(): Type<any>;
|
|
119
|
-
}
|
|
120
|
-
export declare class Reflector {
|
|
121
|
-
getTypeFromInstance<T extends Object = any>(instance: T): Type<T>;
|
|
122
|
-
getTypeFromClass<T extends object = any>(typeClass: Constructor<T>): Type<T>;
|
|
123
|
-
}
|
|
1
|
+
import { Annotation, IAnnotation } from "@alterior/annotations";
|
|
2
|
+
export type Constructor<T> = new (...args: any[]) => T;
|
|
3
|
+
export type AbstractConstructor<T> = abstract new (...args: any[]) => T;
|
|
4
|
+
export type AnyConstructor<T> = Constructor<T> | AbstractConstructor<T>;
|
|
5
|
+
export type Visibility = 'private' | 'public' | 'protected';
|
|
6
|
+
/**
|
|
7
|
+
* Represents a property on a class. A property can also be a field or a method.
|
|
8
|
+
*/
|
|
9
|
+
export declare class Property<T> {
|
|
10
|
+
private _type;
|
|
11
|
+
private _name;
|
|
12
|
+
private _isStatic;
|
|
13
|
+
constructor(_type: Constructor<T>, _name: string, _isStatic?: boolean);
|
|
14
|
+
private _visibility;
|
|
15
|
+
private _descriptor;
|
|
16
|
+
private _annotations;
|
|
17
|
+
defineMetadata(key: string, value: string): void;
|
|
18
|
+
getMetadata(key: string): any;
|
|
19
|
+
deleteMetadata(key: string): void;
|
|
20
|
+
private _valueType;
|
|
21
|
+
get valueType(): Type<any>;
|
|
22
|
+
get isStatic(): boolean;
|
|
23
|
+
protected get type(): Constructor<T>;
|
|
24
|
+
get annotations(): IAnnotation[];
|
|
25
|
+
annotationsOfType<T extends Annotation>(type: Constructor<T>): T[];
|
|
26
|
+
annotationOfType<T extends Annotation>(type: Constructor<T>): T;
|
|
27
|
+
get descriptor(): PropertyDescriptor;
|
|
28
|
+
get name(): string;
|
|
29
|
+
get visibility(): Visibility;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Represents a method on a class. A method can be a static or instance method, and has a set of parameters
|
|
33
|
+
* and a return type.
|
|
34
|
+
*/
|
|
35
|
+
export declare class Method<T> extends Property<T> {
|
|
36
|
+
constructor(type: Constructor<T>, name: string, isStatic?: boolean);
|
|
37
|
+
private _parameterNames;
|
|
38
|
+
private _implementation;
|
|
39
|
+
private _returnType;
|
|
40
|
+
get returnType(): Type<any>;
|
|
41
|
+
private _parameterTypes;
|
|
42
|
+
get parameterTypes(): Type<any>;
|
|
43
|
+
get implementation(): Function;
|
|
44
|
+
get parameterNames(): string[];
|
|
45
|
+
get parameters(): Parameter<T>[];
|
|
46
|
+
private _parameterAnnotations;
|
|
47
|
+
get parameterAnnotations(): IAnnotation[][];
|
|
48
|
+
}
|
|
49
|
+
export declare class Field<T> extends Property<T> {
|
|
50
|
+
constructor(type: Constructor<T>, name: string, isStatic?: boolean);
|
|
51
|
+
}
|
|
52
|
+
export declare class ConstructorMethod<T> extends Method<T> {
|
|
53
|
+
constructor(type: Constructor<T>);
|
|
54
|
+
private _ctorParameterAnnotations;
|
|
55
|
+
get parameterAnnotations(): IAnnotation[][];
|
|
56
|
+
}
|
|
57
|
+
export declare class Parameter<T> {
|
|
58
|
+
private _method;
|
|
59
|
+
private _index;
|
|
60
|
+
private _name;
|
|
61
|
+
constructor(_method: Method<T>, _index: number, _name?: string);
|
|
62
|
+
private _annotations;
|
|
63
|
+
get annotations(): IAnnotation[];
|
|
64
|
+
annotationsOfType<T extends Annotation>(type: Constructor<T>): T[];
|
|
65
|
+
annotationOfType<T extends Annotation>(type: Constructor<T>): T;
|
|
66
|
+
protected get method(): Method<T>;
|
|
67
|
+
get valueType(): any;
|
|
68
|
+
get index(): number;
|
|
69
|
+
get name(): string;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Represents a class Type and it's metadata
|
|
73
|
+
*/
|
|
74
|
+
export declare class Type<T extends Object> {
|
|
75
|
+
private _class;
|
|
76
|
+
constructor(_class: Constructor<T>);
|
|
77
|
+
private _propertyNames;
|
|
78
|
+
private _methodNames;
|
|
79
|
+
private _fieldNames;
|
|
80
|
+
private _annotations;
|
|
81
|
+
get name(): string;
|
|
82
|
+
getMetadata(key: string): void;
|
|
83
|
+
defineMetadata(key: string, value: any): void;
|
|
84
|
+
deleteMetadata(key: string): void;
|
|
85
|
+
private _metadataKeys;
|
|
86
|
+
get metadataKeys(): string[];
|
|
87
|
+
/**
|
|
88
|
+
* Get all annotations attached to this class
|
|
89
|
+
*/
|
|
90
|
+
get annotations(): IAnnotation[];
|
|
91
|
+
annotationsOfType<T extends Annotation>(type: Constructor<T>): T[];
|
|
92
|
+
annotationOfType<T extends Annotation>(type: Constructor<T>): T;
|
|
93
|
+
private fetchPropertyNames;
|
|
94
|
+
private _staticPropertyNames;
|
|
95
|
+
private _staticMethodNames;
|
|
96
|
+
private _staticFieldNames;
|
|
97
|
+
private fetchStaticPropertyNames;
|
|
98
|
+
get staticPropertyNames(): string[];
|
|
99
|
+
get staticMethodNames(): string[];
|
|
100
|
+
get staticFieldNames(): string[];
|
|
101
|
+
private _staticMethods;
|
|
102
|
+
get staticMethods(): Method<T>[];
|
|
103
|
+
private _staticFields;
|
|
104
|
+
get staticFields(): Field<T>[];
|
|
105
|
+
private _staticProperties;
|
|
106
|
+
get staticProperties(): Property<T>[];
|
|
107
|
+
get propertyNames(): string[];
|
|
108
|
+
get methodNames(): string[];
|
|
109
|
+
get fieldNames(): string[];
|
|
110
|
+
private _ctor;
|
|
111
|
+
get constructorMethod(): ConstructorMethod<T>;
|
|
112
|
+
private _methods;
|
|
113
|
+
get methods(): Method<T>[];
|
|
114
|
+
private _properties;
|
|
115
|
+
get properties(): Property<T>[];
|
|
116
|
+
private _fields;
|
|
117
|
+
get fields(): Field<T>[];
|
|
118
|
+
get base(): Type<any>;
|
|
119
|
+
}
|
|
120
|
+
export declare class Reflector {
|
|
121
|
+
getTypeFromInstance<T extends Object = any>(instance: T): Type<T>;
|
|
122
|
+
getTypeFromClass<T extends object = any>(typeClass: Constructor<T>): Type<T>;
|
|
123
|
+
}
|
|
124
124
|
//# sourceMappingURL=reflector.d.ts.map
|