zitejs 0.9.7 → 0.9.8
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/dist/cjs/sync/lib.js +2 -2
- package/dist/esm/sync/lib.js +2 -2
- package/package.json +1 -1
package/dist/cjs/sync/lib.js
CHANGED
|
@@ -151,8 +151,8 @@ function generateApiTs(endpointFiles, flowId) {
|
|
|
151
151
|
// Inferred input/output types per endpoint (e.g. GetDashboardInputType, GetDashboardOutputType)
|
|
152
152
|
for (const name of endpointNames) {
|
|
153
153
|
const pascal = toPascalCase(name);
|
|
154
|
-
lines.push(`export type ${pascal}InputType = typeof ${name}Endpoint
|
|
155
|
-
lines.push(`export type ${pascal}OutputType = typeof ${name}Endpoint
|
|
154
|
+
lines.push(`export type ${pascal}InputType = Parameters<typeof ${name}Endpoint.execute>[0]['input'];`);
|
|
155
|
+
lines.push(`export type ${pascal}OutputType = Awaited<ReturnType<typeof ${name}Endpoint.execute>>;`);
|
|
156
156
|
}
|
|
157
157
|
lines.push('');
|
|
158
158
|
// Also export as a single api object
|
package/dist/esm/sync/lib.js
CHANGED
|
@@ -143,8 +143,8 @@ export function generateApiTs(endpointFiles, flowId) {
|
|
|
143
143
|
// Inferred input/output types per endpoint (e.g. GetDashboardInputType, GetDashboardOutputType)
|
|
144
144
|
for (const name of endpointNames) {
|
|
145
145
|
const pascal = toPascalCase(name);
|
|
146
|
-
lines.push(`export type ${pascal}InputType = typeof ${name}Endpoint
|
|
147
|
-
lines.push(`export type ${pascal}OutputType = typeof ${name}Endpoint
|
|
146
|
+
lines.push(`export type ${pascal}InputType = Parameters<typeof ${name}Endpoint.execute>[0]['input'];`);
|
|
147
|
+
lines.push(`export type ${pascal}OutputType = Awaited<ReturnType<typeof ${name}Endpoint.execute>>;`);
|
|
148
148
|
}
|
|
149
149
|
lines.push('');
|
|
150
150
|
// Also export as a single api object
|