@types/express-redis-cache
Advanced tools
Comparing version 1.1.3 to 1.1.4
@@ -1,7 +0,1 @@ | ||
// Type definitions for express-redis-cache 1.1 | ||
// Project: https://github.com/rv-kip/express-redis-cache | ||
// Definitions by: AJ Livingston <https://github.com/ajliv> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// TypeScript Version: 2.3 | ||
import events = require("events"); | ||
@@ -8,0 +2,0 @@ import express = require("express"); |
{ | ||
"name": "@types/express-redis-cache", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "TypeScript definitions for express-redis-cache", | ||
@@ -10,4 +10,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-redis-cache", | ||
"name": "AJ Livingston", | ||
"url": "https://github.com/ajliv", | ||
"githubUsername": "ajliv" | ||
"githubUsername": "ajliv", | ||
"url": "https://github.com/ajliv" | ||
} | ||
@@ -25,6 +25,7 @@ ], | ||
"@types/express": "*", | ||
"@types/express-serve-static-core": "*", | ||
"@types/redis": "^2.8.0" | ||
}, | ||
"typesPublisherContentHash": "50e6f1b3b2ad815448a3800f4fc9462406a085b8358a8eafbd1adb9598b6cc9c", | ||
"typesPublisherContentHash": "2bb241970fe48451988f5e17ebe863d7abd4c4e10115c2e1d7a7fdd50a8c3f8a", | ||
"typeScriptVersion": "4.5" | ||
} |
@@ -9,9 +9,83 @@ # Installation | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-redis-cache. | ||
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-redis-cache/index.d.ts) | ||
````ts | ||
import events = require("events"); | ||
import express = require("express"); | ||
import redis = require("redis"); | ||
declare module "express-serve-static-core" { | ||
interface Response { | ||
express_redis_cache_name?: string | undefined; | ||
use_express_redis_cache?: boolean | undefined; | ||
} | ||
} | ||
declare function expressRedisCache(options?: expressRedisCache.Options): expressRedisCache.ExpressRedisCache; | ||
declare namespace expressRedisCache { | ||
class ExpressRedisCache extends events.EventEmitter { | ||
constructor(options?: Options); | ||
static init(options?: Options): ExpressRedisCache; | ||
readonly FOREVER: number; | ||
options: Options; | ||
host: string; | ||
port: string | number; | ||
prefix: string; | ||
auth_pass: string; | ||
connected: boolean; | ||
expire: number; | ||
client: redis.RedisClient; | ||
add(name: string, body: string, options: AddOptions, callback: (error: any, added: Entry) => void): void; | ||
add(name: string, body: string, callback: (error: any, added: Entry) => void): void; | ||
del(name: string, callback: (error: any, deleted: number) => void): void; | ||
get(name: string, callback: (error: any, entries: Entry[]) => void): void; | ||
get(callback: (error: any, entries: Entry[]) => void): void; | ||
route(nameOrOptions: string | RouteOptions, expire?: ExpireOption): express.RequestHandler; | ||
route(expire?: number): express.RequestHandler; | ||
size(callback: (error: any, bytes: number) => void): void; | ||
} | ||
interface AddOptions { | ||
type?: string | undefined; | ||
expire?: number | undefined; | ||
} | ||
interface Entry { | ||
body: string; | ||
touched: number; | ||
expire: number; | ||
type: string; | ||
} | ||
interface ExpirationConfig { | ||
[statusCode: string]: number; | ||
} | ||
type ExpireOption = number | ExpirationConfig; | ||
type ExpirationPolicy = (req: express.Request, res: express.Response) => number; | ||
interface Options { | ||
auth_pass?: string | undefined; | ||
client?: redis.RedisClient | undefined; | ||
expire?: number | undefined; | ||
host?: string | undefined; | ||
port?: string | number | undefined; | ||
prefix?: string | undefined; | ||
} | ||
interface RouteOptions { | ||
name?: string | undefined; | ||
expire?: ExpireOption | ExpirationPolicy | undefined; | ||
binary?: boolean | undefined; | ||
} | ||
} | ||
export = expressRedisCache; | ||
```` | ||
### Additional Details | ||
* Last updated: Sat, 23 Sep 2023 17:07:22 GMT | ||
* Dependencies: [@types/express](https://npmjs.com/package/@types/express), [@types/redis](https://npmjs.com/package/@types/redis) | ||
* Global values: none | ||
* Last updated: Wed, 18 Oct 2023 01:17:34 GMT | ||
* Dependencies: [@types/express](https://npmjs.com/package/@types/express), [@types/express-serve-static-core](https://npmjs.com/package/@types/express-serve-static-core), [@types/redis](https://npmjs.com/package/@types/redis) | ||
# Credits | ||
These definitions were written by [AJ Livingston](https://github.com/ajliv). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7814
91
3
62
+ Added@types/express-serve-static-core@5.0.1(transitive)
+ Added@types/node@22.9.1(transitive)
- Removed@types/express-serve-static-core@5.0.2(transitive)
- Removed@types/node@22.9.3(transitive)