Skip to content

Commit

Permalink
Fix overload
Browse files Browse the repository at this point in the history
  • Loading branch information
hugoalh committed Jan 25, 2025
1 parent cbf39ed commit fecea6a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ This is a modified edition of the NPM packages [`url-regex-safe`](https://www.np
## 🧩 APIs

- ```ts
function urlRegExp(options?: URLRegExpOptions): RegExp;
function urlRegExp(options?: URLRegExpOptions & { returnString?: false; }): RegExp;
function urlRegExp(options: URLRegExpOptions & { returnString: true; }): string;
```

Expand Down
2 changes: 1 addition & 1 deletion mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export interface URLRegExpOptions {
*/
trailingPeriod?: boolean;
}
export function urlRegExp(options?: URLRegExpOptions): RegExp;
export function urlRegExp(options?: URLRegExpOptions & { returnString?: false; }): RegExp;
export function urlRegExp(options: URLRegExpOptions & { returnString: true; }): string;
export function urlRegExp(options: URLRegExpOptions = {}): string | RegExp {
const {
Expand Down

0 comments on commit fecea6a

Please sign in to comment.