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

No types included in packages #1067

Closed
ezhikov opened this issue Jul 15, 2020 · 5 comments
Closed

No types included in packages #1067

ezhikov opened this issue Jul 15, 2020 · 5 comments

Comments

@ezhikov
Copy link

ezhikov commented Jul 15, 2020

Describe the bug
Documentation states:

Theme UI is written in TypeScript.

While most APIs in Theme UI should just work in TypeScript, there are a few advanced use cases which will differ slightly. This guide is intended to cover those use cases.

But with partial (e.g. @theme-ui/core) installation there is no types included in package and no types present as @types/theme-ui__core package:

TS7016: Could not find a declaration file for module '@theme-ui/core'. '/home/kir/work/mos-cat/libs/ds/node_modules/@theme-ui/core/dist/index.js' implicitly has an 'any' type.
  Try `npm install @types/theme-ui__core` if it exists or add a new declaration (.d.ts) file containing `declare module '@theme-ui/core';`
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@types%2ftheme-ui__core - Not found

To Reproduce
Try to use only @theme-ui/core and @theme-ui/css packages in TypeScript

Expected behavior
It works with TypeScript out of the box.

@deadcoder0904
Copy link

I think it's still being rewritten in Typescript. See #668 although some of the unchecked packages are converted too which you already mentioned.

Weird, it should work. I'll give this a shot too.

@deadcoder0904
Copy link

deadcoder0904 commented Jul 16, 2020

You gotta install @theme-ui/core@next & @theme-ui/css@next to make it work. The next version has Typescript support.

Also, @theme-ui/css@next is bundled inside @theme-ui/core@next but if you are using it, you should install it separately I think.

@hasparus
Copy link
Member

@jxnblk Documentation from the future is published :c Should I PR to revert the commit that added TypeScript chapter to the docs, or will you redeploy older version?

@jxnblk
Copy link
Member

jxnblk commented Aug 3, 2020

@hasparus Sorry, I accidentally, "un-reverted" the docs trying something out. I think a more accurate version should be published now

@lachlanjc
Copy link
Member

I think we can close this? There are a bunch of other issues/PRs for the TypeScript conversion, sounds like the docs have been fixed appropriately.

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

5 participants