Skip to content

Commit

Permalink
fix typings error
Browse files Browse the repository at this point in the history
  • Loading branch information
dohomi committed Apr 8, 2024
1 parent dc8ff3d commit 8869550
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 24 deletions.
2 changes: 1 addition & 1 deletion apps/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
"@types/react-dom": "latest",
"cross-env": "latest",
"eslint-config-next": "latest",
"typescript": "latest"
"typescript": "5.4.4"
}
}
2 changes: 1 addition & 1 deletion apps/storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"react-dom": "^18.2.0",
"react-hook-form": "7.48.2",
"storybook": "8.0.6",
"typescript": "latest",
"typescript": "5.4.4",
"vite": "^5.2.8"
}
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
"sb-start": "cd apps/storybook && yarn build-storybook && yarn start-storybook",
"check-types": "cd packages/rhf-mui && tsc --noemit",
"lint": "eslint apps/nextjs/src/** packages/rhf-mui/src/** apps/storybook/stories/** apps/storybook/src/**",
"lint:fix": "npm run lint -- --fix",
"lint:fix": "yarn run lint -- --fix",
"prettier": "npx prettier apps/nextjs/src/** packages/rhf-mui/src/** apps/storybook/stories/** apps/storybook/src/** --check",
"prettier:fix": "prettier --write \"**/*.{js,ts,tsx}\"",
"deploy": "yarm build && cd apps/storybook/storybook-static && vercel --name react-hook-form-material-ui --prod",
"build": "yarn lint:fix && yarn prettier:fix && cd packages/rhf-mui && yarn build",
"upgrade:sb": "yarn up '@storybook/*' storybook -E",
"upgrade:typescript": "yarn up typescript@latest",
"upgrade:typescript": "yarn up typescript -E",
"upgrade:rhf": "yarn up react-hook-form -E",
"upgrade:mui": "yarn up '@mui/*' date-fns '@emotion/*' -E",
"test": "cd apps/storybook && yarn chromatic"
Expand All @@ -44,7 +44,7 @@
"release": "^6.3.1",
"simple-git-hooks": "^2.8.1",
"turbo": "^1.6.3",
"typescript": "latest"
"typescript": "5.4.4"
},
"packageManager": "[email protected]",
"lint-staged": {
Expand Down
2 changes: 1 addition & 1 deletion packages/rhf-mui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"react-hook-form": "7.48.2",
"release": "^6.3.1",
"tsup": "^6.1.2",
"typescript": "latest"
"typescript": "5.4.4"
},
"simple-git-hooks": {
"pre-commit": "npx lint-staged"
Expand Down
15 changes: 0 additions & 15 deletions packages/rhf-mui/src/test/TestComponent.tsx

This file was deleted.

6 changes: 3 additions & 3 deletions packages/rhf-mui/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ export function hasOwnProperty<X, Y extends PropertyKey>(

export function getTimezone<TDate>(
adapter: ReturnType<typeof useLocalizationContext>,
value: TDate | null
value: TDate
): string | null {
return value == null || !adapter.utils.isValid(value)
return value == null || !adapter.utils.isValid(value as unknown as Date)
? null
: adapter.utils.getTimezone(value)
: adapter.utils.getTimezone(value as unknown as Date)
}

0 comments on commit 8869550

Please sign in to comment.