Skip to content

Commit

Permalink
Remove unnecessary type assertions (#2362)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornstar authored Jul 10, 2024
1 parent eccfcce commit 561a376
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/core/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ const cloneRaw = (raw: OptionsInit) => {
};

const getHttp2TimeoutOption = (internals: typeof defaultInternals): number | undefined => {
const delays = [internals.timeout.socket, internals.timeout.connect, internals.timeout.lookup, internals.timeout.request, internals.timeout.secureConnect].filter(delay => typeof delay === 'number') as number[];
const delays = [internals.timeout.socket, internals.timeout.connect, internals.timeout.lookup, internals.timeout.request, internals.timeout.secureConnect].filter(delay => typeof delay === 'number');

if (delays.length > 0) {
return Math.min(...delays);
Expand Down
2 changes: 1 addition & 1 deletion source/core/utils/options-to-url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default function optionsToUrl(origin: string, options: URLOptions): URL {

for (const key of keys) {
if (options[key]) {
url[key] = options[key]!.toString();
url[key] = options[key].toString();
}
}

Expand Down

0 comments on commit 561a376

Please sign in to comment.