Skip to content

Commit

Permalink
Version 1.0.3.
Browse files Browse the repository at this point in the history
Bug fixed.
  • Loading branch information
ATATC committed Jun 28, 2023
1 parent cf92bae commit 6c4072c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@atatctech/redirect",
"type": "module",
"version": "1.0.3",
"version": "1.0.4",
"author": "ATATC",
"description": "A lightweight redirecting tool.",
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions src/redirect.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Args, RedirectFunction} from "./types";
import {Args} from "./types";

export function excludeParams(href: string): string {
return href.substring(0, href.indexOf("?"));
Expand Down Expand Up @@ -37,7 +37,7 @@ function Redirect(url?: string, args: Args = {}): void {
}
}

export function useRedirect(): RedirectFunction {
export function useRedirect(): (url?: string, args?: Args) => void {
return Redirect;
}

Expand Down
3 changes: 1 addition & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export type Args = {params?: {[key: string]: string}, blank?: boolean, refresh?: boolean};
export type RedirectFunction = (url?: string, args?: Args) => void;
export type Args = {params?: {[key: string]: string}, blank?: boolean, refresh?: boolean};

0 comments on commit 6c4072c

Please sign in to comment.