@tinyhttp/res
Advanced tools
Comparing version 2.0.3 to 2.0.4
/// <reference types="node" /> | ||
import { ServerResponse as S } from 'http'; | ||
import { IncomingMessage as I, ServerResponse as S } from 'http'; | ||
import * as cookie from '@tinyhttp/cookie'; | ||
declare type Res = Pick<S, 'setHeader' | 'getHeader'>; | ||
export declare const setCookie: <Request_1 extends unknown = any, Response_1 extends Res = Res>(req: Request_1 & { | ||
export declare const setCookie: <Request_1 extends I = I, Response_1 extends Res = Res>(req: Request_1 & { | ||
secret?: string | string[]; | ||
@@ -10,3 +10,3 @@ }, res: Response_1) => (name: string, value: string | Record<string, unknown>, options?: cookie.SerializeOptions & Partial<{ | ||
}>) => Response_1; | ||
export declare const clearCookie: <Request_1 extends unknown = any, Response_1 extends Res = Res>(req: Request_1, res: Response_1) => (name: string, options?: cookie.SerializeOptions) => Response_1; | ||
export declare const clearCookie: <Request_1 extends I = I, Response_1 extends Res = Res>(req: Request_1, res: Response_1) => (name: string, options?: cookie.SerializeOptions) => Response_1; | ||
export {}; |
@@ -10,3 +10,3 @@ /// <reference types="node" /> | ||
statusCode: number; | ||
types: any[]; | ||
types: string[]; | ||
}; | ||
@@ -13,0 +13,0 @@ declare type next = (err?: FormatError) => void; |
@@ -1,16 +0,9 @@ | ||
export declare const normalizeType: (type: string) => { | ||
export declare type NormalizedType = { | ||
value: string; | ||
quality: number; | ||
params: {}; | ||
originalIndex: number; | ||
} | { | ||
value: any; | ||
params: {}; | ||
quality?: number; | ||
params: Record<string, any>; | ||
originalIndex?: number; | ||
}; | ||
export declare function acceptParams(str: string, index?: number): { | ||
value: string; | ||
quality: number; | ||
params: {}; | ||
originalIndex: number; | ||
}; | ||
export declare function normalizeTypes(types: string[]): any[]; | ||
export declare const normalizeType: (type: string) => NormalizedType; | ||
export declare function acceptParams(str: string, index?: number): NormalizedType; | ||
export declare function normalizeTypes(types: string[]): NormalizedType[]; |
{ | ||
"name": "@tinyhttp/res", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"type": "module", | ||
@@ -28,8 +28,8 @@ "description": "response extensions for tinyhttp", | ||
"dependencies": { | ||
"@tinyhttp/content-disposition": "2.0.2", | ||
"@tinyhttp/cookie": "2.0.1", | ||
"@tinyhttp/cookie-signature": "2.0.1", | ||
"@tinyhttp/encode-url": "2.0.1", | ||
"@tinyhttp/req": "2.0.2", | ||
"@tinyhttp/send": "2.0.1", | ||
"@tinyhttp/content-disposition": "2.0.3", | ||
"@tinyhttp/cookie": "2.0.2", | ||
"@tinyhttp/cookie-signature": "2.0.2", | ||
"@tinyhttp/encode-url": "2.0.2", | ||
"@tinyhttp/req": "2.0.3", | ||
"@tinyhttp/send": "2.0.2", | ||
"es-escape-html": "^0.1.1", | ||
@@ -36,0 +36,0 @@ "es-mime-types": "^0.1.3", |
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
14451
280
+ Added@tinyhttp/accepts@2.0.2(transitive)
+ Added@tinyhttp/content-disposition@2.0.3(transitive)
+ Added@tinyhttp/cookie@2.0.2(transitive)
+ Added@tinyhttp/cookie-signature@2.0.2(transitive)
+ Added@tinyhttp/encode-url@2.0.2(transitive)
+ Added@tinyhttp/etag@2.0.2(transitive)
+ Added@tinyhttp/req@2.0.3(transitive)
+ Added@tinyhttp/send@2.0.2(transitive)
+ Added@tinyhttp/type-is@2.0.2(transitive)
+ Added@tinyhttp/url@2.0.3(transitive)
- Removed@tinyhttp/accepts@2.0.1(transitive)
- Removed@tinyhttp/content-disposition@2.0.2(transitive)
- Removed@tinyhttp/cookie@2.0.1(transitive)
- Removed@tinyhttp/cookie-signature@2.0.1(transitive)
- Removed@tinyhttp/encode-url@2.0.1(transitive)
- Removed@tinyhttp/etag@2.0.1(transitive)
- Removed@tinyhttp/req@2.0.2(transitive)
- Removed@tinyhttp/send@2.0.1(transitive)
- Removed@tinyhttp/type-is@2.0.1(transitive)
- Removed@tinyhttp/url@2.0.2(transitive)
Updated@tinyhttp/cookie@2.0.2
Updated@tinyhttp/encode-url@2.0.2
Updated@tinyhttp/req@2.0.3
Updated@tinyhttp/send@2.0.2