question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No types included in packages

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lachlanjccommented, Aug 11, 2020

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.

1reaction
jxnblkcommented, Aug 3, 2020

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

NPM Package doesn't have Types - node.js - Stack Overflow
The quick way is to create a globals.d.ts file and add the line: declare module "express-bearer-token";.
Read more >
Documentation - Publishing - TypeScript
If your types are generated by your source code, publish the types with your source code. Both TypeScript and JavaScript projects can generate...
Read more >
package.json - npm Docs
This document is all you need to know about what's required in your package.json file. It must be actual JSON, not just a...
Read more >
Modules: Packages | Node.js v19.3.0 Documentation
Package authors should include the "type" field, even in packages where all ... contains no package.json file, // and therefore inherits the "type"...
Read more >
Using installed packages - mypy 0.991 documentation
New versions of stub packages often use type system features not supported by ... This also allows stubs not originally included with mypy...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found