]> git.kaiwu.me - njs.git/commitdiff
Types: fixed NgxKeyValuePair definition.
authorThomas P. <TPXP@users.noreply.github.com>
Tue, 30 Jul 2024 12:20:19 +0000 (14:20 +0200)
committerDmitry Volyntsev <xeioexception@gmail.com>
Wed, 14 Aug 2024 22:19:34 +0000 (15:19 -0700)
NgxSharedDict.items() returns an array of `[key, value]` pairs, as `Object.entries()`.

ts/ngx_core.d.ts

index af8fc4f3d8c8e0f5c86f555832fd86eed865e7c6..b459c92930adddde6446754551036bd5e84c205f 100644 (file)
@@ -250,7 +250,7 @@ interface NgxFetchOptions {
 declare class SharedMemoryError extends Error {}
 
 type NgxSharedDictValue = string | number;
-type NgxKeyValuePair<V> = { key: string, value: V };
+type NgxKeyValuePair<V> = [string, V];
 
 /**
  * Interface of a dictionary shared among the working processes.