Skip to content

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

@eli-sda

Description

@eli-sda

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions