mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
Merge remote-tracking branch 'upstream/master' into node_process_signals
This commit is contained in:
17
types/node/index.d.ts
vendored
17
types/node/index.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Node.js v7.x
|
||||
// Type definitions for Node.js v8.x
|
||||
// Project: http://nodejs.org/
|
||||
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
|
||||
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
/************************************************
|
||||
* *
|
||||
* Node.js v7.x API *
|
||||
* Node.js v8.x API *
|
||||
* *
|
||||
************************************************/
|
||||
|
||||
@@ -846,12 +846,15 @@ declare module "http" {
|
||||
end(str: string, encoding?: string, cb?: Function): void;
|
||||
end(data?: any, encoding?: string): void;
|
||||
}
|
||||
export interface IncomingMessageHeaders {
|
||||
[key: string]: string | string[] | undefined;
|
||||
}
|
||||
export interface IncomingMessage extends stream.Readable {
|
||||
httpVersion: string;
|
||||
httpVersionMajor: number;
|
||||
httpVersionMinor: number;
|
||||
connection: net.Socket;
|
||||
headers: { [key: string]: string | string[] };
|
||||
headers: IncomingMessageHeaders;
|
||||
rawHeaders: string[];
|
||||
trailers: { [key: string]: string };
|
||||
rawTrailers: string[];
|
||||
@@ -2317,10 +2320,10 @@ declare module "net" {
|
||||
}
|
||||
|
||||
export interface Server extends events.EventEmitter {
|
||||
listen(port: number, hostname?: string, backlog?: number, listeningListener?: Function): Server;
|
||||
listen(port: number, hostname?: string, listeningListener?: Function): Server;
|
||||
listen(port: number, backlog?: number, listeningListener?: Function): Server;
|
||||
listen(port: number, listeningListener?: Function): Server;
|
||||
listen(port?: number, hostname?: string, backlog?: number, listeningListener?: Function): Server;
|
||||
listen(port?: number, hostname?: string, listeningListener?: Function): Server;
|
||||
listen(port?: number, backlog?: number, listeningListener?: Function): Server;
|
||||
listen(port?: number, listeningListener?: Function): Server;
|
||||
listen(path: string, backlog?: number, listeningListener?: Function): Server;
|
||||
listen(path: string, listeningListener?: Function): Server;
|
||||
listen(options: ListenOptions, listeningListener?: Function): Server;
|
||||
|
||||
@@ -981,7 +981,7 @@ namespace http_tests {
|
||||
}
|
||||
|
||||
{
|
||||
var request = http.request('http://0.0.0.0');
|
||||
var request = http.request({ path: 'http://0.0.0.0' });
|
||||
request.once('error', function() { });
|
||||
request.setNoDelay(true);
|
||||
request.abort();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es5"
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
|
||||
4351
types/node/v7/index.d.ts
vendored
Normal file
4351
types/node/v7/index.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2467
types/node/v7/node-tests.ts
Normal file
2467
types/node/v7/node-tests.ts
Normal file
File diff suppressed because it is too large
Load Diff
28
types/node/v7/tsconfig.json
Normal file
28
types/node/v7/tsconfig.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"node-tests.ts"
|
||||
],
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"baseUrl": "../../",
|
||||
"typeRoots": [
|
||||
"../../"
|
||||
],
|
||||
"paths": {
|
||||
"node": [
|
||||
"node/v7"
|
||||
]
|
||||
},
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"isolatedModules": true
|
||||
}
|
||||
}
|
||||
33
types/node/v7/tslint.json
Normal file
33
types/node/v7/tslint.json
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
// All are TODOs
|
||||
"adjacent-overload-signatures": false,
|
||||
"align": false,
|
||||
"array-type": false,
|
||||
"ban-types": false,
|
||||
"callable-types": false,
|
||||
"comment-format": false,
|
||||
"dt-header": false,
|
||||
"import-spacing": false,
|
||||
"interface-over-type-literal": false,
|
||||
"jsdoc-format": false,
|
||||
"max-line-length": false,
|
||||
"no-consecutive-blank-lines": false,
|
||||
"no-empty-interface": false,
|
||||
"no-internal-module": false,
|
||||
"no-namespace": false,
|
||||
"no-padding": false,
|
||||
"no-string-throw": false,
|
||||
"no-var": false,
|
||||
"object-literal-shorthand": false,
|
||||
"one-line": false,
|
||||
"only-arrow-functions": false,
|
||||
"prefer-method-signature": false,
|
||||
"semicolon": false,
|
||||
"strict-export-declare-modifiers": false,
|
||||
"typedef-whitespace": false,
|
||||
"unified-signatures": false,
|
||||
"whitespace": false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user