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

Unexpected type errors using future versions of typescript #2856

Closed
traverse opened this issue May 31, 2018 · 2 comments
Closed

Unexpected type errors using future versions of typescript #2856

traverse opened this issue May 31, 2018 · 2 comments
Labels

Comments

@traverse
Copy link
Contributor

Bug Report

Whilst testing out future typescript releases I ran into some type errors that weren't popping up before.

Steps

Transpile a project using typescript and semantic-ui-react.

Expected Result

Should transpile without problems.

Actual Result

Receive type errors like the following:

ERROR in /Users/User/project/src/Component.tsx(2,10):
TS2305: Module '"/Users/User/project/node_modules/semantic-ui-react/dist/commonjs/index"' has no exported member 'Input'.

Version

Testcase

I can't share the code but the issue is basically that typescript isn't finding the type definitions. This can be solved by adding "types": "index.d.ts" to the package.json.

@layershifter
Copy link
Member

layershifter commented May 31, 2018

I used create-react-app-typescript with [email protected], then added semantic-ui-react and updated the App component to use SUIR. Build and serve worked fine.

[email protected] and typescript@3 don't work. When I added "types": "index.d.ts", to package.json, build was successfull. @traverse do you want to open a PR?

@traverse
Copy link
Contributor Author

traverse commented May 31, 2018

@layershifter I opened a PR, thanks for the quick response. 👍

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

No branches or pull requests

2 participants