Skip to content
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

Export more types from @sitecore-jss/sitecore-jss-nextjs #1036

Closed
pzi opened this issue May 25, 2022 · 3 comments · Fixed by #1043
Closed

Export more types from @sitecore-jss/sitecore-jss-nextjs #1036

pzi opened this issue May 25, 2022 · 3 comments · Fixed by #1043

Comments

@pzi
Copy link
Contributor

pzi commented May 25, 2022

Is your feature request related to a problem? Please describe.

The following types are not available from the nextjs package (not re-exported):

import type {ComponentConsumerProps} from '@sitecore-jss/sitecore-jss-react/types/enhancers/withSitecoreContext';

import type {ImageFieldValue} from '@sitecore-jss/sitecore-jss-react/types/components/Image';

import type {ImageProps} from '@sitecore-jss/sitecore-jss-react/types/components/Image';

import type {ImageSizeParameters} from '@sitecore-jss/sitecore-jss-react/types/components/Image';

import type {PlaceholderComponentProps} from '@sitecore-jss/sitecore-jss-react/types/components/Placeholder';

Describe the solution you'd like

Be able to import all these types from @sitecore-jss/sitecore-jss-nextjs.

Describe alternatives you've considered

Augment @sitecore-jss/sitecore-jss-nextjs to include those, or keep importing them from within @sitecore-jss/sitecore-jss-react/types

Additional information

Is there a specific reason why these types are not exposed in the nextjs pkg? It seems inconsistent as some related types are exported (e.g. LinkFieldValue), so maybe they were missed?

@pzi
Copy link
Contributor Author

pzi commented May 26, 2022

If all it needs is to list more exports in https://github.com/Sitecore/jss/blob/dev/packages/sitecore-jss-nextjs/src/index.ts, then I can PR it if everyone's ok with it?

@ambrauer
Copy link
Contributor

@pzi Yep, that should be all it takes. We would gladly welcome a PR :)

@pzi
Copy link
Contributor Author

pzi commented May 27, 2022

@pzi Yep, that should be all it takes. We would gladly welcome a PR :)

Done :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants