Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/better-fetch/src/create-fetch/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ export const applySchemaPlugin = (config: CreateFetchOption) =>

let opts = {
...options,
method: keySchema.method,
output: keySchema.output,
headers: validatedHeaders,
...(keySchema.method != null ? { method: keySchema.method } : undefined),
...(keySchema.output != null ? { output: keySchema.output } : undefined),
...(validatedHeaders != null ? { headers: validatedHeaders } : undefined),
};

if (!options?.disableValidation) {
Expand All @@ -122,7 +122,7 @@ export const applySchemaPlugin = (config: CreateFetchOption) =>
}
return {
url,
options,
...(options != null ? { options } : undefined),
};
},
}) satisfies BetterFetchPlugin;
Expand Down
2 changes: 1 addition & 1 deletion packages/better-fetch/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export type BetterFetchOption<
/**
* Duplex mode
*/
duplex?: "full" | "half";
duplex?: "half";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll fix this on next minor release (not patch)

/**
* Custom JSON parser
*/
Expand Down
1 change: 1 addition & 0 deletions packages/better-fetch/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
"strict": true /* Enable all strict type-checking options. */,
"exactOptionalPropertyTypes": true,
"noImplicitReturns": true /* Enable error reporting for codepaths that do not explicitly return in a function. */,
"skipLibCheck": true /* Skip type checking all .d.ts files. */,
"noEmit": true,
Expand Down