-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathResource.ts
More file actions
71 lines (64 loc) · 1.66 KB
/
Resource.ts
File metadata and controls
71 lines (64 loc) · 1.66 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
import { Declaration } from '../declarations/Declaration';
import { Export } from '../exports/Export';
import { Import } from '../imports/Import';
/**
* Base interface for resources. All resources share the same properties.
* Resources are files, namespaces or modules.
*
* @export
* @interface Resource
*/
export interface Resource {
/**
* List of imports contained in this resource.
*
* @type {Import[]}
* @memberof Resource
*/
imports: Import[];
/**
* List of exports contained in this resource.
*
* @type {Export[]}
* @memberof Resource
*/
exports: Export[];
/**
* List of declarations that are contained in this resource.
*
* @type {Declaration[]}
* @memberof Resource
*/
declarations: Declaration[];
/**
* List of subresources (like namespaces in a file) of this resource.
*
* @type {Resource[]}
* @memberof Resource
*/
resources: Resource[];
/**
* List of used identifiers in this resource.
* (i.e. actual used string identifiers to calculate missing imports and stuff.)
*
* @type {string[]}
* @memberof Resource
*/
usages: string[];
/**
* "Unique" identifier for this resource. Can be the filepath for files or
* node identifiers for node modules.
*
* @type {string}
* @memberof Resource
*/
readonly identifier: string;
/**
* Returns an array of usages (a usage is a used symbol name in the resource)
* that are not covered by its own declarations.
*
* @type {string[]}
* @memberof Resource
*/
readonly nonLocalUsages: string[];
}