File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ export type Cache = {
18
18
}
19
19
20
20
21
+ export type ModuleCacheId = string ;
22
+
23
+
21
24
export type AbstractPath = {
22
25
toString ( ) : string ,
23
26
}
@@ -75,8 +78,11 @@ export type File = {
75
78
* Represents a resource.
76
79
*/
77
80
export type Resource = {
78
- /** 'abstract' unique id of the resource */
79
- id : string ,
81
+ /**
82
+ * 'abstract' unique id of the resource.
83
+ * This id is used as the key of the [[Options.moduleCache]]
84
+ */
85
+ id : ModuleCacheId ,
80
86
/** file path of the resource */
81
87
path : AbstractPath ,
82
88
/** asynchronously get the content of the resource */
@@ -143,7 +149,7 @@ export type Options = {
143
149
* ```
144
150
*
145
151
*/
146
- moduleCache ?: Record < string , LoadingType < ModuleExport > | ModuleExport > ,
152
+ moduleCache ?: Record < ModuleCacheId , LoadingType < ModuleExport > | ModuleExport > ,
147
153
148
154
149
155
/**
You can’t perform that action at this time.
0 commit comments