@solidjs/web 2.0.0-rc.0 → 2.0.0-rc.10
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/README.md +1 -1
- package/dist/server.dev.js +4472 -0
- package/dist/server.js +1363 -224
- package/dist/{server.cjs → server.observe.js} +1563 -424
- package/dist/{dev.cjs → web.dev.js} +708 -365
- package/dist/web.js +460 -144
- package/dist/{dev.js → web.observe.js} +511 -213
- package/frames/dist/client.dev.js +464 -72
- package/frames/dist/client.js +364 -71
- package/frames/dist/{client.dev.cjs → client.observe.js} +487 -134
- package/frames/dist/server.dev.js +1713 -0
- package/frames/dist/server.js +553 -2495
- package/frames/dist/server.observe.js +1713 -0
- package/frames/package.json +2 -25
- package/package.json +214 -254
- package/performance-tracks/dist/performance-tracks.dev.js +678 -0
- package/performance-tracks/dist/performance-tracks.js +6 -0
- package/performance-tracks/dist/performance-tracks.observe.js +666 -0
- package/performance-tracks/package.json +7 -0
- package/performance-tracks/types/index.d.ts +67 -0
- package/serialization/decode/package.json +2 -15
- package/serialization/dist/decode.js +101 -12
- package/serialization/dist/serialization.js +112 -20
- package/serialization/package.json +2 -15
- package/serialization/types/index.d.ts +76 -157
- package/serialization/types/serializer-decode.d.ts +149 -112
- package/serialization/types/serializer.d.ts +101 -0
- package/server-functions/dist/client.dev.js +1364 -0
- package/server-functions/dist/client.js +745 -85
- package/server-functions/dist/client.observe.js +1343 -0
- package/server-functions/dist/server.dev.js +2203 -175
- package/server-functions/dist/server.js +2111 -176
- package/server-functions/dist/server.observe.js +3043 -0
- package/server-functions/package.json +2 -35
- package/server-functions/rich-args/package.json +2 -15
- package/storage/package.json +2 -15
- package/types/client.d.ts +193 -288
- package/types/constants.d.ts +20 -0
- package/types/cookies.d.ts +32 -84
- package/types/diagnostics.d.ts +56 -0
- package/types/frames/client.d.ts +1 -1
- package/types/frames/frame-client.d.ts +323 -259
- package/types/frames/frame-container-plugin.d.ts +72 -0
- package/types/frames/frame-sink.d.ts +101 -158
- package/types/frames/frame-transport.d.ts +192 -190
- package/types/frames/serializer-decode.d.ts +219 -0
- package/types/frames/serializer.d.ts +76 -157
- package/types/frames/server.d.ts +1 -1
- package/types/head.d.ts +19 -0
- package/types/index.d.ts +62 -76
- package/types/index.server.d.ts +174 -0
- package/types/jsx.d.ts +33 -26
- package/types/observe.d.ts +358 -0
- package/types/reconcile.d.ts +1 -0
- package/types/render.d.ts +9 -0
- package/types/response.d.ts +75 -150
- package/types/serializer-decode.d.ts +149 -112
- package/types/serializer.d.ts +76 -157
- package/types/server-functions/client.d.ts +202 -174
- package/types/server-functions/flash.d.ts +28 -30
- package/types/server-functions/registry.d.ts +102 -0
- package/types/server-functions/rich-args.d.ts +1 -10
- package/types/server-functions/server.d.ts +518 -454
- package/types/server-functions/shared.d.ts +366 -425
- package/types/server-mock.d.ts +110 -13
- package/types/server-observe.d.ts +77 -0
- package/types/server.d.ts +425 -425
- package/types/trace.d.ts +127 -0
- package/LICENSE +0 -21
- package/dist/web.cjs +0 -2007
- package/frames/dist/client.cjs +0 -1916
- package/frames/dist/server.cjs +0 -3667
- package/serialization/dist/decode.cjs +0 -110
- package/serialization/dist/serialization.cjs +0 -232
- package/serialization/types-cjs/index.d.cts +0 -182
- package/serialization/types-cjs/package.json +0 -3
- package/serialization/types-cjs/serializer-decode.d.cts +0 -182
- package/server-functions/dist/client.cjs +0 -646
- package/server-functions/dist/rich-args.cjs +0 -11
- package/server-functions/dist/server.cjs +0 -1077
- package/server-functions/dist/server.dev.cjs +0 -1077
- package/storage/dist/storage.cjs +0 -12
- package/storage/types-cjs/index.d.cts +0 -28
- package/storage/types-cjs/package.json +0 -3
- package/types/core.d.ts +0 -6
- package/types-cjs/client.d.cts +0 -337
- package/types-cjs/cookies.d.cts +0 -93
- package/types-cjs/core.d.cts +0 -6
- package/types-cjs/frames/client.d.cts +0 -36
- package/types-cjs/frames/frame-client.d.cts +0 -338
- package/types-cjs/frames/frame-sink.d.cts +0 -194
- package/types-cjs/frames/frame-transport.d.cts +0 -222
- package/types-cjs/frames/serializer.d.cts +0 -182
- package/types-cjs/frames/server.d.cts +0 -52
- package/types-cjs/index.d.cts +0 -230
- package/types-cjs/jsx-properties.d.cts +0 -93
- package/types-cjs/jsx.d.cts +0 -4150
- package/types-cjs/package.json +0 -3
- package/types-cjs/response.d.cts +0 -174
- package/types-cjs/serializer-decode.d.cts +0 -182
- package/types-cjs/serializer.d.cts +0 -182
- package/types-cjs/server-functions/client.d.cts +0 -201
- package/types-cjs/server-functions/flash.d.cts +0 -38
- package/types-cjs/server-functions/rich-args.d.cts +0 -10
- package/types-cjs/server-functions/server.d.cts +0 -588
- package/types-cjs/server-functions/shared.d.cts +0 -523
- package/types-cjs/server-mock.d.cts +0 -277
- package/types-cjs/server.d.cts +0 -523
package/types/server-mock.d.ts
CHANGED
|
@@ -1,10 +1,77 @@
|
|
|
1
1
|
import type { RequestEvent, RequestEventLocals, ResponseStub } from "./client.js";
|
|
2
|
-
|
|
2
|
+
import type { JSX } from "./jsx.js";
|
|
3
|
+
import type { ServerErrorSite } from "solid-js";
|
|
4
|
+
/**
|
|
5
|
+
* Where a server-side failure was met, as the server error hook hears it —
|
|
6
|
+
* the client's view of the server entry's type (see `configureServerErrors`
|
|
7
|
+
* there). `kind: "render"`: `fallback`/`client`/`failed`; `kind:
|
|
8
|
+
* "server-function"`: `thrown`/`channel`.
|
|
9
|
+
*/
|
|
10
|
+
export interface ServerErrorContext extends Omit<ServerErrorSite, "event"> {
|
|
11
|
+
event?: RequestEvent;
|
|
12
|
+
}
|
|
13
|
+
/** The server error hook (see the server entry's `configureServerErrors`). Its return is the wire value; nothing for the default. */
|
|
14
|
+
export type ServerErrorHook = (error: unknown, context: ServerErrorContext) => unknown | void;
|
|
15
|
+
export interface ServerErrorsConfig {
|
|
16
|
+
onError?: ServerErrorHook;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Registers the ambient server error hook. Server-only; on the client this
|
|
20
|
+
* is a no-op so isomorphic setup code can call it unguarded.
|
|
21
|
+
*/
|
|
22
|
+
export declare function configureServerErrors(_config: ServerErrorsConfig): void;
|
|
23
|
+
type PreloadLinkAttributes = {
|
|
24
|
+
type?: string;
|
|
25
|
+
crossorigin?: JSX.HTMLCrossorigin;
|
|
26
|
+
integrity?: string;
|
|
27
|
+
referrerpolicy?: JSX.HTMLReferrerPolicy;
|
|
28
|
+
fetchpriority?: JSX.HTMLFetchPriority;
|
|
29
|
+
media?: string;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* An explicit `<link rel="preload">` emitted by the SSR asset pipeline.
|
|
33
|
+
*
|
|
34
|
+
* `as` is the HTML Standard's set of preload destinations exactly — anything
|
|
35
|
+
* else translates to null and the browser does nothing with the link.
|
|
36
|
+
*
|
|
37
|
+
* `imagesrcset` candidates must already be resolved by the integration: they
|
|
38
|
+
* are carried verbatim (a relative candidate resolves against the DOCUMENT
|
|
39
|
+
* URL, not the manifest base). Pair it with `imagesizes` whenever a candidate
|
|
40
|
+
* uses a width descriptor, which the spec requires — without it the source
|
|
41
|
+
* size falls back to `100vw` and the preload can miss the image the `<img>`
|
|
42
|
+
* selects. Omitting `href` is the spec's own recommendation for the source-set
|
|
43
|
+
* form: it would only serve browsers without `imagesrcset` support, and there
|
|
44
|
+
* it would likely preload the wrong candidate.
|
|
45
|
+
*/
|
|
46
|
+
export type PreloadLink = PreloadLinkAttributes & ({
|
|
47
|
+
href: string;
|
|
48
|
+
as: Exclude<JSX.HTMLPreloadAs, "image">;
|
|
49
|
+
imagesrcset?: never;
|
|
50
|
+
imagesizes?: never;
|
|
51
|
+
} | {
|
|
52
|
+
href: string;
|
|
53
|
+
as: "image";
|
|
54
|
+
imagesrcset?: string;
|
|
55
|
+
imagesizes?: string;
|
|
56
|
+
} | {
|
|
57
|
+
href?: never;
|
|
58
|
+
as: "image";
|
|
59
|
+
imagesrcset: string;
|
|
60
|
+
imagesizes?: string;
|
|
61
|
+
});
|
|
62
|
+
/**
|
|
63
|
+
* Static asset graph consumed by the SSR pipeline. This is Solid's own
|
|
64
|
+
* contract — a parsed Vite client manifest satisfies it structurally
|
|
65
|
+
* (unknown fields pass through untyped), but any bundler integration can
|
|
66
|
+
* produce it. Only these fields are ever read: `preloads` is Solid's
|
|
67
|
+
* extension slot for explicit typed links the integration selects.
|
|
68
|
+
*/
|
|
3
69
|
export type AssetManifest = Record<string, {
|
|
4
70
|
file: string;
|
|
5
71
|
css?: string[];
|
|
6
72
|
isEntry?: boolean;
|
|
7
73
|
imports?: string[];
|
|
74
|
+
preloads?: PreloadLink[];
|
|
8
75
|
}> & {
|
|
9
76
|
_base?: string;
|
|
10
77
|
};
|
|
@@ -17,6 +84,7 @@ export type InlineStyleAsset = {
|
|
|
17
84
|
export type ResolvedAssets = {
|
|
18
85
|
js: string[];
|
|
19
86
|
css: (string | InlineStyleAsset)[];
|
|
87
|
+
preloads?: PreloadLink[];
|
|
20
88
|
};
|
|
21
89
|
/**
|
|
22
90
|
* Resolver form of the manifest option — the primitive a dev server
|
|
@@ -24,8 +92,9 @@ export type ResolvedAssets = {
|
|
|
24
92
|
* normalized into a sync resolver internally). `resolve` may return a
|
|
25
93
|
* promise (async resolvers require streaming rendering); CSS entries may be
|
|
26
94
|
* URL strings (emitted as load-gated `<link>` tags) or inline-style
|
|
27
|
-
* descriptors (emitted as `<style>` tags)
|
|
28
|
-
*
|
|
95
|
+
* descriptors (emitted as `<style>` tags), and `preloads` carries explicit
|
|
96
|
+
* preload links selected by the integration. A bare `resolve`-shaped
|
|
97
|
+
* function is accepted as shorthand for `{ resolve }`.
|
|
29
98
|
*/
|
|
30
99
|
export type AssetResolver = {
|
|
31
100
|
resolve(key: string): ResolvedAssets | null | undefined | Promise<ResolvedAssets | null | undefined>;
|
|
@@ -39,6 +108,15 @@ export type AssetResolver = {
|
|
|
39
108
|
};
|
|
40
109
|
/** Bare-function shorthand for `AssetResolver` (no sync fast path). */
|
|
41
110
|
export type AssetResolverFn = (key: string) => ResolvedAssets | null | undefined | Promise<ResolvedAssets | null | undefined>;
|
|
111
|
+
/**
|
|
112
|
+
* CSP nonce for the tags a server render emits. A string applies to both
|
|
113
|
+
* nonce-aware destinations; a `{ script, style }` pair routes each tag to
|
|
114
|
+
* its destination's nonce, with `false` leaving that destination un-nonced.
|
|
115
|
+
*/
|
|
116
|
+
export type CSPNonce = string | {
|
|
117
|
+
script: string | false;
|
|
118
|
+
style: string | false;
|
|
119
|
+
};
|
|
42
120
|
/**
|
|
43
121
|
* Renders a component tree synchronously to an HTML string. Async reads inside
|
|
44
122
|
* `<Loading>` boundaries emit their `fallback` content; for full-graph
|
|
@@ -55,12 +133,13 @@ export type AssetResolverFn = (key: string) => ResolvedAssets | null | undefined
|
|
|
55
133
|
* ```
|
|
56
134
|
*/
|
|
57
135
|
export declare function renderToString<T>(fn: () => T, options?: {
|
|
58
|
-
nonce?:
|
|
136
|
+
nonce?: CSPNonce;
|
|
59
137
|
renderId?: string;
|
|
60
138
|
noScripts?: boolean;
|
|
61
139
|
plugins?: any[];
|
|
62
140
|
manifest?: AssetManifest | AssetResolver | AssetResolverFn;
|
|
63
|
-
|
|
141
|
+
/** This render's server error hook, ahead of `configureServerErrors`' (see the server entry). */
|
|
142
|
+
onError?: ServerErrorHook;
|
|
64
143
|
/**
|
|
65
144
|
* Embedded-render contract for hosts that own the document. When the
|
|
66
145
|
* render output contains no `</head>`, everything head-bound (resolved
|
|
@@ -100,7 +179,7 @@ export declare function renderToString<T>(fn: () => T, options?: {
|
|
|
100
179
|
* ```
|
|
101
180
|
*/
|
|
102
181
|
export declare function renderToStream<T>(fn: () => T, options?: {
|
|
103
|
-
nonce?:
|
|
182
|
+
nonce?: CSPNonce;
|
|
104
183
|
renderId?: string;
|
|
105
184
|
noScripts?: boolean;
|
|
106
185
|
plugins?: any[];
|
|
@@ -111,7 +190,8 @@ export declare function renderToStream<T>(fn: () => T, options?: {
|
|
|
111
190
|
onCompleteAll?: (info: {
|
|
112
191
|
write: (v: string) => void;
|
|
113
192
|
}) => void;
|
|
114
|
-
|
|
193
|
+
/** This render's server error hook, ahead of `configureServerErrors`' (see the server entry). */
|
|
194
|
+
onError?: ServerErrorHook;
|
|
115
195
|
/**
|
|
116
196
|
* Embedded-render contract for hosts that own the document. When the
|
|
117
197
|
* shell contains no `</head>`, everything head-bound at first flush
|
|
@@ -123,6 +203,14 @@ export declare function renderToStream<T>(fn: () => T, options?: {
|
|
|
123
203
|
* the shell has a `</head>` (splicing is automatic then).
|
|
124
204
|
*/
|
|
125
205
|
onHead?: (head: string) => void;
|
|
206
|
+
/**
|
|
207
|
+
* The request's lifecycle. Aborting tears the render down exactly as a
|
|
208
|
+
* client disconnect does (`SSR_STREAM_ABANDONED`, `data.reason:
|
|
209
|
+
* "signal"`); the one teardown handle for a host whose transport cannot
|
|
210
|
+
* report a dead consumer through the sink or the readable view — pass
|
|
211
|
+
* `request.signal`.
|
|
212
|
+
*/
|
|
213
|
+
signal?: AbortSignal;
|
|
126
214
|
}): {
|
|
127
215
|
/**
|
|
128
216
|
* Awaiting the stream resolves with the complete HTML once every boundary
|
|
@@ -171,8 +259,9 @@ export declare function getExpectedRedirectStatus(response: ResponseStub): numbe
|
|
|
171
259
|
* shell flush, a pre-flush `Location` becomes a real redirect
|
|
172
260
|
* (`getExpectedRedirectStatus`), and a post-flush one appends the
|
|
173
261
|
* nonce-aware `<script>window.location=...</script>` fallback. String
|
|
174
|
-
* results return a `Response` synchronously
|
|
175
|
-
*
|
|
262
|
+
* results return a `Response` synchronously (an awaited `renderToStream`
|
|
263
|
+
* result arrives already committed — its head froze at completion); stream
|
|
264
|
+
* results resolve at shell flush. Server-only.
|
|
176
265
|
*/
|
|
177
266
|
export declare function createSSRResponse(result: string, event: RequestEvent | undefined, options?: {
|
|
178
267
|
responseInit?: ResponseInit;
|
|
@@ -208,7 +297,7 @@ export declare function commitEventResponse(response: Response, event?: RequestE
|
|
|
208
297
|
*/
|
|
209
298
|
export declare function composeMiddleware(middlewares: FetchMiddleware[]): (request: Request, next: (request?: Request) => Response | Promise<Response>) => Promise<Response>;
|
|
210
299
|
/**
|
|
211
|
-
* Compiler primitive — emitted by JSX
|
|
300
|
+
* Compiler primitive — emitted by Solid's JSX compiler for tagged-template
|
|
212
301
|
* SSR output. Not meant for hand-written code.
|
|
213
302
|
* @internal
|
|
214
303
|
*/
|
|
@@ -216,13 +305,20 @@ export declare function ssr(template: string[] | string, ...nodes: any[]): {
|
|
|
216
305
|
t: string;
|
|
217
306
|
};
|
|
218
307
|
/**
|
|
219
|
-
* Compiler primitive — emitted by JSX
|
|
308
|
+
* Compiler primitive — emitted by Solid's JSX compiler for SSR element
|
|
220
309
|
* output. Not meant for hand-written code.
|
|
221
310
|
* @internal
|
|
222
311
|
*/
|
|
223
|
-
export declare function ssrElement(name: string, props: any, children: any, needsId: boolean): {
|
|
312
|
+
export declare function ssrElement(name: string, props: any | any[] | (() => any | any[]), children: any, needsId: boolean, skip?: (key: string) => boolean, attrs?: string | (() => string)): {
|
|
224
313
|
t: string;
|
|
225
314
|
};
|
|
315
|
+
/**
|
|
316
|
+
* Compiler primitive — serializes one attribute of a spread element as
|
|
317
|
+
* `ssrElement` would, for a dynamic attribute after the element's last
|
|
318
|
+
* spread. Not meant for hand-written code.
|
|
319
|
+
* @internal
|
|
320
|
+
*/
|
|
321
|
+
export declare function ssrElementAttribute(key: string, value: any): string;
|
|
226
322
|
/**
|
|
227
323
|
* Compiler primitive — serializes a class value (string, object map, or
|
|
228
324
|
* array) for SSR output. Not meant for hand-written code.
|
|
@@ -268,10 +364,11 @@ export declare function ssrHydrationKey(): string;
|
|
|
268
364
|
* Not meant for hand-written code.
|
|
269
365
|
* @internal
|
|
270
366
|
*/
|
|
271
|
-
export declare function resolveSSRNode(node: any, result?: any, top?: boolean): any;
|
|
367
|
+
export declare function resolveSSRNode(node: any, result?: any, top?: boolean, nested?: boolean): any;
|
|
272
368
|
/**
|
|
273
369
|
* Escapes a string for safe inclusion in HTML output. Used by the SSR
|
|
274
370
|
* runtime; not generally part of user code.
|
|
275
371
|
* @internal
|
|
276
372
|
*/
|
|
277
373
|
export declare function escape(s: any, attr?: boolean): any;
|
|
374
|
+
export {};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { type FrameProducedEvent, type RenderEvent } from "./observe.js";
|
|
2
|
+
import { type TraceRecord } from "./trace.js";
|
|
3
|
+
import type { RequestEvent } from "./server.js";
|
|
4
|
+
/**
|
|
5
|
+
* The one gate for a server record and the `Server-Timing` metric projected
|
|
6
|
+
* from it (`TimedWork` in trace.ts): whether the runtime builds the record
|
|
7
|
+
* of `type` — `"invocation"` (→ `solid-invocation`), `"render"` (→
|
|
8
|
+
* `solid-shell`), `"boundary"` (→ `solid-boundary`, gated in the reactive
|
|
9
|
+
* library's boundary with this same rule). Dev builds always: dev is the
|
|
10
|
+
* panel's home, and the boundary already measures for its dev checks.
|
|
11
|
+
* Observe builds while a listener is on the type (`observed`), so an app
|
|
12
|
+
* with no observer sees no wire change; the record is then delivered AND
|
|
13
|
+
* the metric written from it — one clock, one object. `false` in prod,
|
|
14
|
+
* where `records()` is `undefined`.
|
|
15
|
+
*/
|
|
16
|
+
export declare function timesServerWork(type: "invocation" | "render" | "boundary"): boolean;
|
|
17
|
+
/** What the renderer holds while a render is being recorded. */
|
|
18
|
+
export interface RenderObservation {
|
|
19
|
+
/**
|
|
20
|
+
* The shell is complete — for a stream, handed to the sink; for a string,
|
|
21
|
+
* the document assembled: stamps `shellMs`, the `solid-shell` metric's
|
|
22
|
+
* duration. Once; a later call is ignored.
|
|
23
|
+
*/
|
|
24
|
+
shell(): void;
|
|
25
|
+
/** A `<Loading>` boundary the shell waited on settled: counts it (`boundaries`). */
|
|
26
|
+
boundary(): void;
|
|
27
|
+
/** The render ended; delivers the record. Once. */
|
|
28
|
+
settle(outcome: RenderEvent["outcome"]): void;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Opens the `"render"` record for a render of `mode` — on the request's
|
|
32
|
+
* trace record, where the head commit reads it (`TraceRecord.render`) —
|
|
33
|
+
* when `timesServerWork("render")`; `undefined` otherwise, and the renderer
|
|
34
|
+
* then does nothing extra, not even read the clock. The record is built as
|
|
35
|
+
* the render proceeds and delivered at `settle`, to a listener if there is
|
|
36
|
+
* one; `event` is the request the render serves, the record's live half.
|
|
37
|
+
*/
|
|
38
|
+
export declare function observeRender(trace: TraceRecord, mode: RenderEvent["mode"], event: RequestEvent | undefined): RenderObservation | undefined;
|
|
39
|
+
/** What the runtime passes an observation from either dispatch leg. */
|
|
40
|
+
export interface InvocationContext {
|
|
41
|
+
id: string;
|
|
42
|
+
direct: boolean;
|
|
43
|
+
event: RequestEvent;
|
|
44
|
+
request?: Request;
|
|
45
|
+
args: unknown[];
|
|
46
|
+
}
|
|
47
|
+
/** What the frame producer hands an observation: the stream's identity. */
|
|
48
|
+
export interface FrameObservation {
|
|
49
|
+
/** Counts the chunk — call for every chunk written after `start`. */
|
|
50
|
+
chunk(chunk: {
|
|
51
|
+
type: string;
|
|
52
|
+
id: string;
|
|
53
|
+
}): void;
|
|
54
|
+
/** Delivers the record. `error` is the value thrown on the synchronous failure path. */
|
|
55
|
+
settle(outcome: FrameProducedEvent["outcome"], error?: unknown): void;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Opens the observation of one frame stream, at its `start`; the producer
|
|
59
|
+
* feeds it every chunk and settles it at `complete`. `undefined` with no
|
|
60
|
+
* listener or outside observe builds — the producer then does nothing
|
|
61
|
+
* extra, not even read the clock.
|
|
62
|
+
*/
|
|
63
|
+
export declare function observeFrame(frame: {
|
|
64
|
+
id: string;
|
|
65
|
+
version: number;
|
|
66
|
+
}): FrameObservation | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Runs `execute` — the wrapped server-function execution — and reports it
|
|
69
|
+
* as an `"invocation"` record once it settles: synchronously for a sync
|
|
70
|
+
* return or throw, at resolution/rejection for a promise. Returns
|
|
71
|
+
* `execute`'s value (a promise is re-wrapped, still a native Promise);
|
|
72
|
+
* throws what it throws. Timed while `timesServerWork("invocation")` — the
|
|
73
|
+
* duration also rides the response's `Server-Timing` — and, with no
|
|
74
|
+
* listener in an observe build or outside observe builds altogether, it is
|
|
75
|
+
* `execute()` and nothing else.
|
|
76
|
+
*/
|
|
77
|
+
export declare function observeInvocation<T>(context: InvocationContext, execute: () => T): T;
|