ngx.log(ngx.WARN, Buffer.from(ngx.error_log_path));
ngx.log(ngx.ERR, ngx.version);
}
+
+function ngx_shared(dict: NgxSharedDict<string>, numeric: NgxSharedDict<number>) {
+ var s:NgxKeyValuePair<string> = dict.items()[0];
+ var v:number = numeric.incr('foo', 1);
+}
declare class SharedMemoryError extends Error {}
type NgxSharedDictValue = string | number;
+type NgxKeyValuePair<V> = { key: string, value: V };
/**
* Interface of a dictionary shared among the working processes.
incr: V extends number
? (key: string, delta: V, init?: number) => number
: never;
+ /**
+ * @param maxCount The maximum number of pairs to retrieve (default is 1024).
+ * @returns An array of the key-value pairs.
+ */
+ items(maxCount?: number): NgxKeyValuePair<V>[];
/**
* @returns The free page size in bytes.
* Note that even if the free page is zero the dictionary may still accept