mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge branch master into listen_bug
This commit is contained in:
@@ -6,6 +6,7 @@ import events = require("events");
|
||||
import zlib = require("zlib");
|
||||
import url = require('url');
|
||||
import util = require("util");
|
||||
import crypto = require("crypto");
|
||||
import http = require("http");
|
||||
import net = require("net");
|
||||
|
||||
@@ -83,6 +84,12 @@ function stream_readable_pipe_test() {
|
||||
r.pipe(z).pipe(w);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
/// Crypto tests : http://nodejs.org/api/crypto.html
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
var hmacResult: string = crypto.createHmac('md5', 'hello').update('world').digest('hex');
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// Make sure .listen() and .close() retuern a Server instance
|
||||
|
||||
Vendored
+7
-3
@@ -634,6 +634,8 @@ declare module "url" {
|
||||
search: string;
|
||||
query: string;
|
||||
slashes: boolean;
|
||||
hash?: string;
|
||||
path?: string;
|
||||
}
|
||||
|
||||
export interface UrlOptions {
|
||||
@@ -645,6 +647,8 @@ declare module "url" {
|
||||
pathname?: string;
|
||||
search?: string;
|
||||
query?: any;
|
||||
hash?: string;
|
||||
path?: string;
|
||||
}
|
||||
|
||||
export function parse(urlStr: string, parseQueryString?: boolean , slashesDenoteHost?: boolean ): Url;
|
||||
@@ -820,7 +824,7 @@ declare module "fs" {
|
||||
export function readlinkSync(path: string): string;
|
||||
export function realpath(path: string, callback?: (err: ErrnoException, resolvedPath: string) => any): void;
|
||||
export function realpath(path: string, cache: {[path: string]: string}, callback: (err: ErrnoException, resolvedPath: string) =>any): void;
|
||||
export function realpathSync(path: string, cache?: {[path: string]: string}): void;
|
||||
export function realpathSync(path: string, cache?: {[path: string]: string}): string;
|
||||
export function unlink(path: string, callback?: (err?: ErrnoException) => void): void;
|
||||
export function unlinkSync(path: string): void;
|
||||
export function rmdir(path: string, callback?: (err?: ErrnoException) => void): void;
|
||||
@@ -1018,8 +1022,8 @@ declare module "crypto" {
|
||||
digest(encoding?: string): string;
|
||||
}
|
||||
interface Hmac {
|
||||
update(data: any): void;
|
||||
digest(encoding?: string): void;
|
||||
update(data: any, input_encoding?: string): Hmac;
|
||||
digest(encoding?: string): string;
|
||||
}
|
||||
export function createCipher(algorithm: string, password: any): Cipher;
|
||||
export function createCipheriv(algorithm: string, key: any, iv: any): Cipher;
|
||||
|
||||
Reference in New Issue
Block a user