Skip to content

Commit 359031a

Browse files
committedJun 26, 2025
feat: Always include options argument
·
v1.46.0v1.38.0
1 parent c26f6a2 commit 359031a

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed
 

‎codegen/layouts/partials/route-class-endpoint-export.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ export type {{responseTypeName}} = SetNonNullable<
44
Required<RouteResponse<'{{path}}'>>
55
>
66

7-
export type {{optionsTypeName}} = {{#if returnsActionAttempt}}Pick<SeamHttpRequestOptions, 'waitForActionAttempt'>{{else}}never{{/if}}
7+
export type {{optionsTypeName}} = {{#if returnsActionAttempt}}Pick<SeamHttpRequestOptions, 'waitForActionAttempt'>{{else}}Record<string, never>{{/if}}

‎codegen/layouts/partials/route-class-endpoint.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{methodName}}(
22
{{methodParamName}}{{#if isOptionalParamsOk}}?{{/if}}: {{requestTypeName}},
3-
{{#if hasOptions}}options: {{optionsTypeName}} = {},{{/if}}
3+
options: {{optionsTypeName}} = {},
44
): SeamHttpRequest<{{#if returnsVoid}}void, undefined{{else}}{{responseTypeName}}, '{{responseKey}}'{{/if}}>
55
{
66
{{#if isUndocumented}}
@@ -13,6 +13,6 @@
1313
method: '{{method}}',
1414
{{requestFormat}}: {{methodParamName}},
1515
responseKey: {{#if returnsVoid}}undefined{{else}}'{{responseKey}}'{{/if}},
16-
{{#if hasOptions}}options,{{/if}}
16+
options,
1717
})
1818
}

‎codegen/lib/layouts/route.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ export interface EndpointLayoutContext {
2020
functionName: string
2121
className: string
2222
method: Method
23-
hasOptions: boolean
2423
responseKey: string
2524
methodParamName: 'params' | 'body'
2625
requestFormat: 'params' | 'body'
@@ -104,7 +103,6 @@ export const getEndpointLayoutContext = (
104103
methodName,
105104
functionName: camelCase(prefix),
106105
method: endpoint.request.preferredMethod,
107-
hasOptions: returnsActionAttempt,
108106
className: getClassName(route.path),
109107
methodParamName,
110108
requestFormat,

0 commit comments

Comments
 (0)
Please sign in to comment.