-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Use export * in utility indexes too #2636
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export {AppBridgeContext} from './context'; | ||
export * from './context'; | ||
|
||
export {useAppBridge} from './hooks'; | ||
export * from './hooks'; | ||
|
||
export {createAppBridge, AppBridgeOptions} from './app-bridge'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export {FeaturesContext} from './context'; | ||
export * from './context'; | ||
|
||
export {Features} from './types'; | ||
export * from './types'; | ||
|
||
export {useFeatures} from './hooks'; | ||
export * from './hooks'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
export {useFrame} from './hooks'; | ||
export * from './hooks'; | ||
|
||
export {FrameContext} from './context'; | ||
export * from './context'; | ||
|
||
export { | ||
ContextualSaveBarProps, | ||
ToastProps, | ||
ToastID, | ||
ToastPropsWithID, | ||
} from './types'; | ||
export * from './types'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export {I18nContext} from './context'; | ||
export * from './context'; | ||
|
||
export {useI18n} from './hooks'; | ||
export * from './hooks'; | ||
|
||
export {I18n} from './I18n'; | ||
export * from './I18n'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export {LinkLikeComponentProps, LinkLikeComponent} from './types'; | ||
export * from './types'; | ||
|
||
export {useLink} from './hooks'; | ||
export * from './hooks'; | ||
|
||
export {LinkContext} from './context'; | ||
export * from './context'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export {MediaQueryContext} from './context'; | ||
export {useMediaQuery} from './hooks'; | ||
export * from './context'; | ||
export * from './hooks'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
export {ResourceListContext} from './context'; | ||
export * from './context'; | ||
|
||
export { | ||
ResourceListSelectedItems, | ||
SELECT_ALL_ITEMS, | ||
CheckableButtons, | ||
CheckableButtonKey, | ||
} from './types'; | ||
export * from './types'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
export {ScrollLockManagerContext} from './context'; | ||
export * from './context'; | ||
|
||
export {useScrollLockManager} from './hooks'; | ||
export * from './hooks'; | ||
|
||
export { | ||
ScrollLockManager, | ||
SCROLL_LOCKING_ATTRIBUTE, | ||
} from './scroll-lock-manager'; | ||
export * from './scroll-lock-manager'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export {StickyManagerContext} from './context'; | ||
export * from './context'; | ||
|
||
export {useStickyManager} from './hooks'; | ||
export * from './hooks'; | ||
|
||
export {StickyManager} from './sticky-manager'; | ||
export * from './sticky-manager'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,10 @@ | ||
export {ThemeContext} from './context'; | ||
export * from './context'; | ||
|
||
export {useTheme} from './hooks'; | ||
export * from './hooks'; | ||
|
||
export {Theme, ThemeConfig, CustomPropertiesLike, ColorScheme} from './types'; | ||
export {ThemeConfig} from './types'; | ||
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. Why not export * here? 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. There's a bunch of other types in that file that are used within this folder, but not externally. As most of this is going to be extracted into polaris-tokens pretty soon it didn't seem worth the refactoring to split this into a types and private-types file. |
||
|
||
export { | ||
DefaultThemeColors, | ||
DefaultColorScheme, | ||
roleVariants, | ||
} from './role-variants'; | ||
export * from './role-variants'; | ||
|
||
export { | ||
buildCustomProperties, | ||
|
@@ -17,4 +13,4 @@ export { | |
toCssCustomPropertySyntax, | ||
} from './utils'; | ||
|
||
export {Tokens} from './tokens'; | ||
export * from './tokens'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export {UniqueIdFactoryContext} from './context'; | ||
export * from './context'; | ||
|
||
export {useUniqueId} from './hooks'; | ||
export * from './hooks'; | ||
|
||
export {UniqueIdFactory, globalIdGeneratorFactory} from './unique-id-factory'; | ||
export * from './unique-id-factory'; |
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.
are you sure we can remove this?
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.
I checked for usages and there were none outside the current file, I then removed the
export
and it complained that it was never used inside this file either