@tsonic/nodejs 10.0.39 → 10.0.41

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.
@@ -7,13 +7,13 @@ import type { sbyte, byte, short, ushort, int, uint, long, ulong, int128, uint12
7
7
 
8
8
  // Import types from other namespaces
9
9
  import * as nodejs_Internal from "../../index/internal/index.js";
10
- import type { EventEmitter } from "../../index/internal/index.js";
10
+ import type { Buffer, EventEmitter } from "../../index/internal/index.js";
11
11
  import type { Dictionary_2 } from "@tsonic/dotnet/System.Collections.Generic/internal/index.js";
12
12
  import * as System_Runtime_Serialization_Internal from "@tsonic/dotnet/System.Runtime.Serialization/internal/index.js";
13
13
  import type { ISerializable } from "@tsonic/dotnet/System.Runtime.Serialization/internal/index.js";
14
14
  import type { Task, Task_1 } from "@tsonic/dotnet/System.Threading.Tasks/internal/index.js";
15
15
  import * as System_Internal from "@tsonic/dotnet/System/internal/index.js";
16
- import type { Action, Action_1, Action_2, Boolean as ClrBoolean, Delegate, Exception, Int32, Nullable_1, Object as ClrObject, String as ClrString, Void } from "@tsonic/dotnet/System/internal/index.js";
16
+ import type { Action, Action_1, Action_2, Boolean as ClrBoolean, Byte, Delegate, Double, Exception, Int32, Nullable_1, Object as ClrObject, String as ClrString, Void } from "@tsonic/dotnet/System/internal/index.js";
17
17
 
18
18
  export interface AddressInfo$instance {
19
19
  readonly __tsonic_type_nodejs_Http_AddressInfo: never;
@@ -63,7 +63,7 @@ export interface IncomingMessage$instance extends EventEmitter {
63
63
  readonly headers: Dictionary_2<System_Internal.String, System_Internal.String>;
64
64
  readonly httpVersion: string;
65
65
  readonly method: string | undefined;
66
- readonly statusCode: Nullable_1<System_Internal.Int32>;
66
+ readonly statusCode: Nullable_1<System_Internal.Double>;
67
67
  readonly statusMessage: string | undefined;
68
68
  readonly url: string | undefined;
69
69
  destroy(): void;
@@ -71,7 +71,7 @@ export interface IncomingMessage$instance extends EventEmitter {
71
71
  onData(callback: Action_1<System_Internal.String>): void;
72
72
  onEnd(callback: Action): void;
73
73
  readAll(): Task_1<System_Internal.String>;
74
- setTimeout(msecs: int, callback?: Action): IncomingMessage;
74
+ setTimeout(msecs: double, callback?: Action): IncomingMessage;
75
75
  }
76
76
 
77
77
 
@@ -114,17 +114,18 @@ export type RequestOptions = RequestOptions$instance;
114
114
  export interface Server$instance extends EventEmitter {
115
115
  readonly __tsonic_type_nodejs_Http_Server: never;
116
116
 
117
- headersTimeout: int;
118
- keepAliveTimeout: int;
117
+ headersTimeout: double;
118
+ keepAliveTimeout: double;
119
119
  readonly listening: boolean;
120
120
  maxHeadersCount: int;
121
- requestTimeout: int;
122
- timeout: int;
121
+ requestTimeout: double;
122
+ timeout: double;
123
123
  address(): AddressInfo | undefined;
124
124
  close(callback?: Action): Server;
125
- listen(port: int, hostname?: string, backlog?: Nullable_1<System_Internal.Int32>, callback?: Action): Server;
126
- listen(port: int, callback: Action): Server;
127
- setTimeout(msecs: int, callback?: Action): Server;
125
+ listen(port: double, hostname?: string, backlog?: Nullable_1<System_Internal.Double>, callback?: Action): Server;
126
+ listen(port: double, callback: Action): Server;
127
+ listen(port: double, hostname: string, callback: Action): Server;
128
+ setTimeout(msecs: double, callback?: Action): Server;
128
129
  }
129
130
 
130
131
 
@@ -140,9 +141,13 @@ export interface ServerResponse$instance extends EventEmitter {
140
141
 
141
142
  readonly finished: boolean;
142
143
  readonly headersSent: boolean;
143
- statusCode: int;
144
+ statusCode: double;
144
145
  statusMessage: string;
145
- end(chunk?: string, encoding?: string, callback?: Action): ServerResponse;
146
+ end(): ServerResponse;
147
+ end(callback: Action): ServerResponse;
148
+ end(chunk: string, encoding?: string, callback?: Action): ServerResponse;
149
+ end(chunk: Buffer, callback?: Action): ServerResponse;
150
+ end(chunk: byte[], callback?: Action): ServerResponse;
146
151
  flushHeaders(): void;
147
152
  getHeader(name: string): string | undefined;
148
153
  getHeaderNames(): string[];
@@ -150,10 +155,12 @@ export interface ServerResponse$instance extends EventEmitter {
150
155
  hasHeader(name: string): boolean;
151
156
  removeHeader(name: string): void;
152
157
  setHeader(name: string, value: string): ServerResponse;
153
- setTimeout(msecs: int, callback?: Action): ServerResponse;
158
+ setTimeout(msecs: double, callback?: Action): ServerResponse;
154
159
  write(chunk: string, encoding?: string, callback?: Action): boolean;
155
- writeHead(statusCode: int, statusMessage?: string, headers?: Dictionary_2<System_Internal.String, System_Internal.String>): ServerResponse;
156
- writeHead(statusCode: int, headers: Dictionary_2<System_Internal.String, System_Internal.String>): ServerResponse;
160
+ write(chunk: Buffer, callback?: Action): boolean;
161
+ write(chunk: byte[], callback?: Action): boolean;
162
+ writeHead(statusCode: double, statusMessage?: string, headers?: Dictionary_2<System_Internal.String, System_Internal.String>): ServerResponse;
163
+ writeHead(statusCode: double, headers: Dictionary_2<System_Internal.String, System_Internal.String>): ServerResponse;
157
164
  }
158
165
 
159
166
 
package/nodejs.Http.d.ts CHANGED
@@ -6,9 +6,9 @@
6
6
  import * as Internal from './nodejs.Http/internal/index.js';
7
7
 
8
8
  // Cross-namespace type imports for constraints
9
- import type { EventEmitter } from './index/internal/index.js';
9
+ import type { Buffer, EventEmitter } from './index/internal/index.js';
10
10
  import type { Dictionary } from '@tsonic/dotnet/System.Collections.Generic.js';
11
- import type { Action, Boolean as ClrBoolean, Delegate, Exception, Int32, Nullable, Object as ClrObject, String as ClrString, Void } from '@tsonic/dotnet/System.js';
11
+ import type { Action, Boolean as ClrBoolean, Byte, Delegate, Double, Exception, Int32, Nullable, Object as ClrObject, String as ClrString, Void } from '@tsonic/dotnet/System.js';
12
12
  import type { ISerializable } from '@tsonic/dotnet/System.Runtime.Serialization.js';
13
13
  import type { Task } from '@tsonic/dotnet/System.Threading.Tasks.js';
14
14
 
package/package.json CHANGED
@@ -1,7 +1,18 @@
1
1
  {
2
2
  "name": "@tsonic/nodejs",
3
- "version": "10.0.39",
3
+ "version": "10.0.41",
4
4
  "description": "TypeScript type definitions for Node.js CLR library",
5
+ "main": "index.d.ts",
6
+ "types": "index.d.ts",
7
+ "files": [
8
+ "**/*.d.ts",
9
+ "**/*.js",
10
+ "**/bindings.json",
11
+ "families.json",
12
+ "tsonic.bindings.json",
13
+ "README.md",
14
+ "LICENSE"
15
+ ],
5
16
  "type": "module",
6
17
  "keywords": [
7
18
  "nodejs",
@@ -18,8 +29,9 @@
18
29
  "type": "git",
19
30
  "url": "https://github.com/tsoniclang/nodejs.git"
20
31
  },
21
- "peerDependencies": {
22
- "@tsonic/dotnet": "10.0.35",
23
- "@tsonic/core": "10.0.35"
32
+ "dependencies": {
33
+ "@tsonic/dotnet": "10.0.37",
34
+ "@tsonic/core": "10.0.37",
35
+ "@tsonic/js": "10.0.41"
24
36
  }
25
37
  }
@@ -1,16 +1,26 @@
1
1
  {
2
2
  "bindingVersion": 1,
3
3
  "packageName": "@tsonic/nodejs",
4
- "surfaceMode": "nodejs",
4
+ "assemblyName": "nodejs",
5
+ "requiredTypeRoots": [
6
+ "."
7
+ ],
5
8
  "runtimePackages": [
6
9
  "@tsonic/nodejs"
7
10
  ],
8
11
  "dotnet": {
9
12
  "frameworkReferences": [
10
- { "id": "Microsoft.AspNetCore.App", "types": "@tsonic/aspnetcore" }
13
+ {
14
+ "id": "Microsoft.AspNetCore.App",
15
+ "types": "@tsonic/aspnetcore"
16
+ }
11
17
  ],
12
18
  "packageReferences": [
13
- { "id": "Tsonic.Nodejs", "version": "1.0.1", "types": "@tsonic/nodejs" }
19
+ {
20
+ "id": "Tsonic.Nodejs",
21
+ "version": "1.0.3",
22
+ "types": "@tsonic/nodejs"
23
+ }
14
24
  ]
15
25
  }
16
26
  }
@@ -1,7 +0,0 @@
1
- {
2
- "schemaVersion": 1,
3
- "id": "@tsonic/nodejs",
4
- "extends": ["@tsonic/js"],
5
- "requiredTypeRoots": ["."],
6
- "useStandardLib": false
7
- }