Repository navigation
Expand file tree
/
Copy pathdecorators.ts
More file actions
87 lines (75 loc) · 1.79 KB
/
Copy pathdecorators.ts
File metadata and controls
87 lines (75 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
import {
InjectMetadata,
OptionalMetadata,
InjectableMetadata,
SelfMetadata,
HostMetadata,
SkipSelfMetadata
} from './metadata';
import {makeDecorator, makeParamDecorator, TypeDecorator} from '../util/decorators';
/**
* Factory for creating {@link InjectMetadata}.
*/
export interface InjectFactory {
(token: any): any;
new (token: any): InjectMetadata;
}
/**
* Factory for creating {@link OptionalMetadata}.
*/
export interface OptionalFactory {
(): any;
new (): OptionalMetadata;
}
/**
* Factory for creating {@link InjectableMetadata}.
*/
export interface InjectableFactory {
(): any;
new (): InjectableMetadata;
}
/**
* Factory for creating {@link SelfMetadata}.
*/
export interface SelfFactory {
(): any;
new (): SelfMetadata;
}
/**
* Factory for creating {@link HostMetadata}.
*/
export interface HostFactory {
(): any;
new (): HostMetadata;
}
/**
* Factory for creating {@link SkipSelfMetadata}.
*/
export interface SkipSelfFactory {
(): any;
new (): SkipSelfMetadata;
}
/**
* Factory for creating {@link InjectMetadata}.
*/
export var Inject: InjectFactory = makeParamDecorator(InjectMetadata);
/**
* Factory for creating {@link OptionalMetadata}.
*/
export var Optional: OptionalFactory = makeParamDecorator(OptionalMetadata);
/**
* Factory for creating {@link InjectableMetadata}.
*/
export var Injectable: InjectableFactory = <InjectableFactory>makeDecorator(InjectableMetadata);
/**
* Factory for creating {@link SelfMetadata}.
*/
export var Self: SelfFactory = makeParamDecorator(SelfMetadata);
/**
* Factory for creating {@link HostMetadata}.
*/
export var Host: HostFactory = makeParamDecorator(HostMetadata);
/**
* Factory for creating {@link SkipSelfMetadata}.
*/
export var SkipSelf: SkipSelfFactory = makeParamDecorator(SkipSelfMetadata);