@types/overload-protection
Advanced tools
@@ -11,11 +11,11 @@ // Type definitions for overload-protection 1.2 | ||
| interface ProtectionConfig { | ||
| production?: boolean; | ||
| clientRetrySecs?: number; | ||
| sampleInterval?: number; | ||
| maxEventLoopDelay?: number; | ||
| maxHeapUsedBytes?: number; | ||
| maxRssBytes?: number; | ||
| errorPropagationMode?: boolean; | ||
| logging?: boolean | string | ((msg: string) => void); | ||
| logStatsOnReq?: false; | ||
| production?: boolean | undefined; | ||
| clientRetrySecs?: number | undefined; | ||
| sampleInterval?: number | undefined; | ||
| maxEventLoopDelay?: number | undefined; | ||
| maxHeapUsedBytes?: number | undefined; | ||
| maxRssBytes?: number | undefined; | ||
| errorPropagationMode?: boolean | undefined; | ||
| logging?: boolean | string | ((msg: string) => void) | undefined; | ||
| logStatsOnReq?: false | undefined; | ||
| } | ||
@@ -22,0 +22,0 @@ |
| MIT License | ||
| Copyright (c) Microsoft Corporation. All rights reserved. | ||
| Copyright (c) Microsoft Corporation. | ||
@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy |
| { | ||
| "name": "@types/overload-protection", | ||
| "version": "1.2.0", | ||
| "version": "1.2.1", | ||
| "description": "TypeScript definitions for overload-protection", | ||
| "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/overload-protection", | ||
| "license": "MIT", | ||
@@ -22,4 +23,4 @@ "contributors": [ | ||
| "dependencies": {}, | ||
| "typesPublisherContentHash": "6a03a6431311bf83c48c7dca09cda6b4454119d46bfe5eee8e68d7e6e5a58b00", | ||
| "typeScriptVersion": "2.8" | ||
| "typesPublisherContentHash": "a8bba40c886489b2668eb94d78b368ae7fa83a373dcb2a067e2990204e74218c", | ||
| "typeScriptVersion": "3.6" | ||
| } |
@@ -9,5 +9,60 @@ # Installation | ||
| Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/overload-protection. | ||
| ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/overload-protection/index.d.ts) | ||
| ````ts | ||
| // Type definitions for overload-protection 1.2 | ||
| // Project: https://github.com/davidmarkclements/overload-protection | ||
| // Definitions by: Daniel Hirth <https://github.com/dornfeder> | ||
| // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
| declare namespace protect { | ||
| type KoaFrameworkSelection = 'koa'; | ||
| type HttpFrameworkSelection = 'express' | 'http' | 'restify'; | ||
| interface ProtectionConfig { | ||
| production?: boolean | undefined; | ||
| clientRetrySecs?: number | undefined; | ||
| sampleInterval?: number | undefined; | ||
| maxEventLoopDelay?: number | undefined; | ||
| maxHeapUsedBytes?: number | undefined; | ||
| maxRssBytes?: number | undefined; | ||
| errorPropagationMode?: boolean | undefined; | ||
| logging?: boolean | string | ((msg: string) => void) | undefined; | ||
| logStatsOnReq?: false | undefined; | ||
| } | ||
| interface ProtectionInstance { | ||
| overload: boolean; | ||
| eventLoopOverload: boolean; | ||
| heapUsedOverload: boolean; | ||
| rssOverload: boolean; | ||
| eventLoopDelay: number; | ||
| maxEventLoopDelay: number; | ||
| maxHeapUsedBytes: number; | ||
| maxRssBytes: number; | ||
| } | ||
| interface KoaProtectionInstance extends ProtectionInstance { | ||
| (ctx: object, next: () => any): any; | ||
| } | ||
| interface HttpProtectionInstance extends ProtectionInstance { | ||
| (req: object, res: object, next: () => any): any; | ||
| } | ||
| } | ||
| declare function protect( | ||
| framework: protect.KoaFrameworkSelection, | ||
| config?: protect.ProtectionConfig, | ||
| ): protect.KoaProtectionInstance; | ||
| declare function protect( | ||
| framework: protect.HttpFrameworkSelection, | ||
| config?: protect.ProtectionConfig, | ||
| ): protect.HttpProtectionInstance; | ||
| export = protect; | ||
| ```` | ||
| ### Additional Details | ||
| * Last updated: Mon, 09 Mar 2020 17:45:26 GMT | ||
| * Last updated: Thu, 08 Jul 2021 20:19:13 GMT | ||
| * Dependencies: none | ||
@@ -14,0 +69,0 @@ * Global values: none |
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
6105
49.85%0
-100%72
323.53%