mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
Node: add timeout member to http.RequestOptions interface (#13865)
* Start typings for Node 7 * Add timeout member to RequestOptions.
This commit is contained in:
committed by
Sheetal Nandi
parent
5e640e9f20
commit
8928fc6a3d
5
node/index.d.ts
vendored
5
node/index.d.ts
vendored
@@ -1,11 +1,11 @@
|
||||
// Type definitions for Node.js v6.x
|
||||
// Type definitions for Node.js v7.x
|
||||
// Project: http://nodejs.org/
|
||||
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>, DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/************************************************
|
||||
* *
|
||||
* Node.js v6.x API *
|
||||
* Node.js v7.x API *
|
||||
* *
|
||||
************************************************/
|
||||
|
||||
@@ -622,6 +622,7 @@ declare module "http" {
|
||||
headers?: { [key: string]: any };
|
||||
auth?: string;
|
||||
agent?: Agent | boolean;
|
||||
timeout?: number;
|
||||
}
|
||||
|
||||
export interface Server extends net.Server {
|
||||
|
||||
@@ -846,6 +846,10 @@ namespace http_tests {
|
||||
request.setNoDelay(true);
|
||||
request.abort();
|
||||
}
|
||||
|
||||
const options: http.RequestOptions = {
|
||||
timeout: 30000
|
||||
};
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////
|
||||
|
||||
4121
node/v6/index.d.ts
vendored
Normal file
4121
node/v6/index.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2082
node/v6/node-tests.ts
Normal file
2082
node/v6/node-tests.ts
Normal file
File diff suppressed because it is too large
Load Diff
20
node/v6/tsconfig.json
Normal file
20
node/v6/tsconfig.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"node-tests.ts"
|
||||
],
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es6",
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user