Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
Consolidate empty types
Browse files Browse the repository at this point in the history
  • Loading branch information
OliverJAsh committed Dec 17, 2019
1 parent 51aa466 commit 4fb66ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { getOrElseMaybe, mapMaybe } from './helpers/maybe';
import { flipCurried, isNonEmptyString } from './helpers/other';

interface NodeUrlObjectWithParsedQuery extends urlHelpers.UrlObject {
query: ParsedUrlQueryInput | null;
query: ParsedUrlQueryInput;
}

type Update<T> = T | ((prev: T) => T);
Expand Down Expand Up @@ -105,7 +105,7 @@ const getParsedPathFromString = (maybePath: NodeUrlObjectWithParsedQuery['path']
pipeWith(
maybePath,
maybe => mapMaybe(maybe, parsePath),
maybe => getOrElseMaybe(maybe, () => ({ query: null, pathname: null })),
maybe => getOrElseMaybe(maybe, () => ({ query: {}, pathname: null })),
);

export const replacePathInParsedUrl = ({
Expand Down

0 comments on commit 4fb66ec

Please sign in to comment.