@tsonic/nodejs 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/nodejs/internal/index.d.ts +383 -325
- package/nodejs.Http/internal/index.d.ts +19 -17
- package/package.json +1 -1
|
@@ -41,7 +41,7 @@ export interface ClientRequest$instance extends EventEmitter {
|
|
|
41
41
|
getHeaderNames(): string[];
|
|
42
42
|
removeHeader(name: string): void;
|
|
43
43
|
setHeader(name: string, value: string): void;
|
|
44
|
-
setTimeout(msecs: int, callback?: Action
|
|
44
|
+
setTimeout(msecs: int, callback?: Action): ClientRequest;
|
|
45
45
|
write(chunk: string, encoding?: string, callback?: Action): boolean;
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -66,7 +66,7 @@ export interface IncomingMessage$instance extends EventEmitter {
|
|
|
66
66
|
onData(callback: Action<System_Internal.String>): void;
|
|
67
67
|
onEnd(callback: Action): void;
|
|
68
68
|
readAll(): Task<System_Internal.String>;
|
|
69
|
-
setTimeout(msecs: int, callback?: Action
|
|
69
|
+
setTimeout(msecs: int, callback?: Action): IncomingMessage;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
|
|
@@ -78,8 +78,10 @@ export const IncomingMessage: {
|
|
|
78
78
|
export type IncomingMessage = IncomingMessage$instance;
|
|
79
79
|
|
|
80
80
|
export interface RequestOptions$instance {
|
|
81
|
-
agent: unknown | undefined;
|
|
82
|
-
|
|
81
|
+
get agent(): unknown | undefined;
|
|
82
|
+
set agent(value: unknown);
|
|
83
|
+
get auth(): string | undefined;
|
|
84
|
+
set auth(value: string);
|
|
83
85
|
headers: Dictionary<System_Internal.String, System_Internal.String>;
|
|
84
86
|
host: string;
|
|
85
87
|
hostname: string;
|
|
@@ -106,15 +108,15 @@ export interface Server$instance extends EventEmitter {
|
|
|
106
108
|
requestTimeout: int;
|
|
107
109
|
timeout: int;
|
|
108
110
|
address(): AddressInfo;
|
|
109
|
-
close(callback?: Action
|
|
111
|
+
close(callback?: Action): Server;
|
|
110
112
|
listen(port: int, hostname?: string, backlog?: Nullable<System_Internal.Int32>, callback?: Action): Server;
|
|
111
|
-
listen(port: int, callback?: Action
|
|
112
|
-
setTimeout(msecs: int, callback?: Action
|
|
113
|
+
listen(port: int, callback?: Action): Server;
|
|
114
|
+
setTimeout(msecs: int, callback?: Action): Server;
|
|
113
115
|
}
|
|
114
116
|
|
|
115
117
|
|
|
116
118
|
export const Server: {
|
|
117
|
-
new(requestListener: Action<IncomingMessage, ServerResponse>
|
|
119
|
+
new(requestListener: Action<IncomingMessage, ServerResponse>): Server;
|
|
118
120
|
};
|
|
119
121
|
|
|
120
122
|
|
|
@@ -133,9 +135,9 @@ export interface ServerResponse$instance extends EventEmitter {
|
|
|
133
135
|
hasHeader(name: string): boolean;
|
|
134
136
|
removeHeader(name: string): void;
|
|
135
137
|
setHeader(name: string, value: string): ServerResponse;
|
|
136
|
-
setTimeout(msecs: int, callback?: Action
|
|
137
|
-
write(chunk: string, encoding?: string
|
|
138
|
-
writeHead(statusCode: int, statusMessage?: string
|
|
138
|
+
setTimeout(msecs: int, callback?: Action): ServerResponse;
|
|
139
|
+
write(chunk: string, encoding?: string, callback?: Action): Task<System_Internal.Boolean>;
|
|
140
|
+
writeHead(statusCode: int, statusMessage?: string, headers?: Dictionary<System_Internal.String, System_Internal.String>): ServerResponse;
|
|
139
141
|
writeHead(statusCode: int, headers: Dictionary<System_Internal.String, System_Internal.String>): ServerResponse;
|
|
140
142
|
}
|
|
141
143
|
|
|
@@ -163,13 +165,13 @@ export abstract class http$instance {
|
|
|
163
165
|
static globalAgent_maxFreeSockets: int;
|
|
164
166
|
static globalAgent_timeout: int;
|
|
165
167
|
static maxHeaderSize: int;
|
|
166
|
-
static createServer(requestListener?: Action<IncomingMessage, ServerResponse>
|
|
167
|
-
static get_(options: RequestOptions, callback?: Action<IncomingMessage>
|
|
168
|
-
static get_(url: string, callback?: Action<IncomingMessage>
|
|
169
|
-
static request(options: RequestOptions, callback?: Action<IncomingMessage>
|
|
170
|
-
static request(url: string, callback?: Action<IncomingMessage>
|
|
168
|
+
static createServer(requestListener?: Action<IncomingMessage, ServerResponse>): Server;
|
|
169
|
+
static get_(options: RequestOptions, callback?: Action<IncomingMessage>): ClientRequest;
|
|
170
|
+
static get_(url: string, callback?: Action<IncomingMessage>): ClientRequest;
|
|
171
|
+
static request(options: RequestOptions, callback?: Action<IncomingMessage>): ClientRequest;
|
|
172
|
+
static request(url: string, callback?: Action<IncomingMessage>): ClientRequest;
|
|
171
173
|
static validateHeaderName(name: string): void;
|
|
172
|
-
static validateHeaderValue(name: string, value: unknown
|
|
174
|
+
static validateHeaderValue(name: string, value: unknown): void;
|
|
173
175
|
}
|
|
174
176
|
|
|
175
177
|
|