-
Notifications
You must be signed in to change notification settings - Fork 1.3k
chore: ts explicit module boundary RAC #8381
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
base: main
Are you sure you want to change the base?
Conversation
Build successful! 🎉 |
@@ -508,7 +512,9 @@ export interface GridListLoadingSentinelProps extends Omit<LoadMoreSentinelProps | |||
isLoading?: boolean | |||
} | |||
|
|||
export const UNSTABLE_GridListLoadingSentinel = createLeafComponent('loader', function GridListLoadingIndicator<T extends object>(props: GridListLoadingSentinelProps, ref: ForwardedRef<HTMLDivElement>, item: Node<T>) { |
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.
the generic T
seems to be unused if I've understood the types correctly
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.
yeah I think you are right, not sure why I used the generic tbh but this looks correct
Build successful! 🎉 |
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.
did a sweep, the types look good to me and the tsdiffer results checked out. Bit curious that there were more things that came up running yarn lint
with the tsconfig from #8375 (comment) than with the same config on main though
@@ -508,7 +512,9 @@ export interface GridListLoadingSentinelProps extends Omit<LoadMoreSentinelProps | |||
isLoading?: boolean | |||
} | |||
|
|||
export const UNSTABLE_GridListLoadingSentinel = createLeafComponent('loader', function GridListLoadingIndicator<T extends object>(props: GridListLoadingSentinelProps, ref: ForwardedRef<HTMLDivElement>, item: Node<T>) { |
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.
yeah I think you are right, not sure why I used the generic tbh but this looks correct
@LFDanLu |
More of the latter I suppose, just reflecting that I was surprised that more stuff got caught by lint after the fixes in this PR when compared to main. Hard for me to parse the entire lint diff though hence the slight concern |
Build successful! 🎉 |
## API Changes
react-aria-components/react-aria-components:UNSTABLE_GridListLoadingSentinel-UNSTABLE_GridListLoadingSentinel <T extends {}> {
+UNSTABLE_GridListLoadingSentinel {
children?: ReactNode
className?: string
isLoading?: boolean
scrollOffset?: number = 1
style?: CSSProperties
} /react-aria-components:UNSTABLE_ListBoxLoadingSentinel-UNSTABLE_ListBoxLoadingSentinel <T extends {}> {
+UNSTABLE_ListBoxLoadingSentinel {
children?: ReactNode
className?: string
isLoading?: boolean
scrollOffset?: number = 1
style?: CSSProperties
} /react-aria-components:UNSTABLE_TableLoadingSentinel-UNSTABLE_TableLoadingSentinel <T extends {}> {
+UNSTABLE_TableLoadingSentinel {
children?: ReactNode
className?: string
isLoading?: boolean
scrollOffset?: number = 1
style?: CSSProperties
} /react-aria-components:UNSTABLE_TreeLoadingIndicator-UNSTABLE_TreeLoadingIndicator <T extends {}> {
+UNSTABLE_TreeLoadingIndicator {
children?: ReactNode | ((UNSTABLE_TreeLoadingIndicatorRenderProps & {
defaultChildren: ReactNode | undefined
})) => ReactNode
defaultClassName: string | undefined
})) => string
style?: CSSProperties | ((UNSTABLE_TreeLoadingIndicatorRenderProps & {
defaultStyle: CSSProperties
})) => CSSProperties | undefined
} |
Closes
next instalment, same way of verifying, see description (#8375) in addition to ts differ
any questions of types should be validated against https://app.unpkg.com/react-aria-components@1.10.1/files/dist/types.d.ts
I figured out the syntax for the function stories halfway through. Technically that syntax is deprecated, so i just left the ones i converted to the object format. We have to do it eventually. I did the rest as function format to minimise the diff.
✅ Pull Request Checklist:
📝 Test Instructions:
🧢 Your Project: