Skip to content

Type definition bug when trying to use the package @primer/styled-react #6643

@jonrohan

Description

@jonrohan
Image

When trying to use an import from styled-react like import {Text, Link} from '@primer/styled-react' I get the type error:

error TS7016: Could not find a declaration file for module '@primer/styled-react'. '/workspaces/github-ui/node_modules/@primer/styled-react/dist/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/primer__styled-react` if it exists or add a new declaration (.d.ts) file containing `declare module '@primer/styled-react';`

3 import {Text, Link} from '@primer/styled-react'

Metadata

Metadata

Assignees

Labels

reactstaffAuthor is a staff member

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions