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

I need a declaration file. Not all components are exported #38

Open
eli-sda opened this issue Sep 15, 2023 · 2 comments
Open

I need a declaration file. Not all components are exported #38

eli-sda opened this issue Sep 15, 2023 · 2 comments

Comments

@eli-sda
Copy link

eli-sda commented Sep 15, 2023

I'm trying to use alps-react library in my react project with typescript.

  • My first problem is missing of TypeScript declaration file (.d.ts file).

> npm i --save @types/alps-react npm ERR! code E404 npm ERR! 404 Not Found - GET https://registry.npmjs.org/@types%2falps-react - Not found npm ERR! 404 npm ERR! 404 '@types/alps-react@*' is not in this registry.

  • Next problem is that not all components are exported, so the example in the readme is not working:
Failed to compile.

Attempted import error: 'Body' is not exported from 'alps-react' (imported as 'Body').
ERROR in ./src/App.tsx 48:39-43
export 'Body' (imported as 'Body') was not found in 'alps-react' (possible exports: AlpsContextProvider, DrawerContextProvider, LinkContextProvider, breakpoints, breakpointsWidths, getExternalAssets)

ERROR in ./src/App.tsx 51:41-44
export 'Div' (imported as 'Div') was not found in 'alps-react' (possible exports: AlpsContextProvider, DrawerContextProvider, LinkContextProvider, breakpoints, breakpointsWidths, getExternalAssets)

ERROR in ./src/App.tsx 54:44-50
export 'Button' (imported as 'Button') was not found in 'alps-react' (possible exports: AlpsContextProvider, DrawerContextProvider, LinkContextProvider, breakpoints, breakpointsWidths, getExternalAssets)

ERROR in ./src/App.tsx 60:43-53
export 'MediaBlock' (imported as 'MediaBlock') was not found in 'alps-react' (possible exports: AlpsContextProvider, DrawerContextProvider, LinkContextProvider, breakpoints, breakpointsWidths, getExternalAssets)

ERROR in ./src/App.tsx 82:43-53
export 'Blockquote' (imported as 'Blockquote') was not found in 'alps-react' (possible exports: AlpsContextProvider, DrawerContextProvider, LinkContextProvider, breakpoints, breakpointsWidths, getExternalAssets)
@eli-sda eli-sda changed the title Need type definition file. Not all components are exported I need a declaration file. Not all components are exported Sep 15, 2023
@eduludi
Copy link
Collaborator

eduludi commented Oct 11, 2023

@eli-sda This project doesn't support TypeScripts and it's no longer is being maintained.

Maybe you can take a look at this other project that was build based on alps-react: https:/adventistchurch/alps/tree/storybook (note that it's under the storybook branch of the alps project)

@eli-sda
Copy link
Author

eli-sda commented Oct 15, 2023

Thank you for the information, so I can install and use the components from storybook branch but as I see not all the components are exported (see https:/adventistchurch/alps/blob/storybook/src/index.ts). Could, someone update the index.ts?
Is it a problem that the branch is 779 commits behind v3.x?

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

No branches or pull requests

2 participants