@tsonic/express 10.0.1
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/LICENSE +21 -0
- package/README.md +60 -0
- package/families.json +51 -0
- package/index/bindings.json +8136 -0
- package/index/internal/index.d.ts +619 -0
- package/index.d.ts +45 -0
- package/index.js +9 -0
- package/package.json +25 -0
|
@@ -0,0 +1,619 @@
|
|
|
1
|
+
// Generated by tsbindgen - Architecture
|
|
2
|
+
// Namespace: express
|
|
3
|
+
// Assembly: express
|
|
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
|
+
// Import types from other namespaces
|
|
9
|
+
import type { Dictionary, IEnumerable, List } from "@tsonic/dotnet/System.Collections.Generic.js";
|
|
10
|
+
import * as System_Internal from "@tsonic/dotnet/System.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 * as System_Runtime_Serialization_Internal from "@tsonic/dotnet/System.Runtime.Serialization.js";
|
|
13
|
+
import type { ISerializable } from "@tsonic/dotnet/System.Runtime.Serialization.js";
|
|
14
|
+
import type { Task } from "@tsonic/dotnet/System.Threading.Tasks.js";
|
|
15
|
+
|
|
16
|
+
export type CookieEncoder = (value: string) => string;
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
export type MediaTypeMatcher = (req: Request) => boolean;
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
export type NextFunction = (control: string) => Task;
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
export type ParamHandler = (req: Request, res: Response, next: NextFunction, value: unknown, name: string) => Task;
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
export type QueryParser = (queryString: string) => unknown | undefined;
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
export type RequestHandler = (req: Request, res: Response, next: NextFunction) => Task;
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
export type SetHeadersHandler = (res: Response, path: string, stat: FileStat) => void;
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
export type TemplateEngine = (path: string, options: Dictionary<System_Internal.String, unknown>, callback: Action<Exception, System_Internal.String>) => void;
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
export type TrustProxyEvaluator = (ip: string) => boolean;
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
export type VerifyBodyHandler = (req: Request, res: Response, buffer: byte[], encoding: string) => void;
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
export interface Application$instance extends Router {
|
|
47
|
+
readonly locals: Dictionary<System_Internal.String, unknown | undefined>;
|
|
48
|
+
mountpath: unknown;
|
|
49
|
+
readonly router: Router;
|
|
50
|
+
disable(name: string): Application;
|
|
51
|
+
disabled(name: string): boolean;
|
|
52
|
+
enable(name: string): Application;
|
|
53
|
+
enabled(name: string): boolean;
|
|
54
|
+
engine(ext: string, callback: TemplateEngine): Application;
|
|
55
|
+
get(name: string): unknown | undefined;
|
|
56
|
+
get(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
57
|
+
get(path: unknown, callback: unknown, ...callbacks: unknown[]): unknown;
|
|
58
|
+
listen(path: string, callback?: Action): AppServer;
|
|
59
|
+
listen(port: int, callback?: Action): AppServer;
|
|
60
|
+
listen(port: int, host: string, callback?: Action): AppServer;
|
|
61
|
+
listen(port: int, host: string, backlog: int, callback?: Action): AppServer;
|
|
62
|
+
param(names: string[], callback: ParamHandler): Application;
|
|
63
|
+
param(name: string, callback: ParamHandler): Router;
|
|
64
|
+
param(name: string, callback: ParamHandler): unknown;
|
|
65
|
+
path(): string;
|
|
66
|
+
render(view: string, callback: Action<Exception, System_Internal.String>): void;
|
|
67
|
+
render(view: string, viewLocals: Dictionary<System_Internal.String, unknown>, callback: Action<Exception, System_Internal.String>): void;
|
|
68
|
+
set(name: string, value: unknown): Application;
|
|
69
|
+
use(callback: unknown, ...callbacks: unknown[]): Application;
|
|
70
|
+
use(path: unknown, callback: unknown, ...callbacks: unknown[]): Application;
|
|
71
|
+
use(callback: unknown, ...callbacks: unknown[]): Router;
|
|
72
|
+
use(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
73
|
+
use(callback: unknown, ...callbacks: unknown[]): unknown;
|
|
74
|
+
use(path: unknown, callback: unknown, ...callbacks: unknown[]): unknown;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
export const Application: {
|
|
79
|
+
new(): Application;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
export type Application = Application$instance;
|
|
84
|
+
|
|
85
|
+
export interface AppServer$instance {
|
|
86
|
+
readonly host: string | undefined;
|
|
87
|
+
listening: boolean;
|
|
88
|
+
readonly path: string | undefined;
|
|
89
|
+
readonly port: Nullable<System_Internal.Int32>;
|
|
90
|
+
close(callback?: Action<Exception>): void;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
export const AppServer: {
|
|
95
|
+
new(port: Nullable<System_Internal.Int32>, host: string, path: string, closeAction: Action): AppServer;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
export type AppServer = AppServer$instance;
|
|
100
|
+
|
|
101
|
+
export interface ByteRange$instance {
|
|
102
|
+
end: long;
|
|
103
|
+
start: long;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
export const ByteRange: {
|
|
108
|
+
new(): ByteRange;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
export type ByteRange = ByteRange$instance;
|
|
113
|
+
|
|
114
|
+
export interface CookieOptions$instance {
|
|
115
|
+
get domain(): string | undefined;
|
|
116
|
+
set domain(value: string | undefined);
|
|
117
|
+
get encode(): CookieEncoder | undefined;
|
|
118
|
+
set encode(value: CookieEncoder | undefined);
|
|
119
|
+
expires: Nullable<DateTime>;
|
|
120
|
+
httpOnly: boolean;
|
|
121
|
+
maxAge: Nullable<System_Internal.Int64>;
|
|
122
|
+
partitioned: boolean;
|
|
123
|
+
path: string;
|
|
124
|
+
get priority(): string | undefined;
|
|
125
|
+
set priority(value: string | undefined);
|
|
126
|
+
get sameSite(): unknown | undefined;
|
|
127
|
+
set sameSite(value: unknown | undefined);
|
|
128
|
+
secure: boolean;
|
|
129
|
+
signed: boolean;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
export const CookieOptions: {
|
|
134
|
+
new(): CookieOptions;
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
export type CookieOptions = CookieOptions$instance;
|
|
139
|
+
|
|
140
|
+
export interface DownloadOptions$instance {
|
|
141
|
+
acceptRanges: boolean;
|
|
142
|
+
cacheControl: boolean;
|
|
143
|
+
dotfiles: string;
|
|
144
|
+
headers: Dictionary<System_Internal.String, System_Internal.String>;
|
|
145
|
+
immutable: boolean;
|
|
146
|
+
lastModified: boolean;
|
|
147
|
+
maxAge: unknown;
|
|
148
|
+
get root(): string | undefined;
|
|
149
|
+
set root(value: string | undefined);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
export const DownloadOptions: {
|
|
154
|
+
new(): DownloadOptions;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
export type DownloadOptions = DownloadOptions$instance;
|
|
159
|
+
|
|
160
|
+
export interface FileStat$instance {
|
|
161
|
+
modifiedAt: DateTime;
|
|
162
|
+
size: long;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
export const FileStat: {
|
|
167
|
+
new(): FileStat;
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
export type FileStat = FileStat$instance;
|
|
172
|
+
|
|
173
|
+
export interface JsonOptions$instance {
|
|
174
|
+
inflate: boolean;
|
|
175
|
+
get limit(): unknown | undefined;
|
|
176
|
+
set limit(value: unknown | undefined);
|
|
177
|
+
get reviver(): unknown | undefined;
|
|
178
|
+
set reviver(value: unknown | undefined);
|
|
179
|
+
strict: boolean;
|
|
180
|
+
get type(): unknown | undefined;
|
|
181
|
+
set type(value: unknown | undefined);
|
|
182
|
+
get verify(): VerifyBodyHandler | undefined;
|
|
183
|
+
set verify(value: VerifyBodyHandler | undefined);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
export const JsonOptions: {
|
|
188
|
+
new(): JsonOptions;
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
export type JsonOptions = JsonOptions$instance;
|
|
193
|
+
|
|
194
|
+
export interface RangeOptions$instance {
|
|
195
|
+
combine: boolean;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
export const RangeOptions: {
|
|
200
|
+
new(): RangeOptions;
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
export type RangeOptions = RangeOptions$instance;
|
|
205
|
+
|
|
206
|
+
export interface RangeResult$instance {
|
|
207
|
+
readonly ranges: List<ByteRange>;
|
|
208
|
+
type: string;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
export const RangeResult: {
|
|
213
|
+
new(): RangeResult;
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
export type RangeResult = RangeResult$instance;
|
|
218
|
+
|
|
219
|
+
export interface RawOptions$instance {
|
|
220
|
+
inflate: boolean;
|
|
221
|
+
get limit(): unknown | undefined;
|
|
222
|
+
set limit(value: unknown | undefined);
|
|
223
|
+
get type(): unknown | undefined;
|
|
224
|
+
set type(value: unknown | undefined);
|
|
225
|
+
get verify(): VerifyBodyHandler | undefined;
|
|
226
|
+
set verify(value: VerifyBodyHandler | undefined);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
export const RawOptions: {
|
|
231
|
+
new(): RawOptions;
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
export type RawOptions = RawOptions$instance;
|
|
236
|
+
|
|
237
|
+
export interface Request$instance {
|
|
238
|
+
get app(): Application | undefined;
|
|
239
|
+
set app(value: Application | undefined);
|
|
240
|
+
baseUrl: string;
|
|
241
|
+
get body(): unknown | undefined;
|
|
242
|
+
set body(value: unknown | undefined);
|
|
243
|
+
cookies: Dictionary<System_Internal.String, System_Internal.String>;
|
|
244
|
+
fresh: boolean;
|
|
245
|
+
host: string;
|
|
246
|
+
hostname: string;
|
|
247
|
+
ip: string;
|
|
248
|
+
ips: List<System_Internal.String>;
|
|
249
|
+
method: string;
|
|
250
|
+
originalUrl: string;
|
|
251
|
+
params: Dictionary<System_Internal.String, unknown | undefined>;
|
|
252
|
+
path: string;
|
|
253
|
+
protocol: string;
|
|
254
|
+
query: Dictionary<System_Internal.String, unknown | undefined>;
|
|
255
|
+
get res(): Response | undefined;
|
|
256
|
+
set res(value: Response | undefined);
|
|
257
|
+
get route(): Route | undefined;
|
|
258
|
+
set route(value: Route | undefined);
|
|
259
|
+
readonly secure: boolean;
|
|
260
|
+
signed: boolean;
|
|
261
|
+
signedCookies: Dictionary<System_Internal.String, System_Internal.String>;
|
|
262
|
+
readonly stale: boolean;
|
|
263
|
+
subdomains: List<System_Internal.String>;
|
|
264
|
+
xhr: boolean;
|
|
265
|
+
accepts(...types: string[]): unknown | undefined;
|
|
266
|
+
acceptsCharsets(...charsets: string[]): unknown | undefined;
|
|
267
|
+
acceptsEncodings(...encodings: string[]): unknown | undefined;
|
|
268
|
+
acceptsLanguages(...languages: string[]): unknown;
|
|
269
|
+
get(field: string): string | undefined;
|
|
270
|
+
header(field: string): string | undefined;
|
|
271
|
+
is(...types: string[]): unknown | undefined;
|
|
272
|
+
range(size: long, options?: RangeOptions): unknown;
|
|
273
|
+
setHeader(name: string, value: string): void;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
export const Request: {
|
|
278
|
+
new(): Request;
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
export type Request = Request$instance;
|
|
283
|
+
|
|
284
|
+
export interface Response$instance {
|
|
285
|
+
readonly app: Application | undefined;
|
|
286
|
+
headersSent: boolean;
|
|
287
|
+
readonly locals: Dictionary<System_Internal.String, unknown | undefined>;
|
|
288
|
+
get req(): Request | undefined;
|
|
289
|
+
set req(value: Request | undefined);
|
|
290
|
+
statusCode: int;
|
|
291
|
+
append(field: string, value: string): Response;
|
|
292
|
+
append(field: string, values: IEnumerable<System_Internal.String>): Response;
|
|
293
|
+
attachment(filename?: string): Response;
|
|
294
|
+
clearCookie(name: string, options?: CookieOptions): Response;
|
|
295
|
+
contentType(type: string): Response;
|
|
296
|
+
cookie(name: string, value: unknown, options?: CookieOptions): Response;
|
|
297
|
+
download(path: string, filename?: string, options?: DownloadOptions, fn?: Action<Exception>): Response;
|
|
298
|
+
end(data?: unknown, encoding?: string, callback?: Action): Response;
|
|
299
|
+
format(handlers: Dictionary<System_Internal.String, Action>): Response;
|
|
300
|
+
get(field: string): string | undefined;
|
|
301
|
+
header(field: string, value: unknown): Response;
|
|
302
|
+
json(body?: unknown): Response;
|
|
303
|
+
jsonp(body?: unknown): Response;
|
|
304
|
+
links(links: Dictionary<System_Internal.String, System_Internal.String>): Response;
|
|
305
|
+
location(path: string): Response;
|
|
306
|
+
redirect(path: string): Response;
|
|
307
|
+
redirect(status: int, path: string): Response;
|
|
308
|
+
render(view: string): Response;
|
|
309
|
+
render(view: string, viewLocals: Dictionary<System_Internal.String, unknown>): Response;
|
|
310
|
+
render(view: string, callback: Action<Exception, System_Internal.String>): Response;
|
|
311
|
+
render(view: string, viewLocals: Dictionary<System_Internal.String, unknown>, callback: Action<Exception, System_Internal.String>): Response;
|
|
312
|
+
send(body?: unknown): Response;
|
|
313
|
+
sendFile(path: string, options?: SendFileOptions, fn?: Action<Exception>): Response;
|
|
314
|
+
sendStatus(code: int): Response;
|
|
315
|
+
set(field: string, value: unknown): Response;
|
|
316
|
+
set(fields: Dictionary<System_Internal.String, System_Internal.String>): Response;
|
|
317
|
+
status(code: int): Response;
|
|
318
|
+
type(type: string): Response;
|
|
319
|
+
vary(field: string): Response;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
export const Response: {
|
|
324
|
+
new(): Response;
|
|
325
|
+
};
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
export type Response = Response$instance;
|
|
329
|
+
|
|
330
|
+
export interface Route$instance extends RoutingHost_1<Route> {
|
|
331
|
+
readonly path: unknown;
|
|
332
|
+
all(callback: unknown, ...callbacks: unknown[]): Route;
|
|
333
|
+
all(routePath: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
334
|
+
all(path: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
335
|
+
checkout(routePath: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
336
|
+
checkout(path: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
337
|
+
copy(routePath: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
338
|
+
copy(path: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
339
|
+
delete(callback: unknown, ...callbacks: unknown[]): Route;
|
|
340
|
+
delete(routePath: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
341
|
+
delete(path: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
342
|
+
get(callback: unknown, ...callbacks: unknown[]): Route;
|
|
343
|
+
get(routePath: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
344
|
+
get(path: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
345
|
+
head(routePath: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
346
|
+
head(path: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
347
|
+
lock_(routePath: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
348
|
+
lock_(path: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
349
|
+
m_search(routePath: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
350
|
+
m_search(path: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
351
|
+
merge(routePath: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
352
|
+
merge(path: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
353
|
+
method(method: string, routePath: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
354
|
+
method(method: string, path: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
355
|
+
mkactivity(routePath: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
356
|
+
mkactivity(path: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
357
|
+
mkcol(routePath: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
358
|
+
mkcol(path: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
359
|
+
move(routePath: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
360
|
+
move(path: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
361
|
+
notify(routePath: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
362
|
+
notify(path: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
363
|
+
options(callback: unknown, ...callbacks: unknown[]): Route;
|
|
364
|
+
options(routePath: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
365
|
+
options(path: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
366
|
+
patch(callback: unknown, ...callbacks: unknown[]): Route;
|
|
367
|
+
patch(routePath: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
368
|
+
patch(path: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
369
|
+
post(callback: unknown, ...callbacks: unknown[]): Route;
|
|
370
|
+
post(routePath: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
371
|
+
post(path: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
372
|
+
purge(routePath: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
373
|
+
purge(path: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
374
|
+
put(callback: unknown, ...callbacks: unknown[]): Route;
|
|
375
|
+
put(routePath: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
376
|
+
put(path: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
377
|
+
report(routePath: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
378
|
+
report(path: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
379
|
+
search(routePath: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
380
|
+
search(path: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
381
|
+
subscribe(routePath: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
382
|
+
subscribe(path: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
383
|
+
trace(routePath: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
384
|
+
trace(path: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
385
|
+
unlock(routePath: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
386
|
+
unlock(path: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
387
|
+
unsubscribe(routePath: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
388
|
+
unsubscribe(path: unknown, callback: unknown, ...callbacks: unknown[]): Route;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
export const Route: {
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
export type Route = Route$instance;
|
|
397
|
+
|
|
398
|
+
export interface Router$instance extends RoutingHost_1<Router> {
|
|
399
|
+
all(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
400
|
+
all(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
401
|
+
checkout(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
402
|
+
checkout(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
403
|
+
copy(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
404
|
+
copy(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
405
|
+
delete(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
406
|
+
delete(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
407
|
+
get(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
408
|
+
get(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
409
|
+
head(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
410
|
+
head(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
411
|
+
lock_(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
412
|
+
lock_(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
413
|
+
m_search(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
414
|
+
m_search(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
415
|
+
merge(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
416
|
+
merge(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
417
|
+
method(method: string, path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
418
|
+
method(method: string, path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
419
|
+
mkactivity(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
420
|
+
mkactivity(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
421
|
+
mkcol(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
422
|
+
mkcol(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
423
|
+
move(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
424
|
+
move(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
425
|
+
notify(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
426
|
+
notify(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
427
|
+
options(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
428
|
+
options(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
429
|
+
param(name: string, callback: ParamHandler): Router;
|
|
430
|
+
param(name: string, callback: ParamHandler): Router;
|
|
431
|
+
patch(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
432
|
+
patch(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
433
|
+
post(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
434
|
+
post(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
435
|
+
purge(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
436
|
+
purge(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
437
|
+
put(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
438
|
+
put(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
439
|
+
report(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
440
|
+
report(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
441
|
+
route(path: unknown): Route;
|
|
442
|
+
search(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
443
|
+
search(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
444
|
+
subscribe(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
445
|
+
subscribe(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
446
|
+
trace(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
447
|
+
trace(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
448
|
+
unlock(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
449
|
+
unlock(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
450
|
+
unsubscribe(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
451
|
+
unsubscribe(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
452
|
+
use(callback: unknown, ...callbacks: unknown[]): Router;
|
|
453
|
+
use(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
454
|
+
use(callback: unknown, ...callbacks: unknown[]): Router;
|
|
455
|
+
use(path: unknown, callback: unknown, ...callbacks: unknown[]): Router;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
export const Router: {
|
|
460
|
+
new(options: RouterOptions): Router;
|
|
461
|
+
};
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
export type Router = Router$instance;
|
|
465
|
+
|
|
466
|
+
export interface RouterOptions$instance {
|
|
467
|
+
caseSensitive: boolean;
|
|
468
|
+
mergeParams: boolean;
|
|
469
|
+
strict: boolean;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
export const RouterOptions: {
|
|
474
|
+
new(): RouterOptions;
|
|
475
|
+
};
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
export type RouterOptions = RouterOptions$instance;
|
|
479
|
+
|
|
480
|
+
export interface RoutingHost_1$instance<TSelf extends RoutingHost_1<TSelf>> {
|
|
481
|
+
all(path: unknown, callback: unknown, ...callbacks: unknown[]): TSelf;
|
|
482
|
+
checkout(path: unknown, callback: unknown, ...callbacks: unknown[]): TSelf;
|
|
483
|
+
copy(path: unknown, callback: unknown, ...callbacks: unknown[]): TSelf;
|
|
484
|
+
delete(path: unknown, callback: unknown, ...callbacks: unknown[]): TSelf;
|
|
485
|
+
get(path: unknown, callback: unknown, ...callbacks: unknown[]): TSelf;
|
|
486
|
+
head(path: unknown, callback: unknown, ...callbacks: unknown[]): TSelf;
|
|
487
|
+
lock_(path: unknown, callback: unknown, ...callbacks: unknown[]): TSelf;
|
|
488
|
+
m_search(path: unknown, callback: unknown, ...callbacks: unknown[]): TSelf;
|
|
489
|
+
merge(path: unknown, callback: unknown, ...callbacks: unknown[]): TSelf;
|
|
490
|
+
method(method: string, path: unknown, callback: unknown, ...callbacks: unknown[]): TSelf;
|
|
491
|
+
mkactivity(path: unknown, callback: unknown, ...callbacks: unknown[]): TSelf;
|
|
492
|
+
mkcol(path: unknown, callback: unknown, ...callbacks: unknown[]): TSelf;
|
|
493
|
+
move(path: unknown, callback: unknown, ...callbacks: unknown[]): TSelf;
|
|
494
|
+
notify(path: unknown, callback: unknown, ...callbacks: unknown[]): TSelf;
|
|
495
|
+
options(path: unknown, callback: unknown, ...callbacks: unknown[]): TSelf;
|
|
496
|
+
param(name: string, callback: ParamHandler): TSelf;
|
|
497
|
+
patch(path: unknown, callback: unknown, ...callbacks: unknown[]): TSelf;
|
|
498
|
+
post(path: unknown, callback: unknown, ...callbacks: unknown[]): TSelf;
|
|
499
|
+
purge(path: unknown, callback: unknown, ...callbacks: unknown[]): TSelf;
|
|
500
|
+
put(path: unknown, callback: unknown, ...callbacks: unknown[]): TSelf;
|
|
501
|
+
report(path: unknown, callback: unknown, ...callbacks: unknown[]): TSelf;
|
|
502
|
+
route(path: unknown): Route;
|
|
503
|
+
search(path: unknown, callback: unknown, ...callbacks: unknown[]): TSelf;
|
|
504
|
+
subscribe(path: unknown, callback: unknown, ...callbacks: unknown[]): TSelf;
|
|
505
|
+
trace(path: unknown, callback: unknown, ...callbacks: unknown[]): TSelf;
|
|
506
|
+
unlock(path: unknown, callback: unknown, ...callbacks: unknown[]): TSelf;
|
|
507
|
+
unsubscribe(path: unknown, callback: unknown, ...callbacks: unknown[]): TSelf;
|
|
508
|
+
use(callback: unknown, ...callbacks: unknown[]): TSelf;
|
|
509
|
+
use(path: unknown, callback: unknown, ...callbacks: unknown[]): TSelf;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
export const RoutingHost_1: (abstract new<TSelf extends RoutingHost_1<TSelf>>() => RoutingHost_1<TSelf>) & {
|
|
514
|
+
};
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
export type RoutingHost_1<TSelf extends RoutingHost_1<TSelf>> = RoutingHost_1$instance<TSelf>;
|
|
518
|
+
|
|
519
|
+
export interface SendFileOptions$instance {
|
|
520
|
+
acceptRanges: boolean;
|
|
521
|
+
cacheControl: boolean;
|
|
522
|
+
dotfiles: string;
|
|
523
|
+
headers: Dictionary<System_Internal.String, System_Internal.String>;
|
|
524
|
+
immutable: boolean;
|
|
525
|
+
lastModified: boolean;
|
|
526
|
+
maxAge: unknown;
|
|
527
|
+
get root(): string | undefined;
|
|
528
|
+
set root(value: string | undefined);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
export const SendFileOptions: {
|
|
533
|
+
new(): SendFileOptions;
|
|
534
|
+
};
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
export type SendFileOptions = SendFileOptions$instance;
|
|
538
|
+
|
|
539
|
+
export interface StaticOptions$instance {
|
|
540
|
+
acceptRanges: boolean;
|
|
541
|
+
cacheControl: boolean;
|
|
542
|
+
dotfiles: string;
|
|
543
|
+
etag: boolean;
|
|
544
|
+
get extensions(): unknown | undefined;
|
|
545
|
+
set extensions(value: unknown | undefined);
|
|
546
|
+
fallthrough: boolean;
|
|
547
|
+
immutable: boolean;
|
|
548
|
+
get index(): unknown | undefined;
|
|
549
|
+
set index(value: unknown | undefined);
|
|
550
|
+
lastModified: boolean;
|
|
551
|
+
maxAge: unknown;
|
|
552
|
+
redirect: boolean;
|
|
553
|
+
get setHeaders(): SetHeadersHandler | undefined;
|
|
554
|
+
set setHeaders(value: SetHeadersHandler | undefined);
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
export const StaticOptions: {
|
|
559
|
+
new(): StaticOptions;
|
|
560
|
+
};
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
export type StaticOptions = StaticOptions$instance;
|
|
564
|
+
|
|
565
|
+
export interface TextOptions$instance {
|
|
566
|
+
defaultCharset: string;
|
|
567
|
+
inflate: boolean;
|
|
568
|
+
get limit(): unknown | undefined;
|
|
569
|
+
set limit(value: unknown | undefined);
|
|
570
|
+
get type(): unknown | undefined;
|
|
571
|
+
set type(value: unknown | undefined);
|
|
572
|
+
get verify(): VerifyBodyHandler | undefined;
|
|
573
|
+
set verify(value: VerifyBodyHandler | undefined);
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
export const TextOptions: {
|
|
578
|
+
new(): TextOptions;
|
|
579
|
+
};
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
export type TextOptions = TextOptions$instance;
|
|
583
|
+
|
|
584
|
+
export interface UrlEncodedOptions$instance {
|
|
585
|
+
depth: int;
|
|
586
|
+
extended: boolean;
|
|
587
|
+
inflate: boolean;
|
|
588
|
+
get limit(): unknown | undefined;
|
|
589
|
+
set limit(value: unknown | undefined);
|
|
590
|
+
parameterLimit: int;
|
|
591
|
+
get type(): unknown | undefined;
|
|
592
|
+
set type(value: unknown | undefined);
|
|
593
|
+
get verify(): VerifyBodyHandler | undefined;
|
|
594
|
+
set verify(value: VerifyBodyHandler | undefined);
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
|
|
598
|
+
export const UrlEncodedOptions: {
|
|
599
|
+
new(): UrlEncodedOptions;
|
|
600
|
+
};
|
|
601
|
+
|
|
602
|
+
|
|
603
|
+
export type UrlEncodedOptions = UrlEncodedOptions$instance;
|
|
604
|
+
|
|
605
|
+
export abstract class express$instance {
|
|
606
|
+
static app(): Application;
|
|
607
|
+
static application(): Application;
|
|
608
|
+
static create(): Application;
|
|
609
|
+
static json(options?: JsonOptions): RequestHandler;
|
|
610
|
+
static raw(options?: RawOptions): RequestHandler;
|
|
611
|
+
static Router(options?: RouterOptions): Router;
|
|
612
|
+
static static(root: string, options?: StaticOptions): RequestHandler;
|
|
613
|
+
static text(options?: TextOptions): RequestHandler;
|
|
614
|
+
static urlencoded(options?: UrlEncodedOptions): RequestHandler;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
|
|
618
|
+
export type express = express$instance;
|
|
619
|
+
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// Generated by tsbindgen - Architecture
|
|
2
|
+
// Namespace: express
|
|
3
|
+
// Facade - Public API Surface
|
|
4
|
+
|
|
5
|
+
// Import internal declarations
|
|
6
|
+
import * as Internal from './index/internal/index.js';
|
|
7
|
+
|
|
8
|
+
// Cross-namespace type imports for constraints
|
|
9
|
+
import type { Dictionary, IEnumerable, List } from '@tsonic/dotnet/System.Collections.Generic.js';
|
|
10
|
+
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';
|
|
11
|
+
import type { ISerializable } from '@tsonic/dotnet/System.Runtime.Serialization.js';
|
|
12
|
+
import type { Task } from '@tsonic/dotnet/System.Threading.Tasks.js';
|
|
13
|
+
|
|
14
|
+
// Public API exports (curated - no internal $instance/$views leakage)
|
|
15
|
+
export { Application as Application } from './index/internal/index.js';
|
|
16
|
+
export { AppServer as AppServer } from './index/internal/index.js';
|
|
17
|
+
export type NextFunction = Internal.NextFunction;
|
|
18
|
+
export type RequestHandler = Internal.RequestHandler;
|
|
19
|
+
export type ParamHandler = Internal.ParamHandler;
|
|
20
|
+
export type VerifyBodyHandler = Internal.VerifyBodyHandler;
|
|
21
|
+
export type MediaTypeMatcher = Internal.MediaTypeMatcher;
|
|
22
|
+
export type CookieEncoder = Internal.CookieEncoder;
|
|
23
|
+
export type QueryParser = Internal.QueryParser;
|
|
24
|
+
export type TrustProxyEvaluator = Internal.TrustProxyEvaluator;
|
|
25
|
+
export type TemplateEngine = Internal.TemplateEngine;
|
|
26
|
+
export type SetHeadersHandler = Internal.SetHeadersHandler;
|
|
27
|
+
export { RouterOptions as RouterOptions } from './index/internal/index.js';
|
|
28
|
+
export { JsonOptions as JsonOptions } from './index/internal/index.js';
|
|
29
|
+
export { RawOptions as RawOptions } from './index/internal/index.js';
|
|
30
|
+
export { TextOptions as TextOptions } from './index/internal/index.js';
|
|
31
|
+
export { UrlEncodedOptions as UrlEncodedOptions } from './index/internal/index.js';
|
|
32
|
+
export { StaticOptions as StaticOptions } from './index/internal/index.js';
|
|
33
|
+
export { SendFileOptions as SendFileOptions } from './index/internal/index.js';
|
|
34
|
+
export { DownloadOptions as DownloadOptions } from './index/internal/index.js';
|
|
35
|
+
export { CookieOptions as CookieOptions } from './index/internal/index.js';
|
|
36
|
+
export { RangeOptions as RangeOptions } from './index/internal/index.js';
|
|
37
|
+
export { ByteRange as ByteRange } from './index/internal/index.js';
|
|
38
|
+
export { RangeResult as RangeResult } from './index/internal/index.js';
|
|
39
|
+
export { FileStat as FileStat } from './index/internal/index.js';
|
|
40
|
+
export { express$instance as express } from './index/internal/index.js';
|
|
41
|
+
export { Request as Request } from './index/internal/index.js';
|
|
42
|
+
export { Response as Response } from './index/internal/index.js';
|
|
43
|
+
export { Route as Route } from './index/internal/index.js';
|
|
44
|
+
export { Router as Router } from './index/internal/index.js';
|
|
45
|
+
export { RoutingHost_1 as RoutingHost } from './index/internal/index.js';
|
package/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Generated by tsbindgen - Architecture
|
|
2
|
+
// Namespace: express
|
|
3
|
+
// Module Stub - Do Not Execute
|
|
4
|
+
|
|
5
|
+
throw new Error(
|
|
6
|
+
'Cannot import CLR namespace express in JavaScript runtime. ' +
|
|
7
|
+
'This module provides TypeScript type definitions only. ' +
|
|
8
|
+
'Actual implementation requires .NET runtime via Tsonic compiler.'
|
|
9
|
+
);
|