Skip to content

Commit ed5dd27

Browse files
committed
Remove comments
1 parent 5377b44 commit ed5dd27

2 files changed

Lines changed: 0 additions & 13 deletions

File tree

src/lib/seam-http-request.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@ interface SeamHttpRequestConfig<TResponseKey> {
2323
readonly responseKey: TResponseKey
2424
readonly options?: Pick<SeamHttpRequestOptions, 'waitForActionAttempt'>
2525
readonly actionAttempts?: ActionAttemptsClient
26-
/**
27-
* The parameters as given to the endpoint method, validated when the request
28-
* is made. Held separately from `body` and `params` so that `undefined` and
29-
* `null` stay distinguishable from an endpoint that takes no parameters.
30-
*/
3126
readonly parameters?: unknown
3227
readonly hasRequiredParameters?: boolean
3328
readonly requiredParameterNames?: readonly string[]
@@ -131,11 +126,6 @@ export class SeamHttpRequest<
131126
}
132127

133128
async fetchResponse(): Promise<TResponse> {
134-
// Validated here, not when the endpoint method builds this request:
135-
// requests are values, and callers may build one well before deciding to
136-
// send it. Reporting a bad parameter at build time surprises anyone who
137-
// constructs a request up front, e.g. to derive a cache key from it, and
138-
// then only sends it once the data it needs is available.
139129
assertValidRequestParameters(
140130
this.#config.parameters,
141131
this.pathname,

test/seam/connect/request-parameters.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,6 @@ test('endpoint accepts required parameters', (t) => {
106106
})
107107

108108
test('endpoint defers parameter validation until the request is made', (t) => {
109-
// A request is a value: callers may build one before deciding to send it, or
110-
// to derive a cache key from it, so building must not throw on parameters
111-
// that are not ready yet.
112109
t.notThrows(() => {
113110
// @ts-expect-error Verify an invalid request still builds.
114111
seam.devices.get({ device_id: undefined })

0 commit comments

Comments
 (0)