mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Use index.d.ts only (not foo/foo.d.ts) * Convert more packages * Remove unnecessary references
30 lines
860 B
TypeScript
30 lines
860 B
TypeScript
// Type definitions for set-cookie-parser
|
|
// Project: https://github.com/nfriedly/set-cookie-parser
|
|
// Definitions by: Nick Paddock <https://github.com/nickp10>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
/// <reference types="node" />
|
|
|
|
declare module "set-cookie-parser" {
|
|
import http = require("http");
|
|
|
|
function SetCookieParser(input: string | string[] | http.IncomingMessage): SetCookieParser.Cookie[];
|
|
|
|
namespace SetCookieParser {
|
|
function parse(input: string | string[] | http.IncomingMessage): Cookie[];
|
|
|
|
interface Cookie {
|
|
name: string;
|
|
value: string;
|
|
path?: string;
|
|
expires?: Date;
|
|
maxAge?: number;
|
|
domain?: string;
|
|
secure?: boolean;
|
|
httpOnly?: boolean;
|
|
}
|
|
}
|
|
|
|
export = SetCookieParser;
|
|
}
|