Skip to content

Commit

Permalink
Update dependencies and fix type initialization in hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiodxa committed Jan 20, 2025
1 parent 3d24bda commit f06f342
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 20 deletions.
Binary file modified bun.lockb
Binary file not shown.
29 changes: 13 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,33 +120,30 @@
}
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.0",
"@arethetypeswrong/cli": "^0.17.3",
"@biomejs/biome": "^1.7.2",
"@happy-dom/global-registrator": "^15.11.7",
"@happy-dom/global-registrator": "^16.7.0",
"@oslojs/crypto": "^1.0.1",
"@oslojs/encoding": "^1.1.0",
"@testing-library/jest-dom": "^6.1.3",
"@testing-library/react": "^16.0.1",
"@testing-library/user-event": "^14.5.2",
"@testing-library/react": "^16.2.0",
"@testing-library/user-event": "^14.6.0",
"@total-typescript/tsconfig": "^1.0.4",
"@types/bun": "^1.1.14",
"@types/react": "^18.2.78",
"@vitejs/plugin-react": "^4.3.4",
"@types/bun": "^1.1.17",
"@types/react": "^19.0.7",
"intl-parse-accept-language": "^1.0.0",
"is-ip": "5.0.1",
"msw": "^2.6.6",
"msw": "^2.7.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-router": "^7.0.2",
"react-router": "^7.1.3",
"ts-node": "^10.9.1",
"typedoc": "^0.27.2",
"typedoc-plugin-mdn-links": "^4.0.3",
"typescript": "^5.7.2",
"vite": "^6.0.2",
"zod": "^3.22.4"
"typedoc": "^0.27.6",
"typedoc-plugin-mdn-links": "^4.0.9",
"typescript": "^5.7.3",
"zod": "^3.24.1"
},
"dependencies": {
"type-fest": "^4.30.0"
"type-fest": "^4.33.0"
},
"files": ["build", "package.json", "README.md"]
}
2 changes: 1 addition & 1 deletion src/react/honeypot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function HoneypotInputs({
label = "Please leave this field blank",
}: {
label?: string;
}): JSX.Element {
}) {
let context = React.useContext(HoneypotContext);

let {
Expand Down
2 changes: 1 addition & 1 deletion src/react/use-debounce-fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type DebouncedFetcher<Data = unknown> = Omit<
> & { submit: DebounceSubmitFunction };

export function useDebounceFetcher<Data>() {
let timeoutRef = useRef<Timer | undefined>();
let timeoutRef = useRef<Timer>(null);

useEffect(() => {
// no initialize step required since timeoutRef defaults undefined
Expand Down
2 changes: 1 addition & 1 deletion src/react/use-debounce-submit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useSubmit } from "react-router";
type SubmitTarget = Parameters<SubmitFunction>["0"];

export function useDebounceSubmit() {
let timeoutRef = useRef<Timer | undefined>();
let timeoutRef = useRef<Timer | undefined>(null);

useEffect(() => {
// no initialize step required since timeoutRef defaults undefined
Expand Down
4 changes: 3 additions & 1 deletion src/react/use-delegated-anchors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ export function isLinkEvent(event: MouseEvent) {
return;
}

export function useDelegatedAnchors(nodeRef: React.RefObject<HTMLElement>) {
export function useDelegatedAnchors(
nodeRef: React.RefObject<HTMLElement | null>,
) {
let navigate = useNavigate();
let hasParentPrefetch = React.useContext(context);

Expand Down

0 comments on commit f06f342

Please sign in to comment.