File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -174,6 +174,15 @@ type ResponseString<T extends UfcResponseType> = string & {
174
174
readonly __type : T ;
175
175
} ;
176
176
177
+ /**
178
+ * A wrapper around a server response that includes the response, etag, and fetchedAt timestamp.
179
+ */
180
+ interface IConfigResponse < T extends UfcResponseType > {
181
+ readonly response : ResponseString < T > ; // JSON-encoded server response
182
+ readonly etag ?: string ; // Entity Tag - denotes a snapshot or version of the config.
183
+ readonly fetchedAt ?: string ; // ISO timestamp for when this config was fetched
184
+ }
185
+
177
186
export function inflateResponse < T extends UfcResponseType > ( response : ResponseString < T > ) : T {
178
187
return JSON . parse ( response ) as T ;
179
188
}
@@ -182,12 +191,6 @@ export function deflateResponse<T extends UfcResponseType>(value: T): ResponseSt
182
191
return JSON . stringify ( value ) as ResponseString < T > ;
183
192
}
184
193
185
- interface IConfigResponse < T extends UfcResponseType > {
186
- readonly response : ResponseString < T > ; // JSON-encoded server response
187
- readonly etag ?: string ; // Entity Tag - denotes a snapshot or version of the config.
188
- readonly fetchedAt ?: string ; // ISO timestamp for when this config was fetched
189
- }
190
-
191
194
export class ConfigurationWireV1 implements IConfigurationWire {
192
195
public readonly version = 1 ;
193
196
You can’t perform that action at this time.
0 commit comments