mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-30 11:14:27 +08:00
Vendored
+5
-1
@@ -1110,7 +1110,7 @@ declare module "crypto" {
|
||||
setPrivateKey(public_key: string, encoding?: string): void;
|
||||
}
|
||||
export function getDiffieHellman(group_name: string): DiffieHellman;
|
||||
export function pbkdf2(password: string, salt: string, iterations: number, keylen: number, callback: (err: Error, derivedKey: string) => any): void;
|
||||
export function pbkdf2(password: string, salt: string, iterations: number, keylen: number, callback: (err: Error, derivedKey: Buffer) => any): void;
|
||||
export function pbkdf2Sync(password: string, salt: string, iterations: number, keylen: number) : Buffer;
|
||||
export function randomBytes(size: number): Buffer;
|
||||
export function randomBytes(size: number, callback: (err: Error, buf: Buffer) =>void ): void;
|
||||
@@ -1121,6 +1121,10 @@ declare module "crypto" {
|
||||
declare module "stream" {
|
||||
import events = require("events");
|
||||
|
||||
export interface Stream extends events.EventEmitter {
|
||||
pipe<T extends NodeJS.WritableStream>(destination: T, options?: { end?: boolean; }): T;
|
||||
}
|
||||
|
||||
export interface ReadableOptions {
|
||||
highWaterMark?: number;
|
||||
encoding?: string;
|
||||
|
||||
Vendored
+1
@@ -8,6 +8,7 @@
|
||||
declare module Express {
|
||||
export interface Request {
|
||||
session?: any;
|
||||
authInfo?: any;
|
||||
|
||||
// These declarations are merged into express's Request type
|
||||
login(user: any, done: (err: any) => void): void;
|
||||
|
||||
@@ -114,7 +114,8 @@ req = req.oauth(oauth);
|
||||
req = req.jar(jar);
|
||||
write = req.pipe(write);
|
||||
write = req.pipe(write, value);
|
||||
req.write();
|
||||
req.pipe(req);
|
||||
req.write(value);
|
||||
req.end(str);
|
||||
req.end(buffer);
|
||||
req.pause();
|
||||
|
||||
Vendored
+12
-5
@@ -91,7 +91,10 @@ declare module 'request' {
|
||||
body: any;
|
||||
}
|
||||
|
||||
export interface Request {
|
||||
export interface Request extends stream.Stream {
|
||||
readable: boolean;
|
||||
writable: boolean;
|
||||
|
||||
getAgent(): http.Agent;
|
||||
//start(): void;
|
||||
//abort(): void;
|
||||
@@ -107,10 +110,14 @@ declare module 'request' {
|
||||
oauth(oauth: OAuthOptions): Request;
|
||||
jar(jar: CookieJar): Request;
|
||||
|
||||
pipe(dest: stream.Writable, opts?: any): stream.Writable;
|
||||
write(): void;
|
||||
end(chunk: string): void;
|
||||
end(chunk: NodeBuffer): void;
|
||||
write(buffer: Buffer, cb?: Function): boolean;
|
||||
write(str: string, cb?: Function): boolean;
|
||||
write(str: string, encoding: string, cb?: Function): boolean;
|
||||
write(str: string, encoding?: string, fd?: string): boolean;
|
||||
end(): void;
|
||||
end(chunk: Buffer, cb?: Function): void;
|
||||
end(chunk: string, cb?: Function): void;
|
||||
end(chunk: string, encoding: string, cb?: Function): void;
|
||||
pause(): void;
|
||||
resume(): void;
|
||||
abort(): void;
|
||||
|
||||
Reference in New Issue
Block a user