-
-
Notifications
You must be signed in to change notification settings - Fork 360
Bump foundation deps 2025.10 #22314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump foundation deps 2025.10 #22314
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -91,6 +91,7 @@ socks-proxy-agent | |
| stream-browserify | ||
| swr | ||
| tailwindcss | ||
| tar | ||
| terser-webpack-plugin | ||
| tiny-worker | ||
| ts-mixer | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,27 @@ | ||
| import { useCallback } from 'react'; | ||
| import { Dispatch, useCallback } from 'react'; | ||
|
|
||
| import type { Path, UseFormReturn } from '@suite-native/forms'; | ||
| import type { FieldPathValue, Path, UseFormReturn } from '@suite-native/forms'; | ||
|
|
||
| import { useBottomSheetControls } from './useBottomSheetControls'; | ||
| import { BuyFormValues } from '../../types/buy'; | ||
| import { ExchangeFormValues } from '../../types/exchange'; | ||
| import { SellFormValues } from '../../types/sell'; | ||
|
|
||
| export const useSheetControls = < | ||
| FormValues extends BuyFormValues | ExchangeFormValues | SellFormValues, | ||
| type BottomSheetControls = ReturnType<typeof useBottomSheetControls>; | ||
| type FormUnion = BuyFormValues | ExchangeFormValues | SellFormValues; | ||
| // explicit return type declaration, because typescript reaches its limits when trying to infer type | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. after bumping Consultation with GPT-5 told me I should explicitly define return type, as TS can no longer handle the complexity of the inferred type. After a bit of tinkering, this satisfies TS. But I cannot say I understand these types, the labyrinth of generic types in the |
||
| type SheetControls< | ||
| FormValues extends FormUnion, | ||
| Key extends Path<FormValues>, | ||
| >( | ||
| > = BottomSheetControls & { | ||
| selectedValue: FieldPathValue<FormValues, Key>; | ||
| setSelectedValue: Dispatch<FieldPathValue<FormValues, Key>>; | ||
| }; | ||
|
|
||
| export const useSheetControls = <FormValues extends FormUnion, Key extends Path<FormValues>>( | ||
| { setValue, watch }: UseFormReturn<FormValues>, | ||
| key: Key, | ||
| ) => { | ||
| ): SheetControls<FormValues, Key> => { | ||
| const bottomSheetControls = useBottomSheetControls(); | ||
|
|
||
| const selectedValue = watch(key); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is only used in script
connect-bump-versions.tsso I'm reassigning this to connect team