carrick 0.3.140 → 0.3.141
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/package.json +6 -6
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/sidecar/dist/src/argument-modes.d.ts +56 -0
- package/sidecar/dist/src/argument-modes.js +448 -0
- package/sidecar/dist/src/loop-element.d.ts +58 -0
- package/sidecar/dist/src/loop-element.js +307 -0
- package/sidecar/dist/src/response-modes.d.ts +7 -2
- package/sidecar/dist/src/response-modes.js +1 -1
- package/sidecar/dist/src/type-inferrer.d.ts +43 -7
- package/sidecar/dist/src/type-inferrer.js +229 -9
- package/sidecar/dist/src/types.d.ts +8 -0
- package/sidecar/dist/src/validators.d.ts +13 -0
- package/sidecar/dist/src/validators.js +2 -0
- package/templates/skills/carrick-reuse.md +1 -1
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A route registered once per element of a constant list (carrick#1029).
|
|
3
|
+
*
|
|
4
|
+
* ```ts
|
|
5
|
+
* for (const [path, key] of [['a', 'alpha'], ['b', 'beta']] as const) {
|
|
6
|
+
* app.get(`/items/${path}`, async () => ({ items: rows()[key] }));
|
|
7
|
+
* }
|
|
8
|
+
* ```
|
|
9
|
+
*
|
|
10
|
+
* One handler serves two operations, `/items/a` and `/items/b`. Typed as
|
|
11
|
+
* written, `key` is `'alpha' | 'beta'`, so each operation's response is the
|
|
12
|
+
* union of both payloads, and a consumer of `/items/a` reads as mismatched.
|
|
13
|
+
*
|
|
14
|
+
* The scanner sends the row's own path (`route_path`) on a route row's
|
|
15
|
+
* request when its line serves more than one operation. This reads, from the
|
|
16
|
+
* syntax and the compiler's symbols only, which element of the list the path
|
|
17
|
+
* names, and returns the rewrite that makes the list that one element. The
|
|
18
|
+
* inferrer then types the same handler in the rewritten file: the compiler
|
|
19
|
+
* infers the response for that element, and no rule of ours decides it.
|
|
20
|
+
*
|
|
21
|
+
* Read only when every piece is stated:
|
|
22
|
+
*
|
|
23
|
+
* - the registration's path argument is a template whose every hole is a name
|
|
24
|
+
* one loop binds: a `for (const … of LIST)` or `LIST.forEach((…) => …)`
|
|
25
|
+
* around the registration, binding a name or an array pattern of names;
|
|
26
|
+
* - `LIST` is an array literal (through parentheses, `as const` and
|
|
27
|
+
* `satisfies`), or a `const` bound to one that nothing in its file mutates,
|
|
28
|
+
* or that is `as const`;
|
|
29
|
+
* - every element is a string, or an array of strings at the positions the
|
|
30
|
+
* holes read, with no spread;
|
|
31
|
+
* - exactly one element's path is the row's path, segment by segment from
|
|
32
|
+
* the end, a parameter matching a parameter of any name.
|
|
33
|
+
*
|
|
34
|
+
* Anything else returns `undefined`, and the request is typed as before.
|
|
35
|
+
*/
|
|
36
|
+
import { Node, SyntaxKind } from 'ts-morph';
|
|
37
|
+
import { stringLiteral } from './response-modes.js';
|
|
38
|
+
/** Methods of an array that change it in place. */
|
|
39
|
+
const MUTATORS = new Set([
|
|
40
|
+
'push',
|
|
41
|
+
'pop',
|
|
42
|
+
'shift',
|
|
43
|
+
'unshift',
|
|
44
|
+
'splice',
|
|
45
|
+
'sort',
|
|
46
|
+
'reverse',
|
|
47
|
+
'fill',
|
|
48
|
+
'copyWithin',
|
|
49
|
+
]);
|
|
50
|
+
/**
|
|
51
|
+
* The element of the list `registration` is made once for that `routePath`
|
|
52
|
+
* names, or `undefined` when the code does not state it.
|
|
53
|
+
*/
|
|
54
|
+
export function loopElementPick(registration, routePath) {
|
|
55
|
+
if (!Node.isCallExpression(registration))
|
|
56
|
+
return undefined;
|
|
57
|
+
const pathArg = registration.getArguments()[0];
|
|
58
|
+
if (!pathArg)
|
|
59
|
+
return undefined;
|
|
60
|
+
const template = unwrap(pathArg);
|
|
61
|
+
if (!Node.isTemplateExpression(template))
|
|
62
|
+
return undefined;
|
|
63
|
+
const holes = template.getTemplateSpans().map((span) => span.getExpression());
|
|
64
|
+
if (holes.length === 0 || !holes.every((hole) => Node.isIdentifier(hole)))
|
|
65
|
+
return undefined;
|
|
66
|
+
const loop = enclosingLoop(registration, holes);
|
|
67
|
+
if (!loop)
|
|
68
|
+
return undefined;
|
|
69
|
+
const positions = holes.map((hole) => {
|
|
70
|
+
const declared = hole.getSymbol()?.getDeclarations()[0];
|
|
71
|
+
const name = declared && declarationName(declared);
|
|
72
|
+
return name ? loop.bound.get(name) : undefined;
|
|
73
|
+
});
|
|
74
|
+
if (positions.some((position) => position === undefined))
|
|
75
|
+
return undefined;
|
|
76
|
+
const elements = listElements(loop.list);
|
|
77
|
+
if (!elements || elements.length < 2)
|
|
78
|
+
return undefined;
|
|
79
|
+
const values = [];
|
|
80
|
+
for (const element of elements) {
|
|
81
|
+
const read = positions.map((position) => elementValue(element, position));
|
|
82
|
+
if (read.some((value) => value === undefined))
|
|
83
|
+
return undefined;
|
|
84
|
+
values.push(read);
|
|
85
|
+
}
|
|
86
|
+
const head = template.getHead().getLiteralText();
|
|
87
|
+
const tails = template.getTemplateSpans().map((span) => span.getLiteral().getLiteralText());
|
|
88
|
+
const matching = values
|
|
89
|
+
.map((read, index) => ({
|
|
90
|
+
index,
|
|
91
|
+
path: head + read.map((value, at) => value + tails[at]).join(''),
|
|
92
|
+
}))
|
|
93
|
+
.filter(({ path }) => endsWithPath(routePath, path));
|
|
94
|
+
if (matching.length !== 1)
|
|
95
|
+
return undefined;
|
|
96
|
+
const { index } = matching[0];
|
|
97
|
+
const list = loop.list;
|
|
98
|
+
const original = list.getText();
|
|
99
|
+
const element = elements[index].getText();
|
|
100
|
+
const replacement = `([${element}] as const)`;
|
|
101
|
+
const extraLines = newlines(original) - newlines(replacement);
|
|
102
|
+
if (extraLines < 0)
|
|
103
|
+
return undefined;
|
|
104
|
+
return {
|
|
105
|
+
file: list.getSourceFile(),
|
|
106
|
+
start: list.getStart(),
|
|
107
|
+
end: list.getEnd(),
|
|
108
|
+
// Padded so every line after the list keeps its number.
|
|
109
|
+
text: `([${element}] as const${'\n'.repeat(extraLines)})`,
|
|
110
|
+
index,
|
|
111
|
+
of: elements.length,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
/** `node` through parentheses, `as` and `satisfies`. */
|
|
115
|
+
function unwrap(node) {
|
|
116
|
+
let at = node;
|
|
117
|
+
for (;;) {
|
|
118
|
+
if (Node.isParenthesizedExpression(at) ||
|
|
119
|
+
Node.isAsExpression(at) ||
|
|
120
|
+
Node.isSatisfiesExpression(at) ||
|
|
121
|
+
Node.isTypeAssertion(at)) {
|
|
122
|
+
at = at.getExpression();
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
return at;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/** The name node a declaration binds, for a name declared by a variable, a parameter or a binding element. */
|
|
130
|
+
function declarationName(declared) {
|
|
131
|
+
if (Node.isVariableDeclaration(declared) ||
|
|
132
|
+
Node.isParameterDeclaration(declared) ||
|
|
133
|
+
Node.isBindingElement(declared)) {
|
|
134
|
+
const name = declared.getNameNode();
|
|
135
|
+
return Node.isIdentifier(name) ? name : undefined;
|
|
136
|
+
}
|
|
137
|
+
return undefined;
|
|
138
|
+
}
|
|
139
|
+
/** The names a loop's element pattern binds, with the position each reads. */
|
|
140
|
+
function boundNames(pattern) {
|
|
141
|
+
if (Node.isIdentifier(pattern))
|
|
142
|
+
return new Map([[pattern, -1]]);
|
|
143
|
+
if (!Node.isArrayBindingPattern(pattern))
|
|
144
|
+
return undefined;
|
|
145
|
+
const bound = new Map();
|
|
146
|
+
pattern.getElements().forEach((element, position) => {
|
|
147
|
+
if (Node.isOmittedExpression(element))
|
|
148
|
+
return;
|
|
149
|
+
const name = element.getNameNode();
|
|
150
|
+
if (element.getDotDotDotToken() || element.getInitializer() || !Node.isIdentifier(name))
|
|
151
|
+
return;
|
|
152
|
+
bound.set(name, position);
|
|
153
|
+
});
|
|
154
|
+
return bound;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* The innermost loop around `registration` that binds every hole: a
|
|
158
|
+
* `for (const … of …)` whose body holds it, or a `.forEach` whose callback
|
|
159
|
+
* does.
|
|
160
|
+
*/
|
|
161
|
+
function enclosingLoop(registration, holes) {
|
|
162
|
+
const bindsAll = (bound) => holes.every((hole) => {
|
|
163
|
+
const declared = hole.getSymbol()?.getDeclarations()[0];
|
|
164
|
+
const name = declared && declarationName(declared);
|
|
165
|
+
return name !== undefined && bound.has(name);
|
|
166
|
+
});
|
|
167
|
+
for (const ancestor of registration.getAncestors()) {
|
|
168
|
+
if (Node.isForOfStatement(ancestor)) {
|
|
169
|
+
const init = ancestor.getInitializer();
|
|
170
|
+
if (!Node.isVariableDeclarationList(init))
|
|
171
|
+
continue;
|
|
172
|
+
if (init.getDeclarationKind() !== 'const' || init.getDeclarations().length !== 1)
|
|
173
|
+
continue;
|
|
174
|
+
const bound = boundNames(init.getDeclarations()[0].getNameNode());
|
|
175
|
+
if (bound && bindsAll(bound))
|
|
176
|
+
return { bound, list: ancestor.getExpression() };
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
if (Node.isArrowFunction(ancestor) || Node.isFunctionExpression(ancestor)) {
|
|
180
|
+
const call = ancestor.getParent();
|
|
181
|
+
if (!Node.isCallExpression(call) || call.getArguments()[0] !== ancestor)
|
|
182
|
+
continue;
|
|
183
|
+
const callee = call.getExpression();
|
|
184
|
+
if (!Node.isPropertyAccessExpression(callee) || callee.getName() !== 'forEach')
|
|
185
|
+
continue;
|
|
186
|
+
const param = ancestor.getParameters()[0];
|
|
187
|
+
if (!param || ancestor.getParameters().length > 1)
|
|
188
|
+
continue;
|
|
189
|
+
const bound = boundNames(param.getNameNode());
|
|
190
|
+
if (bound && bindsAll(bound))
|
|
191
|
+
return { bound, list: callee.getExpression() };
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
return undefined;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* The elements the list is written with: an array literal, or a `const`
|
|
198
|
+
* holding one that nothing in its file changes. `undefined` for anything
|
|
199
|
+
* else, a spread included.
|
|
200
|
+
*/
|
|
201
|
+
function listElements(list) {
|
|
202
|
+
let literal = unwrap(list);
|
|
203
|
+
if (Node.isIdentifier(literal)) {
|
|
204
|
+
const declared = literal.getSymbol()?.getDeclarations()[0];
|
|
205
|
+
if (!declared || !Node.isVariableDeclaration(declared))
|
|
206
|
+
return undefined;
|
|
207
|
+
const declarationList = declared.getParent();
|
|
208
|
+
if (!Node.isVariableDeclarationList(declarationList) || declarationList.getDeclarationKind() !== 'const') {
|
|
209
|
+
return undefined;
|
|
210
|
+
}
|
|
211
|
+
const initializer = declared.getInitializer();
|
|
212
|
+
if (!initializer)
|
|
213
|
+
return undefined;
|
|
214
|
+
const readonly = hasConstAssertion(initializer);
|
|
215
|
+
if (!readonly && mutatedInItsFile(declared))
|
|
216
|
+
return undefined;
|
|
217
|
+
if (!readonly && declared.isExported())
|
|
218
|
+
return undefined;
|
|
219
|
+
literal = unwrap(initializer);
|
|
220
|
+
}
|
|
221
|
+
if (!Node.isArrayLiteralExpression(literal))
|
|
222
|
+
return undefined;
|
|
223
|
+
const elements = literal.getElements();
|
|
224
|
+
if (elements.some((element) => Node.isSpreadElement(element) || Node.isOmittedExpression(element))) {
|
|
225
|
+
return undefined;
|
|
226
|
+
}
|
|
227
|
+
return elements.map(unwrap);
|
|
228
|
+
}
|
|
229
|
+
function hasConstAssertion(node) {
|
|
230
|
+
let at = node;
|
|
231
|
+
for (;;) {
|
|
232
|
+
if (Node.isAsExpression(at)) {
|
|
233
|
+
if (at.getTypeNode()?.getText() === 'const')
|
|
234
|
+
return true;
|
|
235
|
+
at = at.getExpression();
|
|
236
|
+
}
|
|
237
|
+
else if (Node.isParenthesizedExpression(at) || Node.isSatisfiesExpression(at)) {
|
|
238
|
+
at = at.getExpression();
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
return false;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
/** Whether a name `declared` binds is assigned, or has a mutating method called, anywhere in its file. */
|
|
246
|
+
function mutatedInItsFile(declared) {
|
|
247
|
+
const name = declared.getNameNode();
|
|
248
|
+
const symbol = name.getSymbol();
|
|
249
|
+
if (!symbol)
|
|
250
|
+
return true;
|
|
251
|
+
for (const ident of declared.getSourceFile().getDescendantsOfKind(SyntaxKind.Identifier)) {
|
|
252
|
+
if (ident.getSymbol() !== symbol || ident === name)
|
|
253
|
+
continue;
|
|
254
|
+
const parent = ident.getParent();
|
|
255
|
+
if (Node.isBinaryExpression(parent) && parent.getLeft() === ident)
|
|
256
|
+
return true;
|
|
257
|
+
if (Node.isPropertyAccessExpression(parent) && parent.getExpression() === ident) {
|
|
258
|
+
if (MUTATORS.has(parent.getName()))
|
|
259
|
+
return true;
|
|
260
|
+
// `LIST.length = 0`, `LIST.x = …`.
|
|
261
|
+
const above = parent.getParent();
|
|
262
|
+
if (Node.isBinaryExpression(above) && above.getLeft() === parent)
|
|
263
|
+
return true;
|
|
264
|
+
}
|
|
265
|
+
if (Node.isElementAccessExpression(parent) && parent.getExpression() === ident) {
|
|
266
|
+
const above = parent.getParent();
|
|
267
|
+
if (Node.isBinaryExpression(above) && above.getLeft() === parent)
|
|
268
|
+
return true;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
return false;
|
|
272
|
+
}
|
|
273
|
+
/** The string an element states at `position` (`-1`: the element itself). */
|
|
274
|
+
function elementValue(element, position) {
|
|
275
|
+
if (position === -1)
|
|
276
|
+
return stringLiteral(element);
|
|
277
|
+
if (!Node.isArrayLiteralExpression(element))
|
|
278
|
+
return undefined;
|
|
279
|
+
const items = element.getElements();
|
|
280
|
+
if (items.some((item) => Node.isSpreadElement(item)))
|
|
281
|
+
return undefined;
|
|
282
|
+
const item = items[position];
|
|
283
|
+
return item ? stringLiteral(unwrap(item)) : undefined;
|
|
284
|
+
}
|
|
285
|
+
/** A path segment that is a parameter, in either spelling. */
|
|
286
|
+
function isParam(segment) {
|
|
287
|
+
return segment.startsWith(':') || /^\{[^{}]*\}$/.test(segment);
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Whether `full` ends with `own`, segment by segment: the row's path holds
|
|
291
|
+
* the route's own path after whatever prefix its mounts add.
|
|
292
|
+
*/
|
|
293
|
+
export function endsWithPath(full, own) {
|
|
294
|
+
const segments = (text) => text.split('/').filter((segment) => segment.length > 0);
|
|
295
|
+
const whole = segments(full);
|
|
296
|
+
const tail = segments(own);
|
|
297
|
+
if (tail.length === 0 || tail.length > whole.length)
|
|
298
|
+
return false;
|
|
299
|
+
const offset = whole.length - tail.length;
|
|
300
|
+
return tail.every((segment, at) => {
|
|
301
|
+
const other = whole[offset + at];
|
|
302
|
+
return isParam(segment) && isParam(other) ? true : segment === other;
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
function newlines(text) {
|
|
306
|
+
return text.split('\n').length - 1;
|
|
307
|
+
}
|
|
@@ -35,7 +35,7 @@ import { Node, type Symbol as TsSymbol } from 'ts-morph';
|
|
|
35
35
|
* are read so far; another protocol (a socket message, a pub/sub payload)
|
|
36
36
|
* adds its own source here.
|
|
37
37
|
*/
|
|
38
|
-
export type MessageSource = 'query' | 'body' | 'unplaced';
|
|
38
|
+
export type MessageSource = 'query' | 'body' | 'argument' | 'unplaced';
|
|
39
39
|
/** One incoming-message field a response union depends on. */
|
|
40
40
|
export interface ResponseModeRead {
|
|
41
41
|
/**
|
|
@@ -43,7 +43,10 @@ export interface ResponseModeRead {
|
|
|
43
43
|
* `body`: a top-level property of the awaited result of a zero-argument
|
|
44
44
|
* `json()` the default lib or an installed library declares. `unplaced`:
|
|
45
45
|
* anything else (a header, a path parameter, the method, a framework's own
|
|
46
|
-
* accessor, a `json()` the repo declares).
|
|
46
|
+
* accessor, a `json()` the repo declares). `argument`: not the message,
|
|
47
|
+
* what the route passes (an argument, or a member of one) to a function
|
|
48
|
+
* other callers also call, which picks that function's body (carrick#2372,
|
|
49
|
+
* `argument-modes.ts`).
|
|
47
50
|
*/
|
|
48
51
|
location: MessageSource;
|
|
49
52
|
field: string;
|
|
@@ -75,3 +78,5 @@ export interface JoinedBody {
|
|
|
75
78
|
* symbol is declared by a TypeScript lib or an installed library.
|
|
76
79
|
*/
|
|
77
80
|
export declare function readResponseModes(bodies: JoinedBody[], join: (texts: string[]) => string, isLibOrExternal: (symbol: TsSymbol | undefined) => boolean): ResponseModes | undefined;
|
|
81
|
+
/** The text of a string literal, `undefined` for anything else. */
|
|
82
|
+
export declare function stringLiteral(node: Node | undefined): string | undefined;
|
|
@@ -261,7 +261,7 @@ function readCondition(condition, isLibOrExternal) {
|
|
|
261
261
|
return inside.length > 0 ? { kind: 'unread', reads: inside } : undefined;
|
|
262
262
|
}
|
|
263
263
|
/** The text of a string literal, `undefined` for anything else. */
|
|
264
|
-
function stringLiteral(node) {
|
|
264
|
+
export function stringLiteral(node) {
|
|
265
265
|
if (!node)
|
|
266
266
|
return undefined;
|
|
267
267
|
let inner = node;
|
|
@@ -108,13 +108,6 @@ export type InferRequestDone = () => void;
|
|
|
108
108
|
* every request is done, so this is what keeps a long one from going silent.
|
|
109
109
|
*/
|
|
110
110
|
export type UnwidenedStepDone = () => void;
|
|
111
|
-
/**
|
|
112
|
-
* TypeInferrer - Extracts types from source code, both explicit and inferred
|
|
113
|
-
*
|
|
114
|
-
* Usage:
|
|
115
|
-
* const inferrer = new TypeInferrer({ project });
|
|
116
|
-
* const result = inferrer.infer(requests, extractionConfig);
|
|
117
|
-
*/
|
|
118
111
|
export declare class TypeInferrer {
|
|
119
112
|
private readonly project;
|
|
120
113
|
private readonly packageOf;
|
|
@@ -187,6 +180,23 @@ export declare class TypeInferrer {
|
|
|
187
180
|
* carrick#1836: list on `result` the declarations behind the names its text
|
|
188
181
|
* prints that the request's file cannot resolve (`PrintedTypes.namesIn`).
|
|
189
182
|
*/
|
|
183
|
+
/** `inferSingle`, with what the names it prints meant (carrick#1836). */
|
|
184
|
+
private inferRecordingNames;
|
|
185
|
+
/**
|
|
186
|
+
* carrick#1029: the loop element a route row's path names, when its
|
|
187
|
+
* registration is made once per element of a constant list
|
|
188
|
+
* (`loop-element.ts`). Only a route row that states its path is read.
|
|
189
|
+
*/
|
|
190
|
+
private loopPickFor;
|
|
191
|
+
/**
|
|
192
|
+
* The request inferred with the loop's list rewritten to the one element
|
|
193
|
+
* `pick` names, so the compiler types the handler for that element. The
|
|
194
|
+
* file is restored before returning, and the names the reading prints are
|
|
195
|
+
* recorded while the rewritten program is still the project's. Lines do not
|
|
196
|
+
* move (the rewrite is padded); a span after the list moves by the length
|
|
197
|
+
* the rewrite changed.
|
|
198
|
+
*/
|
|
199
|
+
private inferForLoopElement;
|
|
190
200
|
private recordPrintedNames;
|
|
191
201
|
/**
|
|
192
202
|
* carrick#1516: read each response inference again with the literals on its
|
|
@@ -453,6 +463,32 @@ export declare class TypeInferrer {
|
|
|
453
463
|
* or the redirect location back in.
|
|
454
464
|
*/
|
|
455
465
|
private inferFromResponseSites;
|
|
466
|
+
/**
|
|
467
|
+
* carrick#2372: what `func` returns when it returns one call into a
|
|
468
|
+
* function of the program: see `callNarrowedByArguments`.
|
|
469
|
+
*/
|
|
470
|
+
private returnNarrowedByArguments;
|
|
471
|
+
/**
|
|
472
|
+
* carrick#2372: the one member of `awaited` (the awaited result type of
|
|
473
|
+
* `call`) the called function's returns can give for the arguments `call`
|
|
474
|
+
* passes, and the parameters the callee tests that those arguments state.
|
|
475
|
+
* `undefined` when `call` runs no function of the program (or runs
|
|
476
|
+
* `caller` itself), or its result is not a union.
|
|
477
|
+
*
|
|
478
|
+
* Each kept return is matched to the union members it is assignable to; a
|
|
479
|
+
* return that matches none (another union, a call) keeps every member, as
|
|
480
|
+
* does a narrowing that leaves more than one member.
|
|
481
|
+
*/
|
|
482
|
+
private callNarrowedByArguments;
|
|
483
|
+
/**
|
|
484
|
+
* carrick#2372: a union read from an executor whose bodies depend on
|
|
485
|
+
* arguments the route passes, where those arguments could not tell the
|
|
486
|
+
* bodies apart. Each such parameter is listed as an `argument` read, so a
|
|
487
|
+
* mismatch against the union is not reported as this route's: no call can
|
|
488
|
+
* say which body the route sends.
|
|
489
|
+
*/
|
|
490
|
+
private withArgumentReads;
|
|
491
|
+
private addArgumentReads;
|
|
456
492
|
/**
|
|
457
493
|
* The response sends `func` makes as statements (`res.status(409).json(e);`),
|
|
458
494
|
* for a handler that sends through a parameter and returns nothing. Only the
|