@tsonic/express 10.0.37 → 10.0.40

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.
@@ -2,22 +2,12 @@
2
2
  // Namespace: express
3
3
  // Assembly: express
4
4
 
5
- // Primitive type aliases from @tsonic/core
6
- import type { sbyte, byte, short, ushort, int, uint, long, ulong, int128, uint128, half, float, double, decimal, nint, nuint, char } from '@tsonic/core/types.js';
7
-
8
5
  // Import types from other namespaces
9
- import type { Dictionary_2, IEnumerable_1, List_1 } from "@tsonic/dotnet/System.Collections.Generic/internal/index.js";
10
- import type { Stream } from "@tsonic/dotnet/System.IO/internal/index.js";
11
- import * as System_Runtime_Serialization_Internal from "@tsonic/dotnet/System.Runtime.Serialization/internal/index.js";
12
- import type { ISerializable } from "@tsonic/dotnet/System.Runtime.Serialization/internal/index.js";
13
- import type { Task } from "@tsonic/dotnet/System.Threading.Tasks/internal/index.js";
14
- import * as System_Internal from "@tsonic/dotnet/System/internal/index.js";
15
- import type { Action, Action_1, Action_2, AsyncCallback, Boolean as ClrBoolean, Byte, DateTime, Exception, IAsyncResult, ICloneable, Int32, Int64, IntPtr, MulticastDelegate, Nullable_1, Object as ClrObject, String as ClrString, Void } from "@tsonic/dotnet/System/internal/index.js";
16
6
 
17
7
  export type CookieEncoder = (value: string) => string;
18
8
 
19
9
 
20
- export type ErrorRequestHandler = (err: Exception, req: Request, res: Response, next: NextFunction) => Promise<void>;
10
+ export type ErrorRequestHandler = (err: Error, req: Request, res: Response, next: NextFunction) => Promise<void>;
21
11
 
22
12
 
23
13
  export type MediaTypeMatcher = (req: Request) => boolean;
@@ -38,20 +28,20 @@ export type RequestHandler = (req: Request, res: Response, next: NextFunction) =
38
28
  export type SetHeadersHandler = (res: Response, path: string, stat: FileStat) => void;
39
29
 
40
30
 
41
- export type TemplateEngine = (path: string, options: Dictionary_2<System_Internal.String, unknown>, callback: Action_2<Exception, System_Internal.String>) => void;
31
+ export type TemplateEngine = (path: string, options: Record<string, unknown>, callback: (err: Error | undefined, html: string | undefined) => void) => void;
42
32
 
43
33
 
44
34
  export type TrustProxyEvaluator = (ip: string) => boolean;
45
35
 
46
36
 
47
- export type VerifyBodyHandler = (req: Request, res: Response, buffer: byte[], encoding: string) => void;
37
+ export type VerifyBodyHandler = (req: Request, res: Response, buffer: Uint8Array, encoding: string) => void;
48
38
 
49
39
 
50
40
  export interface Application$instance extends Router {
51
41
  readonly __tsonic_type_express_Application: never;
52
42
 
53
- readonly locals: Dictionary_2<System_Internal.String, unknown | undefined>;
54
- mountpath: unknown;
43
+ readonly locals: Record<string, unknown | undefined>;
44
+ mountpath: string | string[];
55
45
  readonly router: Router;
56
46
  disable(name: string): Application;
57
47
  disabled(name: string): boolean;
@@ -60,15 +50,15 @@ export interface Application$instance extends Router {
60
50
  engine(ext: string, callback: TemplateEngine): Application;
61
51
  get(name: string): unknown | undefined;
62
52
  get(path: string, callback: RequestHandler, ...callbacks: RequestHandler[]): Router;
63
- listen(path: string, callback?: Action): AppServer;
64
- listen(port: int, callback?: Action): AppServer;
65
- listen(port: int, host: string, callback?: Action): AppServer;
66
- listen(port: int, host: string, backlog: int, callback?: Action): AppServer;
53
+ listen(path: string, callback?: () => void): AppServer;
54
+ listen(port: number, callback?: () => void): AppServer;
55
+ listen(port: number, host: string, callback?: () => void): AppServer;
56
+ listen(port: number, host: string, backlog: number, callback?: () => void): AppServer;
67
57
  param(names: string[], callback: ParamHandler): Application;
68
58
  param(name: string, callback: ParamHandler): Router;
69
59
  path(): string;
70
- render(view: string, callback: Action_2<Exception, System_Internal.String>): void;
71
- render(view: string, viewLocals: Dictionary_2<System_Internal.String, unknown>, callback: Action_2<Exception, System_Internal.String>): void;
60
+ render(view: string, callback: (err: Error | undefined, html: string | undefined) => void): void;
61
+ render(view: string, viewLocals: Record<string, unknown>, callback: (err: Error | undefined, html: string | undefined) => void): void;
72
62
  set(name: string, value: unknown): Application;
73
63
  }
74
64
 
@@ -86,13 +76,12 @@ export interface AppServer$instance {
86
76
  readonly host: string | undefined;
87
77
  listening: boolean;
88
78
  readonly path: string | undefined;
89
- readonly port: Nullable_1<System_Internal.Int32>;
90
- close(callback?: Action_1<Exception>): void;
79
+ readonly port: number | undefined;
80
+ close(callback?: (err: Error | undefined) => void): void;
91
81
  }
92
82
 
93
83
 
94
84
  export const AppServer: {
95
- new(port: Nullable_1<System_Internal.Int32>, host: string, path: string, closeAction: Action): AppServer;
96
85
  };
97
86
 
98
87
 
@@ -101,8 +90,8 @@ export type AppServer = AppServer$instance;
101
90
  export interface ByteRange$instance {
102
91
  readonly __tsonic_type_express_ByteRange: never;
103
92
 
104
- end: long;
105
- start: long;
93
+ end: number;
94
+ start: number;
106
95
  }
107
96
 
108
97
 
@@ -113,26 +102,18 @@ export const ByteRange: {
113
102
 
114
103
  export type ByteRange = ByteRange$instance;
115
104
 
116
- export interface CookieOptions$instance {
117
- readonly __tsonic_type_express_CookieOptions: never;
118
-
119
- get domain(): string | undefined;
120
- set domain(value: string | undefined);
121
- get encode(): CookieEncoder | undefined;
122
- set encode(value: CookieEncoder | undefined);
123
- get expires(): Nullable_1<DateTime>;
124
- set expires(value: Nullable_1<DateTime> | DateTime);
125
- httpOnly: boolean;
126
- get maxAge(): Nullable_1<System_Internal.Int64>;
127
- set maxAge(value: Nullable_1<System_Internal.Int64> | long);
128
- partitioned: boolean;
129
- path: string;
130
- get priority(): string | undefined;
131
- set priority(value: string | undefined);
132
- get sameSite(): unknown | undefined;
133
- set sameSite(value: unknown | undefined);
134
- secure: boolean;
135
- signed: boolean;
105
+ export interface CookieOptions {
106
+ domain?: string;
107
+ encode?: CookieEncoder;
108
+ expires?: Date;
109
+ httpOnly?: boolean;
110
+ maxAge?: number;
111
+ partitioned?: boolean;
112
+ path?: string;
113
+ priority?: string;
114
+ sameSite?: string | boolean;
115
+ secure?: boolean;
116
+ signed?: boolean;
136
117
  }
137
118
 
138
119
 
@@ -140,9 +121,6 @@ export const CookieOptions: {
140
121
  new(): CookieOptions;
141
122
  };
142
123
 
143
-
144
- export type CookieOptions = CookieOptions$instance;
145
-
146
124
  export interface Cookies$instance {
147
125
  readonly __tsonic_type_express_Cookies: never;
148
126
 
@@ -156,22 +134,15 @@ export const Cookies: {
156
134
 
157
135
  export type Cookies = Cookies$instance & { readonly [key: string]: string | undefined; };
158
136
 
159
- export interface CorsOptions$instance {
160
- readonly __tsonic_type_express_CorsOptions: never;
161
-
162
- get allowedHeaders(): string[] | undefined;
163
- set allowedHeaders(value: string[] | undefined);
164
- credentials: boolean;
165
- get exposedHeaders(): string[] | undefined;
166
- set exposedHeaders(value: string[] | undefined);
167
- get maxAgeSeconds(): Nullable_1<System_Internal.Int32>;
168
- set maxAgeSeconds(value: Nullable_1<System_Internal.Int32> | int);
169
- get methods(): string[] | undefined;
170
- set methods(value: string[] | undefined);
171
- optionsSuccessStatus: int;
172
- get origins(): string[] | undefined;
173
- set origins(value: string[] | undefined);
174
- preflightContinue: boolean;
137
+ export interface CorsOptions {
138
+ allowedHeaders?: string[];
139
+ credentials?: boolean;
140
+ exposedHeaders?: string[];
141
+ maxAgeSeconds?: number;
142
+ methods?: string[];
143
+ optionsSuccessStatus?: number;
144
+ origins?: string[];
145
+ preflightContinue?: boolean;
175
146
  }
176
147
 
177
148
 
@@ -179,21 +150,15 @@ export const CorsOptions: {
179
150
  new(): CorsOptions;
180
151
  };
181
152
 
182
-
183
- export type CorsOptions = CorsOptions$instance;
184
-
185
- export interface DownloadOptions$instance {
186
- readonly __tsonic_type_express_DownloadOptions: never;
187
-
188
- acceptRanges: boolean;
189
- cacheControl: boolean;
190
- dotfiles: string;
191
- headers: Dictionary_2<System_Internal.String, System_Internal.String>;
192
- immutable: boolean;
193
- lastModified: boolean;
194
- maxAge: unknown;
195
- get root(): string | undefined;
196
- set root(value: string | undefined);
153
+ export interface DownloadOptions {
154
+ acceptRanges?: boolean;
155
+ cacheControl?: boolean;
156
+ dotfiles?: string;
157
+ headers?: Record<string, string>;
158
+ immutable?: boolean;
159
+ lastModified?: boolean;
160
+ maxAge?: string | number;
161
+ root?: string;
197
162
  }
198
163
 
199
164
 
@@ -201,9 +166,6 @@ export const DownloadOptions: {
201
166
  new(): DownloadOptions;
202
167
  };
203
168
 
204
-
205
- export type DownloadOptions = DownloadOptions$instance;
206
-
207
169
  export interface Files$instance {
208
170
  readonly __tsonic_type_express_Files: never;
209
171
 
@@ -220,8 +182,8 @@ export type Files = Files$instance & { readonly [field: string]: UploadedFile[]
220
182
  export interface FileStat$instance {
221
183
  readonly __tsonic_type_express_FileStat: never;
222
184
 
223
- modifiedAt: DateTime;
224
- size: long;
185
+ modifiedAt: Date;
186
+ size: number;
225
187
  }
226
188
 
227
189
 
@@ -232,19 +194,13 @@ export const FileStat: {
232
194
 
233
195
  export type FileStat = FileStat$instance;
234
196
 
235
- export interface JsonOptions$instance {
236
- readonly __tsonic_type_express_JsonOptions: never;
237
-
238
- inflate: boolean;
239
- get limit(): unknown | undefined;
240
- set limit(value: unknown | undefined);
241
- get reviver(): unknown | undefined;
242
- set reviver(value: unknown | undefined);
243
- strict: boolean;
244
- get type(): unknown | undefined;
245
- set type(value: unknown | undefined);
246
- get verify(): VerifyBodyHandler | undefined;
247
- set verify(value: VerifyBodyHandler | undefined);
197
+ export interface JsonOptions {
198
+ inflate?: boolean;
199
+ limit?: string | number;
200
+ reviver?: unknown;
201
+ strict?: boolean;
202
+ type?: string | string[] | MediaTypeMatcher;
203
+ verify?: VerifyBodyHandler;
248
204
  }
249
205
 
250
206
 
@@ -252,14 +208,11 @@ export const JsonOptions: {
252
208
  new(): JsonOptions;
253
209
  };
254
210
 
255
-
256
- export type JsonOptions = JsonOptions$instance;
257
-
258
211
  export interface Multipart$instance {
259
212
  readonly __tsonic_type_express_Multipart: never;
260
213
 
261
214
  any(): RequestHandler;
262
- array(name: string, maxCount?: Nullable_1<System_Internal.Int32>): RequestHandler;
215
+ array(name: string, maxCount?: number | undefined): RequestHandler;
263
216
  fields(fields: MultipartField[]): RequestHandler;
264
217
  none(): RequestHandler;
265
218
  single(name: string): RequestHandler;
@@ -273,11 +226,8 @@ export const Multipart: {
273
226
 
274
227
  export type Multipart = Multipart$instance;
275
228
 
276
- export interface MultipartField$instance {
277
- readonly __tsonic_type_express_MultipartField: never;
278
-
279
- get maxCount(): Nullable_1<System_Internal.Int32>;
280
- set maxCount(value: Nullable_1<System_Internal.Int32> | int);
229
+ export interface MultipartField {
230
+ maxCount?: number;
281
231
  name: string;
282
232
  }
283
233
 
@@ -286,17 +236,10 @@ export const MultipartField: {
286
236
  new(): MultipartField;
287
237
  };
288
238
 
289
-
290
- export type MultipartField = MultipartField$instance;
291
-
292
- export interface MultipartOptions$instance {
293
- readonly __tsonic_type_express_MultipartOptions: never;
294
-
295
- get maxFileCount(): Nullable_1<System_Internal.Int32>;
296
- set maxFileCount(value: Nullable_1<System_Internal.Int32> | int);
297
- get maxFileSizeBytes(): Nullable_1<System_Internal.Int64>;
298
- set maxFileSizeBytes(value: Nullable_1<System_Internal.Int64> | long);
299
- type: string;
239
+ export interface MultipartOptions {
240
+ maxFileCount?: number;
241
+ maxFileSizeBytes?: number;
242
+ type?: string;
300
243
  }
301
244
 
302
245
 
@@ -304,9 +247,6 @@ export const MultipartOptions: {
304
247
  new(): MultipartOptions;
305
248
  };
306
249
 
307
-
308
- export type MultipartOptions = MultipartOptions$instance;
309
-
310
250
  export interface Params$instance {
311
251
  readonly __tsonic_type_express_Params: never;
312
252
 
@@ -320,10 +260,8 @@ export const Params: {
320
260
 
321
261
  export type Params = Params$instance & { readonly [key: string]: string | undefined; };
322
262
 
323
- export interface RangeOptions$instance {
324
- readonly __tsonic_type_express_RangeOptions: never;
325
-
326
- combine: boolean;
263
+ export interface RangeOptions {
264
+ combine?: boolean;
327
265
  }
328
266
 
329
267
 
@@ -331,13 +269,10 @@ export const RangeOptions: {
331
269
  new(): RangeOptions;
332
270
  };
333
271
 
334
-
335
- export type RangeOptions = RangeOptions$instance;
336
-
337
272
  export interface RangeResult$instance {
338
273
  readonly __tsonic_type_express_RangeResult: never;
339
274
 
340
- readonly ranges: List_1<ByteRange>;
275
+ ranges: ByteRange[];
341
276
  type: string;
342
277
  }
343
278
 
@@ -349,16 +284,11 @@ export const RangeResult: {
349
284
 
350
285
  export type RangeResult = RangeResult$instance;
351
286
 
352
- export interface RawOptions$instance {
353
- readonly __tsonic_type_express_RawOptions: never;
354
-
355
- inflate: boolean;
356
- get limit(): unknown | undefined;
357
- set limit(value: unknown | undefined);
358
- get type(): unknown | undefined;
359
- set type(value: unknown | undefined);
360
- get verify(): VerifyBodyHandler | undefined;
361
- set verify(value: VerifyBodyHandler | undefined);
287
+ export interface RawOptions {
288
+ inflate?: boolean;
289
+ limit?: string | number;
290
+ type?: string | string[] | MediaTypeMatcher;
291
+ verify?: VerifyBodyHandler;
362
292
  }
363
293
 
364
294
 
@@ -366,9 +296,6 @@ export const RawOptions: {
366
296
  new(): RawOptions;
367
297
  };
368
298
 
369
-
370
- export type RawOptions = RawOptions$instance;
371
-
372
299
  export interface Request$instance {
373
300
  readonly __tsonic_type_express_Request: never;
374
301
 
@@ -385,13 +312,13 @@ export interface Request$instance {
385
312
  host: string;
386
313
  hostname: string;
387
314
  ip: string;
388
- ips: List_1<System_Internal.String>;
315
+ ips: string[];
389
316
  method: string;
390
317
  originalUrl: string;
391
318
  readonly params: Params;
392
319
  path: string;
393
320
  protocol: string;
394
- query: Dictionary_2<System_Internal.String, unknown | undefined>;
321
+ query: Record<string, unknown | undefined>;
395
322
  get res(): Response | undefined;
396
323
  set res(value: Response | undefined);
397
324
  get route(): Route | undefined;
@@ -400,17 +327,17 @@ export interface Request$instance {
400
327
  signed: boolean;
401
328
  readonly signedCookies: Cookies;
402
329
  readonly stale: boolean;
403
- subdomains: List_1<System_Internal.String>;
330
+ subdomains: string[];
404
331
  xhr: boolean;
405
- accepts(...types: string[]): unknown | undefined;
406
- acceptsCharsets(...charsets: string[]): unknown | undefined;
407
- acceptsEncodings(...encodings: string[]): unknown | undefined;
408
- acceptsLanguages(...languages: string[]): unknown;
332
+ accepts(...types: string[]): string | false;
333
+ acceptsCharsets(...charsets: string[]): string | false;
334
+ acceptsEncodings(...encodings: string[]): string | false;
335
+ acceptsLanguages(...languages: string[]): string | string[] | false;
409
336
  get(field: string): string | undefined;
410
337
  header(field: string): string | undefined;
411
- is(...types: string[]): unknown | undefined;
338
+ is(...types: string[]): string | false | undefined;
412
339
  param(name: string): string | undefined;
413
- range(size: long, options?: RangeOptions): unknown;
340
+ range(size: number, options?: RangeOptions): RangeResult | -1;
414
341
  setHeader(name: string, value: string): void;
415
342
  }
416
343
 
@@ -427,37 +354,37 @@ export interface Response$instance {
427
354
 
428
355
  readonly app: Application | undefined;
429
356
  headersSent: boolean;
430
- readonly locals: Dictionary_2<System_Internal.String, unknown | undefined>;
357
+ readonly locals: Record<string, unknown | undefined>;
431
358
  get req(): Request | undefined;
432
359
  set req(value: Request | undefined);
433
- statusCode: int;
360
+ statusCode: number;
434
361
  append(field: string, value: string): Response;
435
- append(field: string, values: IEnumerable_1<System_Internal.String>): Response;
362
+ append(field: string, values: readonly string[]): Response;
436
363
  attachment(filename?: string): Response;
437
364
  clearCookie(name: string, options?: CookieOptions): Response;
438
365
  contentType(type: string): Response;
439
366
  cookie(name: string, value: unknown, options?: CookieOptions): Response;
440
- download(path: string, filename?: string, options?: DownloadOptions, fn?: Action_1<Exception>): Response;
441
- end(data?: unknown, encoding?: string, callback?: Action): Response;
442
- format(handlers: Dictionary_2<System_Internal.String, Action>): Response;
367
+ download(path: string, filename?: string, options?: DownloadOptions, fn?: (err: Error | undefined) => void): Response;
368
+ end(data?: unknown, encoding?: string, callback?: () => void): Response;
369
+ format(handlers: Record<string, () => void>): Response;
443
370
  get(field: string): string | undefined;
444
371
  header(field: string, value: unknown): Response;
445
372
  json(body?: unknown): Response;
446
373
  jsonp(body?: unknown): Response;
447
- links(links: Dictionary_2<System_Internal.String, System_Internal.String>): Response;
374
+ links(links: Record<string, string>): Response;
448
375
  location(path: string): Response;
449
376
  redirect(path: string): Response;
450
- redirect(status: int, path: string): Response;
377
+ redirect(status: number, path: string): Response;
451
378
  render(view: string): Response;
452
- render(view: string, viewLocals: Dictionary_2<System_Internal.String, unknown>): Response;
453
- render(view: string, callback: Action_2<Exception, System_Internal.String>): Response;
454
- render(view: string, viewLocals: Dictionary_2<System_Internal.String, unknown>, callback: Action_2<Exception, System_Internal.String>): Response;
379
+ render(view: string, viewLocals: Record<string, unknown>): Response;
380
+ render(view: string, callback: (err: Error | undefined, html: string | undefined) => void): Response;
381
+ render(view: string, viewLocals: Record<string, unknown>, callback: (err: Error | undefined, html: string | undefined) => void): Response;
455
382
  send(body?: unknown): Response;
456
- sendFile(path: string, options?: SendFileOptions, fn?: Action_1<Exception>): Response;
457
- sendStatus(code: int): Response;
383
+ sendFile(path: string, options?: SendFileOptions, fn?: (err: Error | undefined) => void): Response;
384
+ sendStatus(code: number): Response;
458
385
  set(field: string, value: unknown): Response;
459
- set(fields: Dictionary_2<System_Internal.String, System_Internal.String>): Response;
460
- status(code: int): Response;
386
+ set(fields: Record<string, string>): Response;
387
+ status(code: number): Response;
461
388
  type(type: string): Response;
462
389
  vary(field: string): Response;
463
390
  }
@@ -515,12 +442,10 @@ export const Router: {
515
442
 
516
443
  export type Router = Router$instance;
517
444
 
518
- export interface RouterOptions$instance {
519
- readonly __tsonic_type_express_RouterOptions: never;
520
-
521
- caseSensitive: boolean;
522
- mergeParams: boolean;
523
- strict: boolean;
445
+ export interface RouterOptions {
446
+ caseSensitive?: boolean;
447
+ mergeParams?: boolean;
448
+ strict?: boolean;
524
449
  }
525
450
 
526
451
 
@@ -528,9 +453,6 @@ export const RouterOptions: {
528
453
  new(): RouterOptions;
529
454
  };
530
455
 
531
-
532
- export type RouterOptions = RouterOptions$instance;
533
-
534
456
  export interface RoutingHost_1$instance<TSelf extends RoutingHost_1<TSelf>> {
535
457
  readonly __tsonic_type_express_RoutingHost_1: never;
536
458
 
@@ -574,18 +496,15 @@ export const RoutingHost_1: (abstract new<TSelf extends RoutingHost_1<TSelf>>()
574
496
 
575
497
  export type RoutingHost_1<TSelf extends RoutingHost_1<TSelf>> = RoutingHost_1$instance<TSelf>;
576
498
 
577
- export interface SendFileOptions$instance {
578
- readonly __tsonic_type_express_SendFileOptions: never;
579
-
580
- acceptRanges: boolean;
581
- cacheControl: boolean;
582
- dotfiles: string;
583
- headers: Dictionary_2<System_Internal.String, System_Internal.String>;
584
- immutable: boolean;
585
- lastModified: boolean;
586
- maxAge: unknown;
587
- get root(): string | undefined;
588
- set root(value: string | undefined);
499
+ export interface SendFileOptions {
500
+ acceptRanges?: boolean;
501
+ cacheControl?: boolean;
502
+ dotfiles?: string;
503
+ headers?: Record<string, string>;
504
+ immutable?: boolean;
505
+ lastModified?: boolean;
506
+ maxAge?: string | number;
507
+ root?: string;
589
508
  }
590
509
 
591
510
 
@@ -593,27 +512,19 @@ export const SendFileOptions: {
593
512
  new(): SendFileOptions;
594
513
  };
595
514
 
596
-
597
- export type SendFileOptions = SendFileOptions$instance;
598
-
599
- export interface StaticOptions$instance {
600
- readonly __tsonic_type_express_StaticOptions: never;
601
-
602
- acceptRanges: boolean;
603
- cacheControl: boolean;
604
- dotfiles: string;
605
- etag: boolean;
606
- get extensions(): unknown | undefined;
607
- set extensions(value: unknown | undefined);
608
- fallthrough: boolean;
609
- immutable: boolean;
610
- get index(): unknown | undefined;
611
- set index(value: unknown | undefined);
612
- lastModified: boolean;
613
- maxAge: unknown;
614
- redirect: boolean;
615
- get setHeaders(): SetHeadersHandler | undefined;
616
- set setHeaders(value: SetHeadersHandler | undefined);
515
+ export interface StaticOptions {
516
+ acceptRanges?: boolean;
517
+ cacheControl?: boolean;
518
+ dotfiles?: string;
519
+ etag?: boolean;
520
+ extensions?: string[] | false;
521
+ fallthrough?: boolean;
522
+ immutable?: boolean;
523
+ index?: string | string[] | false;
524
+ lastModified?: boolean;
525
+ maxAge?: string | number;
526
+ redirect?: boolean;
527
+ setHeaders?: SetHeadersHandler;
617
528
  }
618
529
 
619
530
 
@@ -621,20 +532,12 @@ export const StaticOptions: {
621
532
  new(): StaticOptions;
622
533
  };
623
534
 
624
-
625
- export type StaticOptions = StaticOptions$instance;
626
-
627
- export interface TextOptions$instance {
628
- readonly __tsonic_type_express_TextOptions: never;
629
-
630
- defaultCharset: string;
631
- inflate: boolean;
632
- get limit(): unknown | undefined;
633
- set limit(value: unknown | undefined);
634
- get type(): unknown | undefined;
635
- set type(value: unknown | undefined);
636
- get verify(): VerifyBodyHandler | undefined;
637
- set verify(value: VerifyBodyHandler | undefined);
535
+ export interface TextOptions {
536
+ defaultCharset?: string;
537
+ inflate?: boolean;
538
+ limit?: string | number;
539
+ type?: string | string[] | MediaTypeMatcher;
540
+ verify?: VerifyBodyHandler;
638
541
  }
639
542
 
640
543
 
@@ -642,19 +545,16 @@ export const TextOptions: {
642
545
  new(): TextOptions;
643
546
  };
644
547
 
645
-
646
- export type TextOptions = TextOptions$instance;
647
-
648
548
  export interface UploadedFile$instance {
649
549
  readonly __tsonic_type_express_UploadedFile: never;
650
550
 
651
551
  readonly fieldname: string;
652
552
  readonly mimetype: string;
653
553
  readonly originalname: string;
654
- readonly size: long;
655
- copyToAsync(target: Stream): Task;
656
- openReadStream(): Stream;
657
- save(path: string): Task;
554
+ readonly size: number;
555
+ bytes(): Promise<Uint8Array>;
556
+ save(path: string): Promise<void>;
557
+ text(): Promise<string>;
658
558
  }
659
559
 
660
560
 
@@ -664,19 +564,14 @@ export const UploadedFile: {
664
564
 
665
565
  export type UploadedFile = UploadedFile$instance;
666
566
 
667
- export interface UrlEncodedOptions$instance {
668
- readonly __tsonic_type_express_UrlEncodedOptions: never;
669
-
670
- depth: int;
671
- extended: boolean;
672
- inflate: boolean;
673
- get limit(): unknown | undefined;
674
- set limit(value: unknown | undefined);
675
- parameterLimit: int;
676
- get type(): unknown | undefined;
677
- set type(value: unknown | undefined);
678
- get verify(): VerifyBodyHandler | undefined;
679
- set verify(value: VerifyBodyHandler | undefined);
567
+ export interface UrlEncodedOptions {
568
+ depth?: number;
569
+ extended?: boolean;
570
+ inflate?: boolean;
571
+ limit?: string | number;
572
+ parameterLimit?: number;
573
+ type?: string | string[] | MediaTypeMatcher;
574
+ verify?: VerifyBodyHandler;
680
575
  }
681
576
 
682
577
 
@@ -684,9 +579,6 @@ export const UrlEncodedOptions: {
684
579
  new(): UrlEncodedOptions;
685
580
  };
686
581
 
687
-
688
- export type UrlEncodedOptions = UrlEncodedOptions$instance;
689
-
690
582
  export abstract class express$instance {
691
583
  static app(): Application;
692
584
  static application(): Application;
package/index.d.ts CHANGED
@@ -5,13 +5,6 @@
5
5
  // Import internal declarations
6
6
  import * as Internal from './index/internal/index.js';
7
7
 
8
- // Cross-namespace type imports for constraints
9
- import type { Dictionary, IEnumerable, List } from '@tsonic/dotnet/System.Collections.Generic.js';
10
- import type { Stream } from '@tsonic/dotnet/System.IO.js';
11
- import type { Action, AsyncCallback, Boolean as ClrBoolean, Byte, DateTime, Exception, IAsyncResult, ICloneable, Int32, Int64, IntPtr, MulticastDelegate, Nullable, Object as ClrObject, String as ClrString, Void } from '@tsonic/dotnet/System.js';
12
- import type { ISerializable } from '@tsonic/dotnet/System.Runtime.Serialization.js';
13
- import type { Task } from '@tsonic/dotnet/System.Threading.Tasks.js';
14
-
15
8
  // Public API exports (curated - no internal $instance/$views leakage)
16
9
  export { Application as Application } from './index/internal/index.js';
17
10
  export { AppServer as AppServer } from './index/internal/index.js';